[Insight-developers] Mesh from binary mask options

Luis Ibanez luis.ibanez at kitware.com
Tue Aug 15 12:03:38 EDT 2006


Hi Richard,

If you are already combining ITK and VTK, it will be much better
to convert your ITK binary mask to a vtkImageData and then use
the vtkContourFilter on it.


The vtkContourFilter is much better than the
itk::BinaryMask3DMeshSource.


You will find examples on how to convert itkImage to vtkImageData
in the InsightApplications/Auxiliary/vtk directory.


for example:

      itkReadITKImage3DSegmentShowVTK.cxx
      itkReadITKImageSegmentShowVTK.cxx
      itkReadITKImageShowSplineVTK.cxx
      itkReadITKImageShowVTK.cxx



    Regards,



       Luis


-----------------------
Richard Beare wrote:
> Hi everyone,
> 
> I'm using itk::BinaryMask3DMeshSource to create a mesh from a mask
> I've generated. I translate the resulting mesh to an stl file via
> itkMeshTovtkPolyData and vtkSTLWriter (and optionally
> vtkWindowedSincPolyDataFilter). Some of the masks I'm producing have
> quite fine structure - for example 1 voxel thick filaments. Naturally
> the mesh produced by the marching cubes algorithm does not include
> this sort of structure - the interpretation of such structures is
> application dependent. In my case I would like to have the filaments
> represented in the mesh as tubes. One hack that would achieve this is
> to resample the mask so that the filaments are no longer one pixel
> thick and apply the marching cubes as before. However I was wondering
> if there is any other approach. I'm not tied to stl, I just need
> something that can be imported by typical cad packages. In addition,
> if anyone can recommend a way of producing a nurbs based
> representation from (or instead of) the triangulation, I'd like to
> hear about it.
> 
> Thanks.
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 
> 




More information about the Insight-developers mailing list