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

Home » Public Forums » archive » Image thresholding
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: Image thresholding [message #15473 is a reply to message #15382] Mon, 17 May 1999 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
David Brennan wrote:
> Does anyone know of a fast routine or function for searching through a
> 3D data set and setting numbers within a predetermined range of values
> to zero. i.e,
>
> the range is 5 - 10
>
> A data set contains [0,1,2,3,4,5,6,7,8,9]. It becomes
> [0,1,2,3,4,0,0,0,0,0]

With all due respect to my esteemed colleagues David Kastrup and David
Fanning, I believe the fastest method is as follows:

IDL> a = findgen(10)
IDL> print, ((a lt 5) or (a gt 10)) * a
0 1 2 3 4 0 0 0 0 0

Love those Boolean operators....

Cheers,
Liam.

---
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
1225 W. Dayton St., Madison WI 53706, USA
Phone (608) 265-5358, Fax (608) 262-5974
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL(rsi) + FORTRAN(digital) + DLL(windows nt)
Next Topic: behavior of arrays

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

Current Time: Sat Oct 11 20:53:27 PDT 2025

Total time taken to generate the page: 0.80086 seconds