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 #69230 is a reply to message #69229] Tue, 29 December 2009 05:26 Go to previous messageGo to previous message
Hassan is currently offline  Hassan
Messages: 48
Registered: October 2009
Member
On Dec 29, 1:15 pm, Hassan <hkhav...@gmail.com> wrote:
> On Dec 29, 12:31 pm, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> Hassan writes:
>>> No, I took that into account as well for example if the pixel value of
>>> the position [300,160,0]/[column,row,band] the equivalent pixel in the
>>> flipped image in IDL should be [299,160,0] but the pixel value doesn't
>>> match.
>
>> Shouldn't that be [299, 159, 0]?
>
>> 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.")
>
> yeah, It is [299,159,0] but the problem still exists. I used the
> following commands to import the data from ENVI:
> ENVI> ENVI_OPEN_FILE, image, /NO_REALIZE , R_FID=FID
> ENVI> ;If it is a valid file, read the header
> ENVI> ;if (fid[0] eq -1) then return, -1
> ENVI> envi_file_query, fid, ns=dimX, nl=dimY, nb=nbBands,
> DATA_TYPE=dataType,$
> ENVI>     OFFSET = HeaderOffSet, LOOKUP= lookup, class_names =
> classNames,$
> ENVI>     num_classes = numClasses
> ENVI> map_Info = ENVI_GET_MAP_INFO(FID=FID)
> ENVI> ;Pack the header info in a structure (optional)
> ENVI> headerInfo = {ns:dimX, nl:dimY, lookup:lookup,
> map_info:map_Info}
> ENVI> data = read_binary(ref2,data_Start = HeaderOffSet,$
> ENVI>         data_Type=dataType, data_Dims=[dimX,dimY,nbBANDS],ENDIAN
> = "native")
> ENVI>         image=data
>
> do you think has something unusual happened?

I used the Export to IDL function in ENVI and it works fine so there
should be something wrong in the way I imported the data.
[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 20:07:29 PDT 2025

Total time taken to generate the page: 0.00447 seconds