<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7655.8">
<TITLE>DeformableMesh3DFilter with 2D images</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi all,<BR>
<BR>
I have some problems using Deformable Model.<BR>
I want to use a Deformable Model on a 2D Image.<BR>
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<BR>
<BR>
deformableModelFilter->SetGradient(gradientMapFilter->GetOutput());<BR>
<BR>
/home/edoardo/ITK/Tesi/02_Lumen_identification/src/Lumen.cxx: In function ‘int main(int, char**)’:<BR>
/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>*)’<BR>
/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> >]<BR>
<BR>
<BR>
My type's definitions are:<BR>
<BR>
const unsigned int Dimension = 2;<BR>
typedef unsigned char PixelType; <BR>
typedef itk::Image< PixelType, Dimension > ImageType;<BR>
typedef itk::Mesh< double, Dimension > MeshType; <BR>
typedef itk::CovariantVector< double, Dimension > GradientPixelType;<BR>
typedef itk::Image< GradientPixelType, Dimension > GradientImageType;<BR>
typedef itk::GradientRecursiveGaussianImageFilter< ImageType, GradientImageType > GradientFilterType;<BR>
typedef itk::GradientMagnitudeRecursiveGaussianImageFilter< ImageType, ImageType > GradientMagnitudeFilterType;<BR>
typedef itk::BinaryMask3DMeshSource< ImageType, MeshType > MeshSourceType; <BR>
typedef itk::DeformableMesh3DFilter< MeshType, MeshType > DeformableFilterType;<BR>
typedef itk::CovariantVector< double, 2 > double2DVector; <BR>
typedef itk::CovariantVector<double, 3> double3DVector;<BR>
typedef itk::PointSetToImageFilter<MeshType,ImageType> MeshFilterType;<BR>
<BR>
Is it correct?<BR>
Is it possible to use DeformableMesh3DFilter on a 2D Image?<BR>
<BR>
<BR>
Thank you for the interest<BR>
Edoardo<BR>
</FONT>
</P>
</BODY>
</HTML>