[vtkusers] Holes and inverted normal after vtkQuadricClustering

Thiago Franco Moraes tfmoraes at cti.gov.br
Tue Jan 11 12:11:11 EST 2011


Hi all,

I tried to set the number of division in X, Y and Z dimension to 50
and I get a worst result [1].

Thanks!

[1] - http://i.imgur.com/xKTsy.jpg

On Fri, Jan 7, 2011 at 2:13 PM, Thiago Franco Moraes
<tfmoraes at cti.gov.br> wrote:
> Hi all,
>
> I've been using vtkMarchingCubes to generate a vtkPolydata, but
> instead of generating polydata from the whole imagedata at once I've
> been splitting the imagedata and generating polydata from each
> imagedata part using the vtkMarchingCubes and in the final I join all
> the generated polydatas in one polydata using vtkAppendPolydata. To
> each polydata part I've been using vtkQuadricClustering to decimate
> them before join them. After the joining all polydata a
> vtkCleanPolydata and vtkPolydataNormal is used. So my pipeline is like
> this:
>
> vtkImagedata -> vtkMarchingCubes -> vtkQuadricClustering
> vtkImagedata -> vtkMarchingCubes -> vtkQuadricClustering \
> ....
>                 -> vtkAppendPolydata -> vtkCleanPolydata ->
> vtkPolydataNormals
> vtkImagedata -> vtkMarchingCubes -> vtkQuadricClustering/
>
>
> But in final the vtkPolydata has a lots of little holes ( a example in
> [1]), if I export to STL and open in Meshlab, for example, the
> polydata has a some parts with inverted normals [2]. If I don't use
> vtkQuadricClustering those problem doesn't occurs. Apparently
> vtkQuadricClustering is what generate those problems. In Marching I'm
> setting it to compute the normals, gradients and scalars. In
> vtkQuadricClustering I'm setting this way:
>
>       decimation.SetDivisionOrigin(0, 0, 0)
>       decimation.SetDivisionSpacing(imagedata.GetSpacing())
>       decimation.SetFeaturePointsAngle(120) # I teste with others
> angles too (80, 30, 45 ...)
>       decimation.UseFeaturePointsOn()
>       decimation.UseFeatureEdgesOn()
>       decimation.UseInputPointsOn()
>       decimation.UseInternalTrianglesOn()
>       decimation.CopyCellDataOn()
>
> Why vtkQuadricClustering is generating those holes and inverted the
> normals? Is there something I can do?
>
> Thanks!
>
> [1] - http://i.imgur.com/kCvxX.jpg
> [2] - http://i.imgur.com/YF1es.jpg
>



More information about the vtkusers mailing list