[Insight-users] How to retrieve the x, y, and z coordinates of points in a cell?

Luis Ibanez luis.ibanez at kitware.com
Wed Dec 10 16:13:31 EST 2008


Hi hubaoping,


1) The pointIDs used by the cell must be the
    same that are used by the mesh.

    In other words, the mesh has a list of points.

    The cell has a list of pointIDs which are integer
    numbers corresponding to the positions of the
    vertex points in the list of points held by the mesh.


2) Yes,
    I have tested the SurfaceExtraction.exe example.  :-)

    No,
    I don't think there is a logic error in
    "itkBinaryMask3DMeshSource.txx"?

    but, it is of course possible.



   Regards


      Luis


-----------------
hubaoping wrote:
> Hello, Luis,
>     Thank you for your help first! And I have another question , What's 
> the relationship between the pointID in a cell and mesh?
>      By the way, have you tested the example""SurfaceExtraction.exe"? I 
> want to know if there have a logic error in  
> "itkBinaryMask3DMeshSource.txx"?
>  
> Regards,
>     Hubaoping
>  
> 
> ÔÚ2008-12-05 03:26:27£¬"Luis Ibanez" <luis.ibanez at kitware.com> дµÀ£º
>>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
> 
> 
> 
> ------------------------------------------------------------------------
> ÍøÒ×Ãâ·ÑÓÊ£¬È«Çò×î´óµÄÖÐÎÄÃâ·ÑÓÊÏä <http://www.yeah.net>


More information about the Insight-users mailing list