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

Home » Public Forums » archive » Re: how to read/display an image like it's done in ENVI?
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: how to read/display an image like it's done in ENVI? [message #69227 is a reply to message #69226] Tue, 29 December 2009 06:06 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Hassan writes:

> do you think has something unusual happened?

I don't know. The code you sent doesn't work. Could
that be the problem?

Once I got the code to work, the ENVI value at [1,1]
corresponded exactly to the image value at [0,0].

Here is the code I used.

filename = 'bhdemsub.img'
ENVI_OPEN_FILE, filename, /NO_REALIZE , R_FID=FID
envi_file_query, fid, ns=dimX, nl=dimY, nb=nbBands,$
DATA_TYPE=dataType, OFFSET = HeaderOffSet, $
LOOKUP= lookup, class_names =classNames, $
num_classes = numClasses
map_Info = ENVI_GET_MAP_INFO(FID=FID)
image = read_binary(filename,data_Start = HeaderOffSet,$
data_Type=dataType, data_Dims=[dimX,dimY,nbBANDS],$
ENDIAN= "native")

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 8.0 compile_opt changes
Next Topic: Convolve a spectrum (from MODTRAN) with a spectral response function

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

Current Time: Wed Oct 08 17:30:24 PDT 2025

Total time taken to generate the page: 0.00462 seconds