Discussion:
[ITK-users] Problem calculating surface ITK mesh
Elisabeth Pfaehler
2018-05-05 06:09:11 UTC
Dear all,

I am facing a problem calculating the surface of an ITK mesh.
Originally I have an image mask and converted this mask to a triangle mesh.
In order to calculate the surface, I wanted to convert this mesh to a
simplex mesh using:

typedef itk::SimplexMesh< float, 3 > TSimplex;
typedef itk::TriangleMeshToSimplexMeshFilter< MeshType, TSimplex >
TConvert;

// Convert the triangle mesh to a simplex mesh.
TConvert::Pointer convert = TConvert::New();
convert->SetInput(meshSource->GetOutput());
convert->Update();

As I found it in one example. But in this case my software starts
calculating and never stops.

So, now I tried to calculate the surface of every cell and add these
surfaces. But is there maybe another, nicer way?

Elli
Dženan Zukić
2018-05-06 15:49:05 UTC
Hi Elisabeth,

you could try using BinaryImageToStatisticsLabelMapFilter
<https://itk.org/Doxygen/html/classitk_1_1BinaryImageToStatisticsLabelMapFilter.html>
or some other filter from the same group
<https://itk.org/Doxygen/html/group__ITKLabelMap.html>. The feature you
want to pay attention to is 'perimeter'.

Regards,
DÅŸenan
Post by Elisabeth Pfaehler
Dear all,
I am facing a problem calculating the surface of an ITK mesh.
Originally I have an image mask and converted this mask to a triangle
mesh. In order to calculate the surface, I wanted to convert this mesh to a
typedef itk::SimplexMesh< float, 3 > TSimplex;
typedef itk::TriangleMeshToSimplexMeshFilter< MeshType, TSimplex >
TConvert;
// Convert the triangle mesh to a simplex mesh.
TConvert::Pointer convert = TConvert::New();
convert->SetInput(meshSource->GetOutput());
convert->Update();
As I found it in one example. But in this case my software starts
calculating and never stops.
So, now I tried to calculate the surface of every cell and add these
surfaces. But is there maybe another, nicer way?