[Insight-users] how to draw an itk mesh as a vtk object?

Luis Ibanez luis . ibanez at kitware . com
Thu, 25 Sep 2003 02:35:26 -0400


Hi Gwenael,


(Option A):  convert the itk::Mesh to an vtkUnstructuredGrid
    using the code in

        InsightApplications/Auxiliary/vtk/vtk2itk.cxx


(Option B): use itkImageToVTKimage for converting your
    itk binary image into a VTK image Data. Then use the
    VTK filter vtkContourFilter for extracting a VTK
    surface.


--------


(B) is a much better way to go.




Note that you may want to apply the anti-alias filter
http://www . itk . org/Insight/Doxygen/html/classitk_1_1AntiAliasBinaryImageFilter . html
before converting the ITK image to vtkImageData. This will produce
smoother surfaces.



Regards,


    Luis


------------------------
Gwenaël Guillard wrote:
> Hi,
> 
> I've got a mesh thanks to itkBinaryMaskMeshSource. Because the output is
> not an image but a mesh I can't use itkImageToVtkImageFilter.
> Does anyone have any idea?
> Thank you,
> Gwen
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>