[Insight-users] How to retrieve the x, y, and z coordinates of points in a cell?
Luis Ibanez
luis.ibanez at kitware.com
Thu Dec 4 14:26:27 EST 2008
Hi hubaoping
This is explained in the ITK Software Guide,
in the Data Representation chapter.
Please do the following:
A) visit all the cells of the mesh as illustrated in the example:
Insight/Examples/DataRepresentation/Mesh/Mesh1.cxx
B) Inside the loop, get the point Ids from every cell, by using
the methods:
cell.PointIdsBegin()
cell.PointIdsEnd()
C) Use the point Id that you get in order to recover the coordinates
of the actual point, by querying that point in the PointsContainer.
This is done with code such as:
PointType point = mesh->GetPoints()->GetElement( pointId );
Regards,
Luis
-------------------
hubaoping wrote:
> Hi,
> I want to iterate the cells of the mesh and draw triangles with the
> point of the cells.But how can I retrieve a point of a cells and
> retrieve the x, y, and z coordinates of points? Do the cells can use
> GetPoint() method? Dan Mueller had gave me some help and told me to use
> PointIdIterator. PointIdIterator can iterate the poindIds of a cell,but
> it's value isn't a point,and cannot retrieve the x, y, and z
> coordinates of points.
> I'm waiting for your help and thank you !
>
> Regards, Hu
>
>
> ------------------------------------------------------------------------
> ÍøÒ×Ãâ·ÑÓÊ£¬È«Çò×î´óµÄÖÐÎÄÃâ·ÑÓÊÏä <http://www.yeah.net>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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