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

Home » Public Forums » archive » Re: Inside rectangle
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: Inside rectangle [message #31330] Wed, 03 July 2002 10:28 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
Using an array of structures seems cumbersome to me. If you choose to
follow this path, why not simply use a FLTARR(4, x) of corner
coordinates? An array is easily grown, and if you stick with rectangles,
you always have 4 points to put into the array. Then, you can loop
through it as much as you'd like.
It looks to me also that using rectangles is just a case of a general
ROI. IDLanROI object handles all the required data processing. All you
have to do is keep adding coordinates to it. And you don;t have to know
IDL objects to use it, it is very straightforward. It is NOT object graphics.
Cheers,
Pavel

Neil Talsania wrote:
>
> I am relatively new to IDL , and am wondering how to do the following. I
> want to be able to have user input 4 corner coordiates, then check to see if
> a particular point is inside the rectangle. That is pretty easy, i think.
> But then I want to be able to add additional sets of coordinates to check. I
> want this to be unlimited. Basically allowing the user to add rectangles to
> check until he is ready to stop.
>
> Now I think I want to make a structure to hold the 4 corner coordinates.
> Then I need to create an array of these structures, but I want that array to
> be able to grow. Then I will loop through that array (For loop) calling a
> function that will check to see if the point is inside the coordinates.
>
> So the crux of my problem ( I think) is that I need the array size to
> increase every time the user adds a set. But I dont know ho to do this.
>
> Any clues would be greatly appreciated.
>
> Neil
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2D version of curvefit... ?
Next Topic: gamma correction

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

Current Time: Sun Oct 12 09:17:55 PDT 2025

Total time taken to generate the page: 1.51579 seconds