[vtkusers] Check if pixel is inside a vtkContourWidget contour?

George gcl22 at case.edu
Thu Jun 9 16:17:08 EDT 2011


Dear VTK-Users,

I'm having trouble with something that seems to be very simple.

I have a vtkImageActor that has an image I read from the hard drive.  I also
have a vtkContourWidget rendered as well.  I set the points of the
vtkContourWidget based on a segmentation algorithm we have developed, and it
is a closed contour.  The user can move the points around, and it looks
pretty sweet.

How can I check if a pixel in my image is inside or outside the
vtkContourWidget?  The best option seemed to be to use Delaunay
Triangulation to "fill" the contour, and then use vtkSelectEnclosedPoints to
check if the points are inside the contour or not.  However, for some reason
it doesn't seem to consider my triangulated contour as closed, so it doesn't
work.

Surely there's a simple way of doing this.

Thank you.

-George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110609/fec96b08/attachment.htm>


More information about the vtkusers mailing list