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

Home » Public Forums » archive » (Beginner) issue setting variables using ENVI_FILE_QUERY
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
(Beginner) issue setting variables using ENVI_FILE_QUERY [message #86286] Wed, 23 October 2013 03:05 Go to previous message
Simon Mitchell is currently offline  Simon Mitchell
Messages: 6
Registered: October 2013
Junior Member
Hello All,

I am having an issue when using ENVI_FILE_QUERY to set a variable containing the number of samples and number of lines from an opened image. This is possibly a very simple mistake that I am making, but I cannot see where I am going wrong (I am new to IDL, but having to update old existing code).

My code loops through a directory and opens .TIF images, to perform processing on.

------------------------------------------------------------ -------------
PRO CALL_HOTSPOT

COMMON PARAM, ns, nl, ifname, ofname, w, yd1, iyd, ib, yy
COMMON NAMES, opendir
COMMON LOOP, count_str

;Scan the tif_output directory for all files
tifdir = opendir + 'Tif_Output\'
CD, tifdir

tif_files = FILE_SEARCH('*.tif', COUNT = numfiles)
counter = 0


WHILE (counter LT numfiles) DO BEGIN

count_str = STRTRIM(STRING(counter), 2)

ifname = tif_files(counter)
OPENR, lun_tif, ifname, /GET_LUN

;determine the number of samples and lines

ENVI_FILE_QUERY, lun_tif, NS=ns, NL=nl

print, ns

; Call the TET algorithm
TET_HOTSPOT_IDL_MAIN_SIMULATION_SM


CLOSE, lun_tif
FREE_LUN, lun_tif

counter = counter + 1

ENDWHILE

END
------------------------------------------------------------ -------------

The error that I am getting is:
% PRINT: Variable is undefined: NS (PARAM).

Would anyone be able to help me with this?

Thanks in advance

Simon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: xtickformat type conversion
Next Topic: Using POLYGON to plot unstructred mesh

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

Current Time: Fri Oct 10 13:30:16 PDT 2025

Total time taken to generate the page: 0.56460 seconds