1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Base__Algorithm__h__
7 #define __fpa__Base__Algorithm__h__
10 #include <itkObject.h>
13 #include <itkSmartPointer.h>
21 template< class _TFilter, class _TMarksInterface, class _TSeedsInterface >
24 public _TMarksInterface,
25 public _TSeedsInterface
28 typedef Algorithm Self;
29 typedef _TFilter Superclass;
30 typedef _TMarksInterface TMarksInterface;
31 typedef _TSeedsInterface TSeedsInterface;
32 typedef itk::SmartPointer< Self > Pointer;
33 typedef itk::SmartPointer< const Self > ConstPointer;
35 typedef typename _TMarksInterface::TOutputValue TOutputValue;
36 typedef typename _TSeedsInterface::TNode TNode;
37 typedef typename _TSeedsInterface::TSeeds TSeeds;
39 typedef std::vector< TNode > TNeighborhood;
42 itkTypeMacro( fpa::Base::Algorithm, _TFilter );
44 itkGetConstMacro( InitValue, TOutputValue );
45 itkSetMacro( InitValue, TOutputValue );
49 virtual ~Algorithm( );
51 virtual void GenerateData( ) override;
53 virtual void _ConfigureOutput( const TOutputValue& v ) = 0;
54 virtual void _QueueInit( ) = 0;
55 virtual void _QueuePush( const TNode& node ) = 0;
56 virtual unsigned long _QueueSize( ) const = 0;
57 virtual TNode _QueuePop( ) = 0;
60 // Purposely not implemented
61 Algorithm( const Self& other );
62 Self& operator=( const Self& other );
65 TOutputValue m_InitValue;
72 #ifndef ITK_MANUAL_INSTANTIATION
73 # include <fpa/Base/Algorithm.hxx>
74 #endif // ITK_MANUAL_INSTANTIATION
76 #endif // __fpa__Base__Algorithm__h__