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

Home » Public Forums » archive » Re: Create an ENVI .img file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Create an ENVI .img file [message #58872] Tue, 26 February 2008 13:29 Go to next message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
> You can call ENVI's functions in IDL!
> Have a look at
>
> ENVI_WRITE_ENVI_FILE
>
> Jean

and if you don't have Envi, you can save your data as a tiff or else and
write an header file for Envi.. as a mater of fact, you can use WRITEU
to save the data, which is the same "format" (no format indeed) as the
Envi files... then you just have to write the header file, saying what
data is present in the file!

Jean
Re: Create an ENVI .img file [message #58873 is a reply to message #58872] Tue, 26 February 2008 13:26 Go to previous messageGo to next message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
frankosuna wrote:
> Hello,
>
> I need to create an envi img from IDL and do not know if this is even
> possible. I initially was creating a .bmp image but realized that
> this image format would not work with what I am trying to do. I was
> plotting x and y values and creating the bmp image from the plot.
> Does IDL provide any functionality to do this?
>
> Thanks in advance,
>
> Frank

You can call ENVI's functions in IDL!
Have a look at

ENVI_WRITE_ENVI_FILE

Jean
Re: Create an ENVI .img file [message #58965 is a reply to message #58872] Tue, 26 February 2008 15:19 Go to previous message
frankosuna is currently offline  frankosuna
Messages: 31
Registered: February 2008
Member
On Feb 26, 2:29 pm, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:
>> You can call ENVI's functions in IDL!
>
>> Have a look at
>
>> ENVI_WRITE_ENVI_FILE
>
>> Jean
>
> and if you don't have Envi, you can save your data as a tiff or else and
> write an header file for Envi.. as a mater of fact, you can use WRITEU
> to save the data, which is the same "format" (no format indeed) as the
> Envi files... then you just have to write the header file, saying what
> data is present in the file!
>
> Jean

Thank you very much for that hint!! I was able to get what I needed by
using the writeu function.
This is what I did in case anybody else runs into this problem:

This first way that I did it I passed an array and wrote the
information from it into testidl.dat
OPENW, lun, 'testidl.dat', /get_lun
WRITEU, lun, array
FREE_LUN, lun

This second way of doing it I took the information from a .bmp file
and wrote it as wireframe.dat
file = FILEPATH('wireframe.bmp')
image = READ_BMP('/home/users/fjosuna/CASVU_ISS/wireframe.bmp')
OPENW, lun, 'wireframe.dat', /GET_LUN
WRITEU, lun, image
FREE_LUN, lun

Thanks again Jean!!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Regarding the Fit_Ellipse Program
Next Topic: Create an ENVI .img file

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

Current Time: Wed Oct 08 19:24:50 PDT 2025

Total time taken to generate the page: 0.00545 seconds