]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Filter.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Filter.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __fpa__Image__Filter__h__
7 #define __fpa__Image__Filter__h__
8
9 #include <vector>
10 #include <itkImageToImageFilter.h>
11
12 namespace fpa
13 {
14   namespace Image
15   {
16     /**
17      */
18     template< class _TInputImage, class _TOutputImage >
19     class Filter
20       : public itk::ImageToImageFilter< _TInputImage, _TOutputImage >
21     {
22     public:
23       typedef Filter Self;
24       typedef itk::ImageToImageFilter< _TInputImage, _TOutputImage > Superclass;
25       typedef itk::SmartPointer< Self >       Pointer;
26       typedef itk::SmartPointer< const Self > ConstPointer;
27
28       typedef _TInputImage TInputImage;
29       typedef _TOutputImage TOutputImage;
30
31       typedef typename TInputImage::IndexType  TVertex;
32       typedef typename TInputImage::PixelType  TInputValue;
33       typedef typename TOutputImage::PixelType TOutputValue;
34
35       typedef std::vector< TVertex > TVertices;
36
37     protected:
38       Filter( );
39       virtual ~Filter( );
40
41       virtual void GenerateInputRequestedRegion( ) override;
42       virtual void EnlargeOutputRequestedRegion( itk::DataObject* output ) override;
43
44       virtual TInputValue _GetInputValue( const TVertex& vertex ) const;
45       virtual void _SetOutputValue( const TVertex& vertex, const TOutputValue& value );
46       virtual void _ConfigureOutputs( const TOutputValue& init_value );
47       virtual TVertices _GetNeighbors( const TVertex& vertex ) const;
48     };
49
50   } // ecapseman
51
52 } // ecapseman
53
54 #ifndef ITK_MANUAL_INSTANTIATION
55 #  include <fpa/Image/Filter.hxx>
56 #endif // ITK_MANUAL_INSTANTIATION
57
58 #endif // __fpa__Image__Filter__h__
59
60 // eof - $RCSfile$