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

Home » Public Forums » archive » Re: efficient comparing 1D and 3D arrays
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: efficient comparing 1D and 3D arrays [message #60679 is a reply to message #60678] Wed, 11 June 2008 09:48 Go to previous messageGo to previous message
Jelle is currently offline  Jelle
Messages: 19
Registered: May 2008
Junior Member
On Jun 11, 5:37 pm, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:

> Hi,
> Yes you can...do something like:
> nb=3
> ns=5
> nl=5
> imgData = fix(randomu(seed,nb,nl,ns)*100) ;--> doing ns,nl,nb makes
> more sense than nb,ns,nl... for mental representation at least (and if
> you print it!)
>
> minVals = [15,30,12] ;Min val in each band
> maxVals = [75,80,60] ;Max val in each band
>
> allMin = rebin(minVals, nb,nl,ns) ;repeat the min band value for every
> pixels in each band
> allMax = rebin(maxVals, nb,nl,ns)
>
> goodPixels = where(imgData gt allMin and imgData lt allMax)
>
> ==> returns the indexes of imgData that satisfy the condition in EVERY band.
>
> Jean



cool. I'll harvest some beans in the garden, have dinner, pour a red,
have a potter and let the results of my pottering seep through!

J
PS: Yes dinner.. I am in Europe: Dinner time, 6PM in UK
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to add tie point information for ENVI in IDL?
Next Topic: Re: Filling a contour

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

Current Time: Fri Oct 10 13:44:29 PDT 2025

Total time taken to generate the page: 0.79777 seconds