<br>Hi Edoardo,<br><br>No, it is not possible to use the<br>DeformableMesh3DFilter in a 2D Image.<br><br>You may want to consider using LevelSets <br>instead of using deformable models.<br><br><br> Regards,<br><br><br> Luis<br>
<br><br>------------------------------------------------------------------<br><div class="gmail_quote">On Sun, Apr 25, 2010 at 9:24 AM, <span dir="ltr"><<a href="mailto:edoardo.belletti@alice.it">edoardo.belletti@alice.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
<div>
<br>
<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>
<br>
</font>
</p>
</div>
</div></div><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>