[ITK] Get the list of Points, Edges and Cells of a Mesh
Matt McCormick
matt.mccormick at kitware.com
Wed Sep 7 16:30:18 EDT 2016
Hi Rodolfo,
Here is an example of how to manually create a mesh:
https://itk.org/ITKExamples/src/Core/QuadEdgeMesh/CreateTriangularQuadEdgeMesh/Documentation.html
HTH,
Matt
On Wed, Sep 7, 2016 at 12:36 PM, Oliveira, Rodolfo
<r.oliveira16 at imperial.ac.uk> wrote:
> 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
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
More information about the Community
mailing list