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

Home » Public Forums » archive » Re: Help with code for hyperspectral image analysis
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: Help with code for hyperspectral image analysis [message #80372] Mon, 11 June 2012 09:43 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
Your problem is your call to ENVI_GET_DATA. POS has to be a scalar, so ENVI_GET_DATA returns only a single band at a time. You should loop through all the bands, apply your filter, then write the band to the output file using writeu. Then, call ENVI_SETUP_HEAD to write the header file.

-B

On Monday, June 11, 2012 10:59:55 AM UTC-4, Kel wrote:

> ;get data from the image, pos seems to indicate which band to get data from
> f = ENVI_GET_DATA(fid=fid, dims=dims, pos=140)
>
> lcmask = f LT 40
>
>
> ;apply the mask to the image array
>
> masked_image=convol(data_holder, lcmask)
>
> ;write out the result as an envi file
> envi_write_envi_file, masked_image, out_name='masktest'
>
>
> end
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Always Something to Worry About
Next Topic: Strange UserSym Color Bug

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

Current Time: Wed Oct 08 13:33:47 PDT 2025

Total time taken to generate the page: 0.00449 seconds