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

Home » Public Forums » archive » Write 3dimensional array as bsq-file without using ENVI Methods
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: Write 3dimensional array as bsq-file without using ENVI Methods [message #91731 is a reply to message #91730] Mon, 17 August 2015 01:41 Go to previous message
Yngvar Larsen is currently offline  Yngvar Larsen
Messages: 134
Registered: January 2010
Senior Member
On Monday, 17 August 2015 09:52:46 UTC+2, jil...@googlemail.com wrote:
> Hi thanks for your suggestion. However, I need bsq-files as output... is there no possibility for that? I have both licences, ENVI and IDL but it should run without opening ENVI, so that is applicable without ENVI and therefore everywhere... :/.
> best regards,
> Ina

To write the binary (bsq) file itself is no problem. Just make sure that your array has the band dimension last (using TRANSPOSE if necessary), and write to disk:

A = fltarr(npixels, nlines, nbands)
openw, unit, 'myfile.bsq', /get_lun
writeu, unit, A
free_lun, unit

However, you must write code to dump the corresponding ENVI header file yourself. In simple cases this is rather easy, but a general solution is a lot of work.

--
Yngvar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Has anyone used stippling in contour plot ?
Next Topic: Help with pointers

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

Current Time: Wed Oct 08 15:57:38 PDT 2025

Total time taken to generate the page: 0.00417 seconds