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

Home » Public Forums » archive » Re: Maximum radius of SEARCH2D/SEARCH3D
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: Maximum radius of SEARCH2D/SEARCH3D [message #34736 is a reply to message #34735] Mon, 14 April 2003 06:13 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Alexander Gro� (AlexanderGross_NOSPAM@gmx.de) writes:

> I have a question about the very useful functions SEARCH2D and SEARCH3D. Is
> it possible to limit the search for similar cells to a radius or sphere
> surrounding the pixel referred by the xpos/ypos/zpos-parameters of these
> functions? If not, is it possible to implement an algorithm (if no built-in
> function is available) that takes the indices returned by these functions an
> cut every index that lies outside a specified radius/sphere? I would
> appreciate if you could give me a hint how this algorithm may look like.

This seems fairly straightforward to me.

1. Convert indices to 2D or 3D subscripts (article here last week).
2. Calculate distance (radius) from each index to the seed point.
3. Discard if distance is greater than radius of circle or sphere.

All of this can be easily vectorized, so it soul be extremely fast.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Image Plots
Next Topic: Re: Image Plots

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

Current Time: Fri Oct 10 16:27:59 PDT 2025

Total time taken to generate the page: 2.96477 seconds