[Insight-users] itk::Mesh and itk::QuadEdgeMesh converter

Alexandre GOUAILLARD agouaillard at gmail.com
Fri Sep 9 08:47:12 EDT 2011


dear gao yi,

an itk:QuadEdgeMesh is an itk:Mesh. You can pass the pointer to the
itk:Pointset directly (sharing memory), then you can just make one
loop on the cell container (and equivalent data) to feed your itk:Mesh
with the cells. There is a little bit of magic to do as the cells
types are a little bit different but nothing fancy. Namely, in a
QEMesh cells are polygons and do not differentiate from triangles,
quads or others. In your case, if you know it s triangular, then it s
easier.

Any reason you want to change it to itk:Mesh by the way? QEMesh API is
supposedly 100% compatible with Mesh, so if there is a limitation,
please let me know.

What is your specific problem? If you re at miccai, we can take a look
at it together, otherwise I can give a hand by e-mail.

alex.


On Fri, Sep 9, 2011 at 8:29 PM, Gao, Yi <gaoyi.cn at gmail.com> wrote:
> Dear list,
>
> I'm trying to convert a triangular 2D mesh (all in memory, not in
> file) from itk::QuadEdgeMesh to itk::Mesh (or to VTK polydata).
>
> The itkVTKPolyDataReader and writer can do this... but I will need to
> write to file and then load, which does seem to be the optimal
> solution. :)
>
> I googled but didn't find such a solution, could I get any hint?
>
> Thank you in advance for the help!
>
> Best,
> yi
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list