From c2ef02d4e833b1b305a55fdb0ab5c8ed4ff18def Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leonardo=20Fl=C3=B3rez-Valencia?= Date: Thu, 18 May 2017 15:09:04 -0500 Subject: [PATCH] ... --- lib/fpa/Image/SkeletonFilter.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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( ); -- 2.47.1