#include <fpa/Config.h>
-#include <vector>
#include <itkObject.h>
#include <itkEventObject.h>
{
/**
*/
- template< class _TFilter, class _TMarksInterface, class _TSeedsInterface >
+ template< class _TTraits >
class Algorithm
- : public _TFilter,
- public _TMarksInterface,
- public _TSeedsInterface
+ : public _TTraits::TFilter,
+ public _TTraits::TMarksInterface,
+ public _TTraits::TSeedsInterface
{
public:
- typedef Algorithm Self;
- typedef _TFilter Superclass;
- typedef _TMarksInterface TMarksInterface;
- typedef _TSeedsInterface TSeedsInterface;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- typedef typename _TSeedsInterface::TInputValue TInputValue;
- typedef typename _TSeedsInterface::TOutputValue TOutputValue;
- typedef typename _TSeedsInterface::TNode TNode;
- typedef typename _TSeedsInterface::TSeeds TSeeds;
- typedef typename _TSeedsInterface::TVertex TVertex;
-
- typedef std::vector< TVertex > TNeighborhood;
+ typedef _TTraits TTraits;
+ typedef typename TTraits::TFilter Superclass;
+ typedef typename TTraits::TMarksInterface TMarksInterface;
+ typedef typename TTraits::TSeedsInterface TSeedsInterface;
+ typedef Algorithm Self;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ typedef typename TTraits::TInputValue TInputValue;
+ typedef typename TTraits::TOutputValue TOutputValue;
+ typedef typename TTraits::TNeighborhood TNeighborhood;
+ typedef typename TTraits::TNode TNode;
+ typedef typename TTraits::TNodes TNodes;
+ typedef typename TTraits::TSeeds TSeeds;
+ typedef typename TTraits::TVertex TVertex;
/**
*/
virtual void GenerateData( ) override;
virtual void _BeforeGenerateData( );
virtual void _AfterGenerateData( );
+ virtual void _FinishOneLoop( );
virtual void _QueueInit( );
virtual TInputValue _GetInputValue( const TVertex& v ) const = 0;
virtual TOutputValue _GetOutputValue( const TVertex& v ) const = 0;
- virtual TOutputValue _ComputeOutputValue( const TNode& n ) = 0;
- virtual void _UpdateOutputValue( const TNode& n ) = 0;
+ virtual void _ComputeOutputValue( TNode& n ) = 0;
+ virtual void _UpdateOutputValue( TNode& n ) = 0;
virtual void _QueueClear( ) = 0;
virtual void _QueuePush( const TNode& node ) = 0;
virtual unsigned long _QueueSize( ) const = 0;