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

Home » Public Forums » archive » Re: need help on ROI subscript
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: need help on ROI subscript [message #17253] Fri, 17 September 1999 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Leonid Syrkin (lsyrkin@yahoo.com) writes:

> I need to calculate total counts inside a defined ROI in the multyframed
> image im256=IntArr(256,256,30). I define ROI in the first frame
> im256(*,*,0). Q is a subscript. Then I am trying to to calculate total
> counts inside ROI for every image. It starts fine for the first frame
> and gives the error on the second cycle:
>
> % Subscript range values must be >= 0, < size: IM256.
> % Execution halted at: DISPLXE_DEFR 381
> /export/home/rsi/idl_5.2/myfiles/DisplXe.pro
> % WIDGET_PROCESS_EVENTS
> % $MAIN$
>
>
> What does it mean? Why subscript Q works fine for the first frame and
> stops on the second?

I think your problem is right here:

> im256=IntArr(256,256,30)
> FOR j=0, 29 DO BEGIN
> im256=rebin (im[*,*,j],256,256)
> ENDFOR

If you put a HELP statement at the bottom of this code
I think you will find that im256 is a 256 by 256 array
and not the 256 by 256 by 30 array you think it is. :-)

You probably meant to write something like this:

im256=IntArr(256,256,30)
FOR j=0, 29 DO BEGIN
im256[*,*,j]=rebin (im[*,*,j],256,256,1)
ENDFOR

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: map_set question
Next Topic: need help on ROI subscript

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

Current Time: Wed Oct 08 19:47:02 PDT 2025

Total time taken to generate the page: 0.00565 seconds