]> Creatis software - FrontAlgorithms.git/commitdiff
...
authorLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Thu, 18 May 2017 20:09:04 +0000 (15:09 -0500)
committerLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Thu, 18 May 2017 20:09:04 +0000 (15:09 -0500)
lib/fpa/Image/SkeletonFilter.hxx

index 9cb3019c85aed4ae34be9dd76d6b6cf80a080aef..7e38fa25a4fd79c07a1ab0e1dfe4cb12c0f7566a 100644 (file)
@@ -9,6 +9,9 @@
 #include <itkImageRegionIteratorWithIndex.h>
 #include <itkMinimumMaximumImageCalculator.h>
 
+#include <fpa/Image/Functors/VertexIdentity.h>
+#include <fpa/Base/Functors/InvertValue.h>
+
 // -------------------------------------------------------------------------
 template< class _TImage, class _TScalar >
 void fpa::Image::SkeletonFilter< _TImage, _TScalar >::
@@ -75,6 +78,17 @@ SkeletonFilter( )
   : Superclass( ),
     m_SeedFromMaximumDistance( false )
 {
+  typedef fpa::Image::Functors::VertexIdentity< TScalarImage, _TScalar > _TVertexFunc;
+  typedef fpa::Base::Functors::InvertValue< _TScalar, _TScalar > _TValueFunc;
+
+  typename _TVertexFunc::Pointer vertex_func = _TVertexFunc::New( );
+  typename _TValueFunc::Pointer value_func = _TValueFunc::New( );
+  value_func->SetAlpha( 1 );
+  value_func->SetBeta( 1 );
+
+  this->SetFunctor( vertex_func );
+  this->SetFunctor( value_func );
+
   this->m_DistanceMap = TDistanceMap::New( );
   this->m_DistanceMap->InsideIsPositiveOn( );
   this->m_DistanceMap->SquaredDistanceOff( );