X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FBase%2FAlgorithm.h;fp=lib%2Ffpa%2FBase%2FAlgorithm.h;h=0000000000000000000000000000000000000000;hb=3c639e5da479c7216a0a302ffa156ac6762caeed;hp=785b818ea8be76bdf3290896cf8c95f63b41bf55;hpb=5bf766068f54d061d3816f4950a076c3cf3a4d8b;p=FrontAlgorithms.git diff --git a/lib/fpa/Base/Algorithm.h b/lib/fpa/Base/Algorithm.h deleted file mode 100644 index 785b818..0000000 --- a/lib/fpa/Base/Algorithm.h +++ /dev/null @@ -1,128 +0,0 @@ -// ========================================================================= -// @author Leonardo Florez Valencia -// @email florez-l@javeriana.edu.co -// ========================================================================= - -#ifndef __fpa__Base__Algorithm__h__ -#define __fpa__Base__Algorithm__h__ - -#include - -#include -#include - -namespace fpa -{ - namespace Base - { - /** - */ - template< class _TTraits > - class Algorithm - : public _TTraits::TFilter, - public _TTraits::TMarksInterface, - public _TTraits::TSeedsInterface - { - 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; - }; - - public: - itkTypeMacro( fpa::Base::Algorithm, _TFilter ); - - itkBooleanMacro( VisualDebug ); - - itkGetConstMacro( InitValue, TOutputValue ); - itkGetConstMacro( VisualDebug, bool ); - - itkSetMacro( InitValue, TOutputValue ); - itkSetMacro( VisualDebug, bool ); - - public: - virtual void InvokeEvent( const itk::EventObject& e ); - virtual void InvokeEvent( const itk::EventObject& e ) const; - - protected: - Algorithm( ); - virtual ~Algorithm( ); - - virtual void GenerateData( ) override; - virtual void _BeforeGenerateData( ); - virtual void _AfterGenerateData( ); - virtual void _FinishOneLoop( ); - - virtual void _QueueInit( ); - - virtual void _ConfigureOutput( const TOutputValue& v ) = 0; - virtual TNeighborhood _GetNeighbors( const TVertex& v ) const = 0; - virtual TInputValue _GetInputValue( const TVertex& v ) const = 0; - virtual TOutputValue _GetOutputValue( const TVertex& v ) const = 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; - virtual TNode _QueuePop( ) = 0; - - private: - // Purposely not implemented - Algorithm( const Self& other ); - Self& operator=( const Self& other ); - - protected: - bool m_VisualDebug; - TOutputValue m_InitValue; - }; - - } // ecapseman - -} // ecapseman - -#ifndef ITK_MANUAL_INSTANTIATION -# include -#endif // ITK_MANUAL_INSTANTIATION - -#endif // __fpa__Base__Algorithm__h__ - -// eof - $RCSfile$