comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ASCII import
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: ASCII import [message #47995] Mon, 27 March 2006 10:37 Go to next message
none is currently offline  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 #48001 is a reply to message #47995] Sun, 26 March 2006 19:13 Go to previous messageGo to next message
jhkim.selab@gmail.com is currently offline  jhkim.selab@gmail.com
Messages: 2
Registered: June 2005
Junior Member
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 Go to previous message
mchinand is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Installing 6.2 on Fedora Core 5
Next Topic: Re: installing idl6.0_se + ubuntu GNU/Linux

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:00:46 PDT 2025

Total time taken to generate the page: 0.00566 seconds