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

Home » Public Forums » archive » Re: Number of points within a rectangular region
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: Number of points within a rectangular region [message #36838] Sat, 01 November 2003 11:13 Go to previous message
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
Have you taken a look at IDLanROI::ContainsPoints() ? That routine might be
useful for you even if you are not doing object graphics. It can tell you
if a point is exterior to a region, interior to a region, on edge or on
vertex.

-Paul Sorenson

"Isa Usman" <eepisu@bath.ac.uk> wrote in message
news:bnu9ng$10h6@newton.cc.rl.ac.uk...
> Hello,
>
> I'm trying to get the indices to the points that fall within a rectangular
> region. I'm aware of David Fanning's INSIDE routine that does this but
> because I have got 100,000 points its going to involve a lot of looping.
So
> I decided to use the HIST_ND with reverse indices but its not giving me
the
> right results. What am I missing?
>
> Thanks in advance.
>
> Isa
>
> IDL> x = [0.5,-0.5,-0.5,0.5]
>
> IDL> y = [0.5,0.5,-0.5,-0.5]
>
> IDL> z = transpose([[x],[y]])
>
> IDL> result = hist_nd(z,min = [0,0], max = [1,1], nbins = 1,
reverse_indices
> = ri)
>
> print, ri[ri[0]:ri[1]-1]
>
> 0 1 2 3
>
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: types (conflict)
Next Topic: Re: Best Path Through a Vector Field

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

Current Time: Wed Oct 08 19:51:11 PDT 2025

Total time taken to generate the page: 0.00455 seconds