[Insight-users] Copy Mesh Points and Cells to QuadEdgeMesh using MeshToMeshFilter

Stefan Dänzer stefan.daenzer at gmail.com
Tue Dec 14 07:40:06 EST 2010


Wanlin,

thanks for the clarification. I was unaware of
the QuadEdgeMeshToQuadEdgeMeshFilter not calling the copy functions.

Thanks,

Stefan

On Tue, Dec 14, 2010 at 12:38 AM, wanlin <wanlinzhu at gmail.com> wrote:

> Hi, Stefan,
>        Those filters are defined as base classes for mesh filters. They
> provide copyMesh methods but do not call them. If you need a copier. Just
> derived a class from them.
> For instance if your input and out are QuadEdgeMesh. You could define a
> CopyQuadEdgeMesh filter, looks like
>
> #ifndef __itkCopyQuadEdgeMeshFilter_h
> #define __itkCopyQuadEdgeMeshFilter_h
> #include "itkQuadEdgeMeshToQuadEdgeMeshFilter.h"
>
> namespace itk
> {
> template<typename TInputMesh, typename TOutputMesh>
> class CopyQuadEdgeMeshFilter : public
> QuadEdgeMeshToQuadEdgeMeshFilter<TInputMesh, TOutputMesh>
> {
> public:
>     typedef CopyQuadEdgeMeshFilter    Self;
>     typedef QuadEdgeMeshToQuadEdgeMeshFilter<TInputMesh, TOutputMesh>
> Superclass;
>     typedef SmartPointer<Self>        Pointer;
>
>     itkNewMacro(Self);
> protected:
>     void GenerateData()
>     {
>         this->CopyMeshToMesh(this->GetInput(), this->GetOutput());
>     }
> };
>
> }//namespace itk end
> #endif
>
>
> The class will make a deep copy.
>
>
>
> wanlin
>
> On Tue, Dec 14, 2010 at 4:04 AM, Stefan Dänzer <stefan.daenzer at gmail.com>wrote:
>
>> Arnaud,
>>
>> I'm computing normals for a given mesh and want to make a deep copy of
>> that mesh afterwards.
>>
>> stefan
>>
>>
>> On Mon, Dec 13, 2010 at 5:52 PM, Arnaud GELAS <
>> arnaud_gelas at hms.harvard.edu> wrote:
>>
>>>  Stefan,
>>>
>>> I am not sure to understand what you are trying to do.
>>>
>>> Do you want to copy information from one mesh to another mesh?
>>> Do you want to compute normals for one given mesh?
>>>
>>> Can you give us more information please?
>>>
>>> Thanks,
>>> Arnaud
>>>
>>>
>>>
>>> On 12/13/2010 11:50 AM, Stefan Dänzer wrote:
>>>
>>> hi all,
>>>
>>>  thanks for your reply. I have built my application after what was given
>>> in the test whih Arnaud pointed me to. But it seems that a type of
>>> itk::Vector<double, 3> which is called for by
>>> the QuadEdgeMeshNormalFilter is not supported by the QuadEdgeMeshToQuadEdgeMeshFilter.
>>> Is there another convenient way to copy a quadEdgeMesh in itk wihtout having
>>> to iterate over points and cells of the mesh manually?
>>>
>>>  stefan
>>>
>>> On Mon, Dec 13, 2010 at 5:39 PM, David Doria <daviddoria at gmail.com>wrote:
>>>
>>>> On Mon, Dec 13, 2010 at 11:21 AM, Arnaud GELAS
>>>> <arnaud_gelas at hms.harvard.edu> wrote:
>>>> > Hi Stefan,
>>>> >
>>>>  > You can have a look at the test for Normal Filter located in
>>>> > Testing/Code/Review/itkQuadEdgeMeshNormalFilterTest.cxx (if you use
>>>> ITK
>>>> > 3.20)
>>>> > or Testing/Code/Algorithm/itkQuadEdgeMeshNormalFilterTest.cxx (if you
>>>> use
>>>> > the git version).
>>>> >
>>>> > I think it would be useful to make an example on the wiki (similar to
>>>> the
>>>> > link I sent you before). It would benefit to everyone!
>>>> >
>>>> > HTH,
>>>> > Arnaud
>>>>
>>>>  I have created a blank example here:
>>>> http://www.itk.org/Wiki/ITK/Examples/Meshes/QuadEdgeMeshNormalFilter
>>>>
>>>> to make it easy for you to just fill it in :)
>>>>
>>>> David
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Stefan Daenzer
>>> Körnerplatz 8
>>> 04107 Leipzig
>>>
>>> Tel.: +49-157-84993879
>>>
>>> "Work like you don't need the money, love like you've never been hurt and
>>> dance like no one is watching." - Randall G Leighton
>>>
>>>
>>>
>>
>>
>> --
>> --
>> Stefan Daenzer
>> Körnerplatz 8
>> 04107 Leipzig
>>
>> Tel.: +49-157-84993879
>>
>> "Work like you don't need the money, love like you've never been hurt and
>> dance like no one is watching." - Randall G Leighton
>>
>> _____________________________________
>> 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
>>
>>
>


-- 
--
Stefan Daenzer
Körnerplatz 8
04107 Leipzig

Tel.: +49-157-84993879

"Work like you don't need the money, love like you've never been hurt and
dance like no one is watching." - Randall G Leighton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101214/91f28b20/attachment.htm>


More information about the Insight-users mailing list