Re: import multilayer raster [message #68686 is a reply to message #68685] |
Wed, 18 November 2009 13:32  |
rogass
Messages: 200 Registered: April 2008
|
Senior Member |
|
|
On 18 Nov., 15:24, Hassan <hkhav...@gmail.com> wrote:
> I have a hyspectral image, with 62 bands, b1, b2,..., b62, in ENVI
> format and I want to import that image into IDL. I have a vector with
> 62 elements, k1,k2,...,k62, that matches with the bands. I'm going to
> use the equation y1=b1/k1, y2=b2/k2,...,y62=b62/k62 and then export it
> as an image with the same number of bands but new values. I think I
> need to use ENVI_GET_DATA but it imports individual bands, I wonder
> how I can use a loop to import the whole bands and then another loop
> to do the math operations?
Hi,
maybe you should just use the export-variable-to-idl and import-
variable-from-idl functionality of your ENVI, so you won't trap into
some byteorder-weirdness. If you want to completely steer your
algorithm from IDL then you have to mostly write a for loop for the
input(envi_get_data). If you have than a data matrix and your
filtermatrix in the same byte order and with the same dimensions, you
can easily divide them without using any loop. To do the byteorder
transform, you may have a look on transpose(data,[1,2,0]) or reverse
(rot(data,-90)) ....
Hope it helps
CR
|
|
|