[Insight-users] BinaryMask

Luis Ibanez luis.ibanez at kitware.com
Tue May 20 10:13:43 EDT 2008


Hi Josiane,


Please read the ITK Software Guide

      http://www.itk.org/ItkSoftwareGuide.pdf

In particular section: 4.3 "Mesh" in pdf-page 94.

You will find examples on how to access the coordinates
of the Mesh points in page 96.


The source code example that you should look at is


    Insight/Examples/DataRepresentation/Mesh/Mesh1.cxx


in particular, lines 198-224:


   PointsIterator  pointIterator = mesh->GetPoints()->Begin();

   PointsIterator end = mesh->GetPoints()->End();
   while( pointIterator != end )
     {
     MeshType::PointType p = pointIterator.Value();
     std::cout << p << std::endl;
     ++pointIterator;
     }


That, being said,...

Please note that if you want to proceed to perform ICP
(Iterative Closest Point), you *do not* need to manually
extract the point coordinates from the Mesh that is
produced from the BinaryMask3DMeshSource filter.


A Mesh derives from the PointSet class, and the input
to the ICP code is two PointSets.  This means that you
can simply plug the Mesh as input to the ICP registration.


Something like:

   registrationICP->SetFixedPointSet(
      binaryMask3DMeshSource->GetOutput() );



   Regards,


      Luis



-----------------------------
Yankam Njiwa Josiane Adrienne wrote:
>  
> Dear all,
>  
> I am back with another problem. I ran the test example itkBinaryMask3DMeshSourceTest.cxx, after it i have the number of cells and nodes of the mesh. My question is about a speciific image: How can i create and get the coordinates of mesh by presenting in entry a binary image? My aim is to use these point coordinates in the iterative closestPoint registration framework.
>  
> Could somebody give me some help please?
>  
> Regards,
>  
> Josiane.
> _______________________________________________
> 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