[vtkusers] Extracting largest region works with vtkPolyDataConnectivityFilter, but not with vtkConnectivityFilter

D L lackodan at outlook.com
Fri Jun 10 09:01:32 EDT 2016

>For your final output, do you need a surface made of polygons, or do you need the voxels?

The final output should be a polygon surface, ideally the surface of the connected inner and outer skull layers (although a separate surface for each layer would also be fine).

>What was wrong with the result from using vtkMarchingCubes and vtkPolyDataConnectivityFilter?  

It still had some holes and artifacts, which I would like to remove. I wanted to close it first (using vtkImageOpenClose3D) and maybe some other morphological operations, depending on the result. I assume that these kind of image processing algorithms are best done on voxel-based data.  

>You mentioned that the image was already thresholded, so maybe vtkDiscreteMarchingCubes will give better output?

Didn't seem to make a difference in this case. Maybe I could do marching cubes, use vtkPolyDataConnectivityFilter for largest region extraction, convert that to a vtkImageData using vtkProbeFilter (with the original image as input and the output of the connectivity filter as source), do the morphological operations and then extract the surface from the result again using marching cubes? Not very elegant, but still more efficient than the alternatives. 

Kind regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160610/1f055295/attachment.html>

More information about the vtkusers mailing list