[vtkusers] Re: artifacts with vtkMarchingCubes

Nadine Kempe n.kempe at gmx.net
Fri Feb 22 19:55:15 EST 2008


Hi Goodwin,

Thanks a lot! The Connectivity Filter worked fine, exactly what I needed! (the other two proposals did not bring any change to the artifacts).

You made my day ;)

Have a nice weekend!
Nadine

> > I have a problem with vtkMarchingCubes. I try to render a segmented
> heart in a vtkImageData. This  means, the imageData only contains 0 for
> background and 1 for heart. My code looks like this:
> > 
> > vtkMarchingCubes *iso = vtkMarchingCubes::New();
> >   
> > iso->SetInput(imageData);
> > iso->SetNumberOfContours(1);
> > iso->SetValue(0, 1.0);  
> > iso->Update();
> <snip>
> 
> Hi Nadine,
> 
> Its hard to tell what's happening without seeing your data but you can
> try:
> 
> 1. Using vtkDiscreteMarchingCubes instead of vtkMarchingCubes. Its 
> designed for labelled volumes like the one you have.
>
> 2. Using vtkConnectivityFilter after the isoextraction with the method 
> SetExtractionModeToLargestRegion to get rid of the artifacts.
> 
> 3. If you want to stick with vtkMarchingCubes set the contour value to 
> 0.5 - half-way between the label values. Setting the value to 1.0 
> extracts the voxel surfaces whereas 0.5 extracts the surface between the 
> voxels.
> 
> hth
> 
> Goodwin
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger



More information about the vtkusers mailing list