<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>>For your final output, do you need a surface made of polygons, or do you need the voxels?<br><br>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).<br><br><div><div dir="ltr"><div class="ecxgmail_extra"><div class="ecxgmail_quote"><div>>What was wrong with the result from using vtkMarchingCubes and vtkPolyDataConnectivityFilter?  <br></div><div><br>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.  <br><br>>You mentioned that the image was already thresholded, so maybe vtkDiscreteMarchingCubes will give better output?<br><br>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. <br><br>Kind regards,<br><br>Daniel<br></div></div></div></div></div>                                        </div></body>
</html>