[Insight-users] itkSimplexMesh -->vtkUnstructuredGrid
Luis Ibanez
luis.ibanez at kitware.com
Wed Jun 16 11:19:21 EDT 2004
Hi Leila,
The main change that you should anticipate is related to the fact that
the SimplexMesh does not have triangles as 2D cells. Most of the time
the 2D cells will be hexagons and pentagons.
Note that the main interest of this Mesh representation is not the
display but the computation of the Mesh evolution. In that context
you may want to simply display the SimplexMesh in wireframe and do not
care about the 2D cells. In other words, when you adapt the code from
the vtk2itk.cxx example, just do not connect visitors for 2D cells.
By converting only the nodes and the line-edges into a VTK
representation, you will obtain a wireframe type of visualization
that will probably be good enough for supervising and monitoring
the evolution of the mesh during its deformation stages.
Once the SimplexMesh reaches a stable point, you can then convert it
to a standard triangle mesh using the filter that Thomas Bottger
kindly contributed: SimplexMeshToTriangleMesh:
http://www.itk.org/Insight/Doxygen/html/classitk_1_1SimplexMeshToTriangleMeshFilter.html
For an illustration in the complementarity of this dual-representation
you may want to look, for example, at the images in
http://www.s2.chalmers.se/research/image/Research/surgsim/summary/oldindex.html
If you want to do a full conversion of the SimplexMesh to a VTK mesh,
that will require to add Visitors for polygonal 2D cells. This is
something that you can always add at a later stage, once you get the
initial conversion of the wireframe working.
Please let us know if you find any problems,
Thanks,
Luis
-----------------------------------
Leila Baghdadi wrote:
> Hi everyone,
>
> I have already looked at
>
> InsightApplications/Auxiliary/vtk/vtk2itk.cxx
>
> for converting an itkMesh to vtkUnstructuredGrid,
>
> I am just wondering what happens when the itkMesh is already converted
> to itkSimplexMesh and now has to be converted to vtk so visualization
> purposes,
>
>
> thanks for your time
>
>
> Leila
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list