[Insight-users] Re: hyper mesh to image

Luis Ibanez luis.ibanez at kitware.com
Tue Oct 12 09:03:05 EDT 2004


Hi Raghu,


You can convert your ITK Mesh into a vtkPolyData,
and render it using a VTK standard pipeline. You
can use the vtkCutter filter in order to cut a
thin slice of the polydata and overlay that on top
of your image.

For examples on how to convert itkMesh to polydata
please look at

    InsightApplications/Auxiliary/vtk/
                              vtk2itk.cxx
                              vtk2itkDouble.cxx

For examples on how to display an image with VTK
please look at the ImageViewer class in

    InsightApplications/DeformableModelSimplexMesh
    InsightApplications/CellularSegmentation



If you prefer to warp the image using the deformation
field, then you can use the WarpImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1WarpImageFilter.html

For examples on how to use this filter, please look
at the directory

     Insight/Examples/Registration/
                          DeformableRegistration2.cxx
                          DeformableRegistration3.cxx
                          DeformableRegistration5.cxx
                          LandmarkWarping2.cxx



Note that if you just need to look at the mesh overlaid
on top of the image, you could simply use ParaView:

          http://www.paraview.org

this is an open source and free application for generic
visualization. It opens MetaImage files and allow you
to display vector fields (among many other things).



    Regards,


       Luis



----------------------
Raghu Venkatram wrote:

> Hi Luis,
> 
> I am not sure if either ITK or VTK have this functionality,  
> I have a FEM mesh, which is deformed, represented by vertices and
> hexahedron elements, each element is defined by 8 vertices from the
> preceding vertex list. each cell also has a label which identifies it
> as gray matter, white matter, CSF etc in the brain.
> 
> I would like to view this mesh as an image in the three orthogonal
> views,  also overlay them on the original preoperative patient image,
> to highlight the modelled deformation, and also compare them to
> intraoperative IMRI images, to evaluate the deformation modelling
> technique.
> 
> 1. are there any filters to convert a mesh to an image, or should i
> create a mesh with hexahedron elements and use the physical
> coordinates of each image pixel and see as to which cell it maps to,
> using the EvaluatePosition function
> 
> 2. or should I just use the deformation field and warp the original
> patient image?
> 
> Thanks and I am sorry if this question is out of context. I turn to
> you only after exhausting all other sources.
> 
> -Raghu
> 
> 






More information about the Insight-users mailing list