[ITK] Get the list of Points, Edges and Cells of a Mesh

Oliveira, Rodolfo r.oliveira16 at imperial.ac.uk
Wed Sep 7 12:36:54 EDT 2016


Hi,


I need to get the list of points, edges and cells of an itk mesh to file. I have to write the points, the edges as a reference of two points' indexes and the faces as three edges' indexes.


So far I only managed to get the points from a mesh, using a point iterator and writing its value and indexes. I still haven't figure it out how to get the linking indexes of the edges and faces.


For illustration purposes, say I have a mesh containing a single triangle, defined this:


0,1 - 2 - 1,1

 |       /

 |      /

 |  1  /

 1    3

 |   /

 |  /

 | /

0,0

The structure would be like this:

Points:
1: 0,0
2: 0,1
3: 1,1

Edges:
1: 1 2 (Point 1 to Point 2)
2: 2 3
3: 3 1

Faces:
1: 1 2 3 (Edge 1, to Edge 2 and Edge 3)

This is a rather simplistic example, but there is no difference for the case of more than one triangle. But they might share some of the same indexes when neighbours.

Any help would be much appreciated!


Thanks,


Rodolfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160907/fe3426f8/attachment-0001.html>


More information about the Community mailing list