#define __fpa__Base__Algorithm__h__
#include <fpa/Config.h>
-
+#include <itkConceptChecking.h>
#include <itkObject.h>
-#include <itkEventObject.h>
namespace fpa
{
{
/**
*/
- template< class _TTraits >
+ template< class _TFilter, class _TMarks, class _TSeeds >
class Algorithm
- : public _TTraits::TFilter,
- public _TTraits::TMarksInterface,
- public _TTraits::TSeedsInterface
+ : public _TFilter, public _TMarks, public _TSeeds
{
public:
- 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;
-
- /**
- */
- class TEvent
- : public itk::EventObject
- {
- public:
- typedef TEvent Self;
- typedef itk::EventObject Superclass;
-
- public:
- TEvent( );
- TEvent( const TVertex& v, unsigned long fid, bool intoq );
- virtual ~TEvent( );
- virtual const char* GetEventName( ) const override;
- virtual bool CheckEvent( const itk::EventObject* e ) const override;
- virtual itk::EventObject* MakeObject( ) const override;
-
- private:
- // Purposely not implemented.
- Self& operator=( const Self& other );
-
- public:
- TVertex Vertex;
- unsigned long FrontId;
- bool IntoQueue;
- };
+ typedef _TMarks TMarksInterface;
+ typedef _TSeeds TSeedsInterface;
+ typedef _TFilter Superclass;
+ typedef Algorithm Self;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ typedef typename _TMarks::TTraits TTraits;
+ fpa_Base_TraitTypes( typename TTraits );
+
+ private:
+ itkConceptMacro(
+ Marks_and_Seeds_SameTraits,
+ ( itk::Concept::SameType< typename _TSeeds::TTraits, TTraits > )
+ );
public:
itkTypeMacro( fpa::Base::Algorithm, _TFilter );
itkBooleanMacro( VisualDebug );
-
- itkGetConstMacro( InitValue, TOutputValue );
itkGetConstMacro( VisualDebug, bool );
+ itkSetMacro( VisualDebug, bool );
+ itkGetConstMacro( InitValue, TOutputValue );
itkSetMacro( InitValue, TOutputValue );
- itkSetMacro( VisualDebug, bool );
public:
virtual void InvokeEvent( const itk::EventObject& e );