[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Area of interest [AOI or ROI] routine
- Subject: Re: Area of interest [AOI or ROI] routine
- From: davidf(at)dfanning.com (David Fanning)
- Date: Thu, 27 Apr 2000 11:55:29 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <39087A56.EF4582CF@fsl.orst.edu>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:19424
Joe Means (means@fsl.orst.edu) writes:
> I would like to find a routine for determining if a point is in a region
> of interest. I realize this functionality exists in the IDL object
> graphic routines. I'll take the time to learn how to use these if I
> have to, but would prefer not to :), if someone knows of a routine I
> can use.
Gosh, Joe, I have the flu today, but even in my condition I can
figure this one out. :-)
(1) Get your ROI points in direct graphics. You could
use something as simple as my rubberband box in
ZIMAGE. You probably have several programs laying
around there now.
(2) Create an IDLanROI object and load the points.
roi = Obj_New('IDLanROI', x, y, z)
IF you don't have a z point, don't worry about it,
just use the x and y points.
(3) Find out if the point you are interested is inside
the ROI:
isIn = roi->ContainsPoints(x1, y1, z1)
(4) Destroy the object.
Obj_Destroy, roi
That's it. I'm going back to bed. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155