]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Filters/Image/Interface.h
...
[FrontAlgorithms.git] / lib / fpa / Filters / Image / Interface.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Filters__Image__Interface__h__
6 #define __fpa__Filters__Image__Interface__h__
7
8 #include <fpa/Filters/Algorithm.h>
9
10 namespace fpa
11 {
12   namespace Filters
13   {
14     namespace Image
15     {
16       /**
17        */
18       template< class _TTraits >
19       class Interface
20         : public fpa::Filters::Algorithm< _TTraits >
21       {
22       public:
23         typedef _TTraits TTraits;
24         typedef typename TTraits::TInputImage  TInputImage;
25         typedef typename TTraits::TOutputImage TOutputImage;
26         typedef typename TTraits::TMarksImage  TMarksImage;
27         fpaTraitsMacro( typename TTraits );
28
29         typedef fpa::Filters::Algorithm< _TTraits > Superclass;
30         typedef Interface                           Self;
31         typedef itk::SmartPointer< Self >           Pointer;
32         typedef itk::SmartPointer< const Self >     ConstPointer;
33
34       public:
35         fpaFilterOutputMacro( Marks, TMarksImage );
36
37         itkGetConstMacro( NeighborhoodOrder, unsigned int );
38         itkSetMacro( NeighborhoodOrder, unsigned int );
39
40       protected:
41         Interface( );
42         virtual ~Interface( );
43
44         // Filter related methods
45         virtual void _AssignOutputValue( const TNode& n ) override;
46         virtual void _ConfigureOutputs( ) override;
47         virtual TInputValue _GetInputValue( const TVertex& v ) const override;
48         virtual TOutputValue _GetOutputValue( const TVertex& v ) const override;
49         virtual TNeighborhood _GetNeighbors( const TVertex& v ) const override;
50
51         // Marks related methods
52         virtual unsigned long _GetMark( const TVertex& v ) const override;
53         virtual bool _IsMarked( const TVertex& v ) const override;
54         virtual void _Mark( const TNode& n ) override;
55
56       private:
57         Interface( const Self& other );
58         Self& operator=( const Self& other );
59
60       protected:
61         unsigned int m_NeighborhoodOrder;
62       };
63
64     } // ecapseman
65
66   } // ecapseman
67
68 } // ecapseman
69
70 #ifndef ITK_MANUAL_INSTANTIATION
71 #  include <fpa/Filters/Image/Interface.hxx>
72 #endif // ITK_MANUAL_INSTANTIATION
73 #endif // __fpa__Filters__Image__Interface__h__
74 // eof - $RCSfile$