#include <itkObject.h>
#include <itkObjectFactory.h>
+#include <fpa/Base/Functors/VertexCostFunctionBase.h>
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( )
{ }
// Purposely not defined
Base( const Self& other );
Self& operator=( const Self& other );
+
+ protected:
+ _TOutput m_InsideValue;
+ _TOutput m_OutsideValue;
};
} // ecapseman