From: Leonardo Flórez-Valencia Date: Thu, 18 May 2017 20:09:04 +0000 (-0500) Subject: ... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=c2ef02d4e833b1b305a55fdb0ab5c8ed4ff18def;p=FrontAlgorithms.git ... --- diff --git a/lib/fpa/Image/SkeletonFilter.hxx b/lib/fpa/Image/SkeletonFilter.hxx index 9cb3019..7e38fa2 100644 --- a/lib/fpa/Image/SkeletonFilter.hxx +++ b/lib/fpa/Image/SkeletonFilter.hxx @@ -9,6 +9,9 @@ #include #include +#include +#include + // ------------------------------------------------------------------------- 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( );