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

Home » Public Forums » archive » Re: ENVI File Question
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: ENVI File Question [message #55794 is a reply to message #55788] Wed, 12 September 2007 13:51 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
David Fanning wrote:
> Folks,
>
> I have an ENVI file question. I just want to open a Geotiff
> file, do some small amount of processing on it, and save
> it as an image file ENVI can read. This seems about as
> straightforward as it can be.
>
> I found an ENVI procedure named ENVI_SETUP_HEAD that looks
> like what I need to create the ENVI header for this very
> simple file. My program runs, my ENVI_SETUP_HEAD command
> gets called. All appears well, but the header file never gets
> created. (Or at least it doesn't get created in the same
> place as my image file!)
>
> Here is the output from my program:
>
> Image Filename: /home/fanning/b2.img
> ENVI Header Filename: /home/fanning/b2.img.hdr
>
> The image file is there. The header file is not.
>
> Do I have to do something else to write the header?
>
> Cheers,
>
> David

David,

You can write the image AND the header at the same time, using
ENVI_WRITE_ENVI_FILE

here is an example... please note that some info has been read when
opening another file (the headerInfo structure)... I am not sure how to
build the map info on its own!

ENVI_WRITE_ENVI_FILE, data, data_type=1, nb = nbBands, nl=data_sizeY, $
ns=data_sizeX,OUT_NAME = workingDirectory + "fileName.dat", $
BNAMES = "band Name", class_names = headerInfo.class_names, $
lookup=headerInfo.lookup, map_info=headerInfo.map_info,num_classes =
headerInfo.num_classes

jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Ambiguous keyword abbreviation error
Next Topic: Congrid/Rebin Conundrum

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

Current Time: Thu Oct 09 23:12:48 PDT 2025

Total time taken to generate the page: 7.03831 seconds