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

Arnaud Gelas arnaud_gelas at hms.harvard.edu
Fri Sep 9 09:48:12 EDT 2011


Hi Yi,

Have you tried using your converter directly with QuadEdgeMesh instead 
of itk::Mesh ?

Arnaud

On 09/09/2011 09:32 AM, Gao, Yi wrote:
> Dear Alex,
>
> Thank you for the reply!
>
> I'm trying to use the smoothing filter Arnaud and you contributed. The
> triangles it gives are much better shaped than the vtk's windowed sinc
> filter!
>
> But my main pipeline is in VTK so in fact I want to convert from
> vtkPolyData with QE mesh. Since I have converter between vtkPolyData
> <-->  itk::Mesh, then the missing step is itk::Mesh<-->QE mesh. That
> is where the problem comes from. :)
>
> So I'll just get an itk::Mesh and feed it to the smoothing filter for
> QE mesh, I will try that out!
>
> Thanks again! :)
>
> Best,
> yi
>
> On Fri, Sep 9, 2011 at 8:47 AM, Alexandre GOUAILLARD
> <agouaillard at gmail.com>  wrote:
>> 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
>>>
> _____________________________________
> 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