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

Home » Public Forums » archive » Display ENVI image
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: Display ENVI image [message #38318 is a reply to message #38222] Sat, 28 February 2004 07:26 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ananth Kini writes:

> Could any of you tell me how to display an ENVI image using IDL
> statements *ONLY*? I have pasted a sample header of one of my images
> and few pixel values below.
> ~~~~~~~~~~~~~~~~~~~~~~~
> Header for the image :
> ~~~~~~~~~~~~~~~~~~~~~~~
> ENVI
> description = {
> Band Math Result, Expression = [b1-b2] B1:IDL Var (GRID2USE): Band
> 1:top_ne
> B2:Resize (IDL Var (GRID2USE): Band 1:dem05):dem05_ne [Tue Aug 27
> 10:50:33
> 2002]}
> samples = 911
> lines = 1025
> bands = 1
> header offset = 0
> file type = ENVI Standard
> data type = 4
> interleave = bsq
> sensor type = Unknown
> byte order = 0
> map info = {UTM, 1.000, 1.000, 267395.000, 4710962.000, 0.50000000,
> 0.50000000, 19, North, North America 1983, units=Meters}
> band names = {
> Band Math (b1-b2)}

I don't have ENVI here, but I think what this header is telling you
is that the image (which is stored in a separate file, as I understand
it) is simply a 911 by 1025 2D image of floating point (type=4) data.

To read it, you would do this:

image = FltArr(911,1025)
OpenR, lun, whateverItsNameIs, /Get_Lun
ReadU, lun, image
Free_lun, lun

That's it. Takes some of the mystery out of ENVI, doesn't it. :-)

There might be some other complications (byte ordering, etc.)
depending upon your particular IDL environment (which you don't
tell us about), but this should get you pointed in the right direction.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: NR__SVDFIT issue
Next Topic: HDF5 and IDL

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

Current Time: Wed Oct 08 20:04:31 PDT 2025

Total time taken to generate the page: 0.00423 seconds