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

Home » Public Forums » archive » how to create a loop?
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
how to create a loop? [message #38482] Thu, 11 March 2004 07:09
Thomas Nehls is currently offline  Thomas Nehls
Messages: 24
Registered: March 2004
Junior Member
Hi,

I want to create a loop, in which an array is filled pixel by pixel.
Like this a(n) = a(n-1) + C*d

I tried this

new = indgen(3,400,400)
runner= indgen(3,400,400)

FOR g= 0,255 DO BEGIN
grey = imageA[2,*,*] eq g ; so grey is my mask, containing the greylevel

FOR j=0,2 DO BEGIN
new[j,*,*] = runner[j,*,*] + imageB[j,*,*]*grey ; Image B contains
the colors I want to employ
new = runner
ENDFOR
ENDFOR

My questions: (i)is the runner appropriate to do what I want or are
there better ways to do this?
(ii) is the "+" the right way to fill the array pixel by pixel?

The results were not very exciting, I got a grey diagonal striped image...
Thank you very much
Tom
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Interrupting a loop in a GUI
Next Topic: Re: UTM WGS-84 projection with IDL?

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

Current Time: Wed Oct 08 13:48:46 PDT 2025

Total time taken to generate the page: 0.00540 seconds