X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Mar 2006 05:00 AM by  anon
open multi images in batch mode
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
28 Mar 2006 05:00 AM
    Hello, How can I open many data files(at the same time) from a directory, in batch mode wth IDL+ENVI, without any ineraction and get their fid? I tryed ENVI_OPEN_DATA_FILE, but it requires interaction in order to choose the filename! many thanks Athina

    Deleted User



    New Member


    Posts:
    New Member


    --
    28 Mar 2006 05:00 AM
    Dear Athina, ENVI_OPEN_DATA_FILE does not require necessarily an interaction with the user, you can store the name (with the full path) of the file that you are going to open in a variable like 'fname' and then call the routine in this way, ENVI_OPEN_DATA_FILE, fname, r_fid=fid, /.. you can call this function several times dependin on the number of youe files. If instead you'd like to open several files that have something in common in their name, you can write a procedure like the following: ; every files to be opened has a 'b' in his name files=FILE_SEARCH('C:\...\*.b*', count=nInFiles) ; loop through all files found by FILE_SEARCH FOR i=0, nInFiles - 1 DO BEGIN ; ENVI_OPEN_DATA_FILE opens up ENVI files ENVI_OPEN_DATA_FILE, files[i], r_fid=fid, /.. endfor I hope this helps, Best regards, Marco Bacciocchi
    You are not authorized to post a reply.