[vtkusers] How to compute area of counter made by vtkContourWidget?
normanius
juch at zhaw.ch
Wed Dec 30 19:05:47 EST 2015
Hi Yihui Cao
The "3" in the warning message refers to VTK_LINE. From this I infer that
the contour is represented with lines only (a polyline). You have to first
"transform" the line into a polyline, or
In case your contour is guaranteed to be convex, you can triangulate the
contour surface with vtkDelaunay2D. So, before calling the
vtkTriangleFilter, calculate the Delaunay triangulation on your contour
edges (Python code):
If the contour is not convex, things are a bit more complicated. You can try
to transform the polyline into a polygon. Unfortunately, I haven't found a
simple trick myself. Here some ideas that might help:
http://www.itk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Polygon
<http://www.itk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Polygon>
http://vtk.1045678.n5.nabble.com/Polygon-triangulation-using-vtkPolugon-Triangulate-td1238179.html
<http://vtk.1045678.n5.nabble.com/Polygon-triangulation-using-vtkPolugon-Triangulate-td1238179.html>
--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-compute-area-of-counter-made-by-vtkContourWidget-tp5735702p5735711.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list