--- /dev/null
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+#ifndef __fpa__Filters__Image__Algorithm__h__
+#define __fpa__Filters__Image__Algorithm__h__
+
+#include <itkImage.h>
+
+namespace fpa
+{
+ namespace Filters
+ {
+ namespace Image
+ {
+ /**
+ */
+ template< class _TBaseAlgorithm >
+ class Algorithm
+ : public _TBaseAlgorithm
+ {
+ public:
+ typedef _TBaseAlgorithm TBaseAlgorithm;
+ typedef typename TBaseAlgorithm::TTraits TTraits;
+ fpaTraitsMacro( typename, TTraits );
+
+ typedef TBaseAlgorithm Superclass;
+ typedef Algorithm Self;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ typedef typename TTraits::TInputImage TInputImage;
+ typedef typename TTraits::TOutputImage TOutputImage;
+ typedef itk::Image< TMark, Self::Dimension > TMarksImage;
+
+ public:
+ itkTypeMacro( fpa::Filters::Image::Algorithm, TBaseAlgorithm );
+
+ itkGetConstMacro( NeighborhoodOrder, unsigned int );
+ itkSetMacro( NeighborhoodOrder, unsigned int );
+
+ fpaFilterOutputMacro( Marks, TMarksImage );
+
+ protected:
+ Algorithm( );
+ virtual ~Algorithm( );
+
+ virtual void _ConfigureOutputs( ) override;
+ virtual TInputValue _GetInputValue( const TVertex& v ) const override;
+ virtual TOutputValue _GetOutputValue( const TVertex& v ) const override;
+ virtual TNeighborhood _GetNeighbors( const TVertex& v ) const override;
+ virtual void _UpdateOutputValue( TNode& n ) override;
+ virtual unsigned long _GetMark( const TVertex& v ) const override;
+ virtual bool _IsMarked( const TVertex& v ) const override;
+ virtual void _Mark( const TVertex& v, unsigned long m ) override;
+
+ private:
+ // Purposely not implemented.
+ Algorithm( const Self& other );
+ Self& operator=( const Self& other );
+
+ protected:
+ unsigned int m_MarksIdx;
+ unsigned int m_NeighborhoodOrder;
+ };
+
+ } // ecapseman
+
+ } // ecapseman
+
+} // ecapseman
+
+#ifndef ITK_MANUAL_INSTANTIATION
+# include <fpa/Filters/Image/Algorithm.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+#endif // __fpa__Filters__Image__Algorithm__h__
+// eof - $RCSfile$