[Insight-users] [Insight
users] itk::SimplexMeshToTriangleMeshFilter not exact ?
Luis Ibanez
luis.ibanez at kitware.com
Mon Jul 18 16:12:46 EDT 2005
Hi Benoit
Please read the Documentation:
http://www.itk.org/Insight/Doxygen/html/classitk_1_1SimplexMeshToTriangleMeshFilter.html
> This filter converts a 2-simplex mesh into a triangle mesh.
>
> Convert a simplex mesh into a triangle mesh. Therefore the center of
> each simplex cell is computed. These centers are taken as the points
> for the triangle mesh then the points are connected.
So,
What you observe...
is what the filter is supposed to do...
I agree with you however in that sometimes it may be desirable
to move the points along the normals of the triangles. Otherwise
a convertion from Simplex-->Triangle, followed with Triangle-->Simplex
will not return the same Mesh.
The question is:
"How much to shift along the normal ? "
If you feel audacious, you probably could make this improvement to
the filter, for this just look at the code in
Insight/Code/BasicFilters/
itkSimplexMeshToTriangleMeshFilter.txx
in the method Initialize(), in lines 49-55. You will need the
correction to be made in the values in the containter "m_Centers".
Please let us know if you need help with the changes,
Thanks,
Luis
----------------
Benoit wrote:
> Hi all !
>
> With the following lines, I don't get back the initial mesh :
>
> typename ToSimplexFilterType::Pointer simplexFilter =
> ToSimplexFilterType::New();
> typename ToTriangleFilterType::Pointer triangleFilter =
> ToTriangleFilterType::New();
>
> // connect components
> simplexFilter->SetInput( pMesh );
> triangleFilter->SetInput( simplexFilter->GetOutput() );
>
> The output of triangleFilter is inside the input mesh.
> It acts as if the vertices of the resulting mesh where considered as
> the centers of the simplex mesh's faces.
> I think there should be a correction along the vertices normal.
>
> Regards,
> Ben
> _______________________________________________
> 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