X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FBase%2FFunctors%2FRegionGrow%2FBase.h;h=d2c37aae655ef17b808cf0f00516febad67f7c32;hb=40fb0405cfef444001429f8ba49c407ce9168a94;hp=7daf46e53fc1ddd9ad48bf1834805f701e30b4a7;hpb=6585142e69f2ff5e4fceb21320ab3795c3e82218;p=FrontAlgorithms.git diff --git a/lib/fpa/Base/Functors/RegionGrow/Base.h b/lib/fpa/Base/Functors/RegionGrow/Base.h index 7daf46e..d2c37aa 100644 --- a/lib/fpa/Base/Functors/RegionGrow/Base.h +++ b/lib/fpa/Base/Functors/RegionGrow/Base.h @@ -3,6 +3,7 @@ #include #include +#include namespace fpa { @@ -14,29 +15,36 @@ namespace fpa { /** */ - template< class _TVertex > + template< class _TVertex, class _TOutput > class Base - : public itk::Object + : public fpa::Base::Functors::VertexCostFunctionBase< _TVertex, _TOutput > { public: + typedef fpa::Base::Functors::VertexCostFunctionBase< _TVertex, _TOutput > Superclass; typedef Base Self; - typedef itk::Object Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef _TVertex TVertex; + typedef _TOutput TOutput; public: itkTypeMacro( Base, itk::Object ); + itkGetConstMacro( InsideValue, _TOutput ); + itkGetConstMacro( OutsideValue, _TOutput ); + + itkSetMacro( InsideValue, _TOutput ); + itkSetMacro( OutsideValue, _TOutput ); + public: - virtual bool Evaluate( - const TVertex& a, const TVertex& b - ) const = 0; + virtual TOutput Evaluate( const TVertex& a, const TVertex& b ) const = 0; protected: Base( ) - : Superclass( ) + : Superclass( ), + m_InsideValue( TOutput( 1 ) ), + m_OutsideValue( TOutput( 0 ) ) { } virtual ~Base( ) { } @@ -45,6 +53,10 @@ namespace fpa // Purposely not defined Base( const Self& other ); Self& operator=( const Self& other ); + + protected: + _TOutput m_InsideValue; + _TOutput m_OutsideValue; }; } // ecapseman