polyfillv and the boundary pixels [message #37704] |
Thu, 15 January 2004 12:39 |
Bruce Bowler
Messages: 128 Registered: September 1998
|
Senior Member |
|
|
Situation, I want to find the pixels within AND on the boundry of a
polygon defined by an array of vertices. polyfillv does the "inside" and
some of the pixels on the border (see the reference guide for a brief
description of how they decide and a pointer to a more exhaustive treatise
on the subject).
Simplistic example
array = fltarr(30,30)
x = [19,20,20,19]
y = [19,19,20,20]
z = polyfillv(x,y,30,30)
z ends up with only 1 pixel in it, 589, which is (if I did the math right
:-) [19,19]. What I'd like to find in z is [589,590,619,620].
Obviously, my polygons are a little more complex than the above, some with
100 or more vertices.
Any options I missed in polyfillv? Any routine I missed that will give
just the border? Any other thoughts on how to meet my goals?
IDL 5.6, in case it matters.
Thanks!
Bruce
--
+-------------------+--------------------------------------- ------------+
Bruce Bowler | To be great is to be misunderstood. - Ralph Waldo
1.207.633.9600 | Emerson
bbowler@bigelow.org |
+-------------------+--------------------------------------- ------------+
|
|
|