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

Home » Public Forums » archive » summation of bands
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
summation of bands [message #75953] Wed, 04 May 2011 22:42 Go to next message
PRABHJOT KAUR is currently offline  PRABHJOT KAUR
Messages: 1
Registered: May 2011
Junior Member
I have to do summation or integration of 37 bands of an hyperspectral
image in IDL to get final none output image. I tried with total
command but its not giving any result. Please help me as I am new in
this field.
Re: summation of bands [message #76032 is a reply to message #75953] Fri, 13 May 2011 04:14 Go to previous messageGo to next message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On May 13, 7:09 am, Corinne <corinnef...@gmail.com> wrote:
> Hi
>
> try something like this
>
> outdata = yourdata[*,*,0]
>
> FOR i = 1, N_ELEMENTS(yourdata[0,0,*]) -1 DO BEGIN
>   outdata = outdata + yourdata[*,*,i]
> ENDFOR
>
> maybe there is a faster way to do it, but i am not aware of.
>
> cheers,
> corinne
>
> On 5 Mai, 07:42, PRABHJOT KAUR <prabh....@gmail.com> wrote:
>
>
>
>
>
>
>
>> I have to do summation or integration of 37 bands of an hyperspectral
>> image in IDL to get final none output image. I tried with total
>> command but its not giving any result. Please help me as I am new in
>> this field.

outdata = total(yourdata,3)
Re: summation of bands [message #76033 is a reply to message #75953] Fri, 13 May 2011 04:09 Go to previous messageGo to next message
corinnefrey is currently offline  corinnefrey
Messages: 18
Registered: November 2006
Junior Member
Hi

try something like this

outdata = yourdata[*,*,0]

FOR i = 1, N_ELEMENTS(yourdata[0,0,*]) -1 DO BEGIN
outdata = outdata + yourdata[*,*,i]
ENDFOR

maybe there is a faster way to do it, but i am not aware of.

cheers,
corinne



On 5 Mai, 07:42, PRABHJOT KAUR <prabh....@gmail.com> wrote:
> I have to do summation or integration of 37 bands of an hyperspectral
> image in IDL to get final none output image. I tried with total
> command but its not giving any result. Please help me as I am new in
> this field.
Re: summation of bands [message #77042 is a reply to message #76032] Sat, 23 July 2011 11:59 Go to previous message
Eben Broadbent is currently offline  Eben Broadbent
Messages: 1
Registered: July 2011
Junior Member
thanks worked perfect with specifying the third dimension
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Multiple Window
Next Topic: Re: Loading Sorted Images into a 3D array

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

Current Time: Wed Oct 08 11:37:03 PDT 2025

Total time taken to generate the page: 0.00414 seconds