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
Re: (Beginner) issue setting variables using ENVI_FILE_QUERY [message #86289 is a reply to message #86288] Wed, 23 October 2013 07:21 Go to previous messageGo to previous message
Simon Mitchell is currently offline  Simon Mitchell
Messages: 6
Registered: October 2013
Junior Member
On Wednesday, 23 October 2013 15:28:45 UTC+2, David Fanning wrote:
> Simon Mitchell writes:
>
>
>
>> 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).
>
>
>
>> ;determine the number of samples and lines
>
>>
>
>> ENVI_FILE_QUERY, lun_tif, NS=ns, NL=nl
>
>>
>
>> The error that I am getting is:
>
>> % PRINT: Variable is undefined: NS (PARAM).
>
>>
>
>> Would anyone be able to help me with this?
>
>
>
> Instead of using ENVI_FILE_QUERY here, you want to use QUERY_TIFF:
>
>
>
> void = Query_Tiff(ifname, fileInfo)
>
> dims = fileInfo.dimensions
>
> ns = dims[0]
>
> nl = dims[1]
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Hello David,

Thank you for your help.
I used your example code, but I get another error.

% Expression must be a structure in this context: FILEINFO.
With the "dims = fileInfo.dimensions" highlighted.

Would you please be able to tell me what this means?

Regards

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: Sat Oct 11 13:17:02 PDT 2025

Total time taken to generate the page: 2.87764 seconds