[Insight-users] Retrieving coordinates from BinaryMask3DMeshSource
mesh
Luis Ibanez
luis.ibanez at kitware.com
Sat May 19 17:50:20 EDT 2007
Hi Catherine,
Is is trivial to obtain the Mesh point coordinates.
MeshType::ConstPointer mesh = filter->GetOutput();
typedef MeshType::PointscContainer PointsContainer;
PointsContainer::ConstPointer points = mesh->GetPoinst();
typedef PointsContainer::PointsConstIterator PointsConstIterator;
PointsConstIterator itr = points->Begin();
PointsConstIterator end = points->End();
while( itr != end )
{
PointType point = itr.Value();
double x = point[0];
double y = point[1];
double z = point[2];
++itr;
}
These points *ARE* the point in the mesh.
That is,
These are the vertices of the faces in the Mesh.
Regards,
Luis
==========================
Catherine Peloquin wrote:
> I am using the BinaryMask3DMeshSource filter example in
> Insight/Examples/Filters/SurfaceExtraction.cxx to create an isosurface
> of a series of DICOM images. I need to retrieve the coordinates of the
> output mesh's nodes (or the vertices of the triangles formed by the
> mesh) so I can then draw the surface in Coin3D. I realize that I can
> also draw the surface in VTK, but I need to integrate the program into
> an application that uses Coin.
>
> In a previous post (located at
> http://public.kitware.com/pipermail/insight-users/2007-May/022211.html
> <http://public.kitware.com/pipermail/insight-users/2007-May/022211.html>)
> , I attempted to follow the methods of retrieving coordinates in the
> PointSet example in
> Insight/Examples/DataRepresentation/Mesh/PointSet2.cxx, but could not
> find a way to get the mesh points for the points container.
>
> How is it possible to get the x, y, and z coordinates of a mesh
> generated by the BinaryMask3DMeshSource filter?
>
> Thank you,
> Catherine Peloquin
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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