[vtkusers] Re: Fill contours with Pixels
Goodwin Lawlor
goodwin.lawlor at ucd.ie
Wed Feb 14 11:07:30 EST 2007
Mike Jackson wrote:
> I tried again, but I still get these errors:
>
>
> Warning: In /Users/Shared/OpenSource/VTK-5.0.2/Filtering/vtkPolygon.cxx,
> line 562
> vtkPolygon (0xb300910): Degenerate polygon encountered during triangulation
>
> which means there is something wrong with my Mesh? I am including an
> image of my Mesh with the areas that need to be filled in outlined in
> Blue. This was Done with ParaView. Note that some of the "holes"
> traverse different planes, and some "holes" have more "holes" within them.
>
>
> ------------------------------------------------------------------------
Hi Mike,
If your surface mesh is the output of a contouring operation on a
volume, the you may be able to circumvent triangulating the boundary
loops by padding the volume by one voxel in each direction with the
background value (another poster suggested just this...). This is the
best and easiest way.
If you don't have the original volume and can only triangulate, here are
a couple of things that could be going wrong:
1. vtkStripper is hitting its "MaximumLength" ... just increase this var.
2. Sometimes vtkStripper will output two or more polylines from a
connected series of input lines, instead of just one. This is a bug, see
here: http://www.vtk.org/Bug/bug.php?op=show&bugid=832
3. Maybe vtkTriangleFilter isn't up for the job (not sure it works on
concave polygons). You could try vtkDelaunay2D or try to resurrect
vtkGLUTesselatorTriangleFilter - see here:
http://public.kitware.com/pipermail/vtkusers/2005-August/081302.html
http://public.kitware.com/cgi-bin/viewcvs.cgi/Hybrid/Attic/vtkGLUTesselatorTriangleFilter.cxx?view=markup
4. If all else fails, you could try using the boundary loops to clip a
planar grid (that would have been the boundary of the volume) with
vtkSelectPolyData. vtkSelectPolyData expects a loop without coincident
first and last points so you can't feed it the boundary loops
directly... I can send you some c++ code I have to deal with this.
hth
Goodwin
More information about the vtkusers
mailing list