Re: un-Mask?/PolyOutlineV? [message #29717] |
Thu, 07 March 2002 07:54 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
parrhasius (parrhasius@altavista.com) writes:
> I've seen this question before in the old postings, but it has not
> really been answered. Given a mask of a region or the subscripts of a
> region interior, such as returned by IDLgrROI::COMPUTEMASK() or
> POLYFILLV(), is there an easy/elegant/already-programmed way to get
> back the vertices of the bounding polygon, in connectivity order? I
> don't want the convex hull from TRIANGULATE, and CONTOUR, PATH_XY= not
> only messes up when the region goes concave but in my experience
> returns multiple vertices in the vicinity of each vertex (8 vertices
> to contour a square mask, etc.). The brute force method of returning
> all the points on the mask border in no particular order and then
> attempting to sort and reduce them just can't be the best solution,
> nor can testing every triangulated triangle to see if it actually
> contains interior points... Any ideas?
I don't know, but if you come up with something let me
know. I've been beating my brains out for two weeks
now trying to find a solution that results in evenly-
spaced points along the perimeter. Craig Markquart did
write a nice little routine for me that results in
*almost* evenly-spaced points, but it is at the end
of a brute-force approach that you obviously don't like
and I am reluctant to publish. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
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
|
|
|