[vtkusers] Any ideas on how to interactively select a non-regular region from a polyData surface?

agerlach agerlach at gmail.com
Wed Mar 2 11:13:38 EST 2011


All,

I have an application that requires the computation of the surface area
within a user defined region on the surface of a polyData. What I would like
the user to be able to do is "draw" the closed boundary of the region of
interest and then indicate whether they are interested in the region inside
or outside of the closed boundary. Once I have that region extracted it
should be easy to compute the surface area I need using vtkMassProperties.

So, I have a couple issues. How do you have the user create the boundary and
how do you extract the cells inside/outside the boundary.

Creating the boundary:
Currently the only solution I am aware of is to use the vtkContourWidget.
Unfortunately, the line interpolation methods available are not ideal for
this application.  vtkPolygonalSurfaceContourLineInterpolator uses the
Dijkstra algorithm which results in ragged contours (see fig 1). All the
other available interpolators, like the vtkBezierContourLineInterpolator,
results in boundaries that are not constrained to the surface of the
polyData (see fig 2). Any alternative ideas on this would be greatly
appreciated.

Extracting the cells:
Assuming I have  a method to create a closed boundary, how would I use that
to extract all the cells within that boundary? I have been looking at
vtkSelectEnclosedPoints, but that requires a closed surface, when I really
have a close contour. Could I possibly create a vtkPolygon from the boundary
points and then use vtkPolygon::PointInPolygon? This needs to be efficient
since the polyData's can easily have over a few 100k pts. 

Fig 1:
http://vtk.1045678.n5.nabble.com/file/n3406757/ContourDijkstra.jpg 

Fig 2:
http://vtk.1045678.n5.nabble.com/file/n3406757/ContourBezier.jpg 

Thanks


--
View this message in context: http://vtk.1045678.n5.nabble.com/Any-ideas-on-how-to-interactively-select-a-non-regular-region-from-a-polyData-surface-tp3406757p3406757.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list