[Insight-users] DeformableMesh3DFilter with 2D images

edoardo.belletti at alice.it edoardo.belletti at alice.it
Sun Apr 25 09:24:20 EDT 2010


Hi all,

I have some problems using Deformable Model.
I want to use a Deformable Model on a 2D Image.
I tried to use the exaple: Examples/Segmentation/DeformableModel1.cxx. to implement a DeformableMesh3DFilter on a 2D Image and I had an error at this line

deformableModelFilter->SetGradient(gradientMapFilter->GetOutput());

/home/edoardo/ITK/Tesi/02_Lumen_identification/src/Lumen.cxx: In function ‘int main(int, char**)’:
/home/edoardo/ITK/Tesi/02_Lumen_identification/src/Lumen.cxx:668: error: no matching function for call to ‘itk::DeformableMesh3DFilter<itk::Mesh<double, 2u, itk::DefaultStaticMeshTraits<double, 2u, 2u, float, float, double> >, itk::Mesh<double, 2u, itk::DefaultStaticMeshTraits<double, 2u, 2u, float, float, double> > >::SetGradient(itk::Image<itk::CovariantVector<double, 2u>, 2u>*)’
/usr/local/include/InsightToolkit/Algorithms/itkDeformableMesh3DFilter.h:139: note: candidates are: void itk::DeformableMesh3DFilter<TInputMesh, TOutputMesh>::SetGradient(typename itk::Image<itk::CovariantVector<typename TInputMesh::PixelType, 3u>, 3u>::Pointer) [with TInputMesh = itk::Mesh<double, 2u, itk::DefaultStaticMeshTraits<double, 2u, 2u, float, float, double> >, TOutputMesh = itk::Mesh<double, 2u, itk::DefaultStaticMeshTraits<double, 2u, 2u, float, float, double> >]


My type's definitions are:

const unsigned int Dimension = 2;
typedef unsigned char PixelType;  
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::Mesh< double, Dimension >     MeshType;  
typedef itk::CovariantVector< double, Dimension >  GradientPixelType;
typedef itk::Image< GradientPixelType, Dimension > GradientImageType;
typedef itk::GradientRecursiveGaussianImageFilter< ImageType, GradientImageType > GradientFilterType;
typedef itk::GradientMagnitudeRecursiveGaussianImageFilter< ImageType, ImageType > GradientMagnitudeFilterType;
typedef itk::BinaryMask3DMeshSource< ImageType, MeshType >  MeshSourceType;  
typedef itk::DeformableMesh3DFilter< MeshType, MeshType >  DeformableFilterType;
typedef itk::CovariantVector< double, 2 > double2DVector;  
typedef itk::CovariantVector<double, 3> double3DVector;
typedef itk::PointSetToImageFilter<MeshType,ImageType> MeshFilterType;

Is it correct?
Is it possible to use DeformableMesh3DFilter on a 2D Image?


Thank you for the interest
Edoardo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100425/589a280e/attachment.htm>


More information about the Insight-users mailing list