Re: ASCII import [message #47995] |
Mon, 27 March 2006 10:37  |
none
Messages: 6 Registered: March 2006
|
Junior Member |
|
|
thanks for answering, i am afraid my question was not that clear;
the problem is infact to do the task using IDL commands in order to
batch the process (i have a huge amount of files to convert); which are
the commands i should use ?
thanks
marco
jhkim.selab@gmail.com wrote:
> If you are using ENVI 4.2, you can check File->Open External
> File->Generic Formats->ASCII. (Other versions of ENVI also should have
> it.)
>
> After reading ASCII file, you can save it as ENVI standard image which
> have file extension .img and .hdr.
>
> Jung-Hoon
>
> none 작성:
>
>> Hi, i have to import a number of ASCII .txt files and save them as ENVI
>> standard images, but I can not found any IDL script able to do this; do
>> you know which is the code ENVI uses to to open generic format-ASCII
>> data ?
>> thanks
>> m
|
|
|
|
Re: ASCII import [message #48136 is a reply to message #47995] |
Mon, 27 March 2006 12:44  |
mchinand
Messages: 66 Registered: September 1996
|
Member |
|
|
In article <1143484620.077986.8530@e56g2000cwe.googlegroups.com>,
none <fetos@libero.it> wrote:
> thanks for answering, i am afraid my question was not that clear;
> the problem is infact to do the task using IDL commands in order to
> batch the process (i have a huge amount of files to convert); which are
> the commands i should use ?
> thanks
> marco
>
>
I have a short program that can be used to batch process files.
------------------
function file_rep, filelist, func
openr, file_lun, filelist,/get_lun
filename=''
while NOT EOF(file_lun) do begin
readf,file_lun,filename
a=call_function(func,filename)
endwhile
free_lun, file_lun
end
--------------------------------------
To use this, first create a file containing the list of files you would like converted. You will also need to write a function
that takes a single file name as it's argument and does the processing you want on a single file. So, you would use this
function something like this:
IDL> dummy=file_rep('filelist','ascii2envi')
You will need to write the ascii2envi.pro function.
Hope this helps,
--Mike
--
Michael Chinander
m-chinander@uchicago.edu
Department of Radiology
University of Chicago
|
|
|