[ITK] [ITK-users] Error in itk::BinaryMask3DMeshSource when using Mesh with arbitrary CellDataType

Arnaud Gelas arnaudgelas at gmail.com
Mon Nov 23 04:03:07 EST 2015


Hi Sepide,

You are right, there is no need for this filter to call SetCellData, it 
would be great if you could submit a patch to fix it!

Have a look at

     http://www.itk.org/Wiki/ITK/Git/Develop

Best,
Arnaud

On 22.11.2015 02:47, Sepideh's Gmail wrote:
> Hello,
>
> I am facing a problem working with itk::Mesh objects. This class is templated on the TMeshTrait which itself is templated on TCellPixelType.
> Since I can define an arbitrary Cell/PointDataType for my mesh, I created an itk::Mesh with CellDataType being std::pair<int,int> without any problem.
> However, when I tried to use my mesh type as the OutputMeshType of itk::BinaryMask3DMeshSource filter I got type-casting error. Looking at itkBinaryMask3DMeshSource.hxx source code, I noticed that this filter is initializing Cell data to 0.0, meaning it assumes the CellDataType to always be castable to double (which my std::pair<> type was obviously not>.
>
> I wonder why this filter is written in away that constrains the available flexibility in itk::Mesh type.
>
> Thanks for your help in advance.
> Regards,
> Sepide
> _____________________________________
> 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.php
>
> 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://public.kitware.com/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.php

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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list