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

Home » Public Forums » archive » Re: read/write standard 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: read/write standard envi [message #29618] Tue, 05 March 2002 05:37 Go to previous message
Klaus Scipal is currently offline  Klaus Scipal
Messages: 45
Registered: November 1997
Member
T'x for your assistemce, indeed it was easier than expected

Klaus


"Vincent Schut" <schut@gissrv.iend.wau.nl> wrote in message
news:3C84ABBA.60202@gissrv.iend.wau.nl...
> Klaus Scipal wrote:
>> Hi
>>
>> I am sure anyone out there has already done this:
>>
>> I need to read/write a standard ENVI file in IDL. Is there any code
>> available or am I the first one with this problem.
>> T'x for any help
>>
>> Klaus
>>
>>
> I suppose you have ENVI?
> You can simply use the envi-routines for this. Check out the ENVI
> programmers guide that came with your ENVI program, or the online help
> (not the online help of idl, but of envi), search for the section for
> programmers. The appropriate function is called envi_open_file. You can
> search your envi online help file for this.
>
> BTW, also without envi it is quite simple to read/write a standard envi
> file. A very short explanation:
> First open the belonging header file, this contains information about
> the # of bands, samples, lines, data format and storage format. Storage
> format can be bsq, bil or bip, which mean data is stored band after band
> (bsq), byte interleaved by line (bil: line1 band1, line1 band2, l1b3,
> l2b1, etc) or bip: byte interleaved by pixel: p1b1, p1b2, p1b3, p2b1,
> etc. The header file is in human readable text format.
> From the data type you can calculate how many bytes each pixel takes,
> e.g. is the data type integer, each pixel is 2 bytes.
> Then you can just open and read the file. It is not compressed, just
> read the values pixel after pixel.
> You can check your calculation by checking if #samples * #lines * #bands
> * #bytesppixel = filesize.
>
> Using the appropriate envi-routine is much easier, though.
>
> For more info, if you have an envi manual, read the programmers section.
> Otherwise, ask more questions if you don't succeed.
>
> good luck!
>
> Vincent.
>
[Message index]
 
Read Message
Read Message
Previous Topic: DOUBLE precision no precise??
Next Topic: smoothing large arrays

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

Current Time: Fri Oct 10 05:16:48 PDT 2025

Total time taken to generate the page: 0.40042 seconds