]> Creatis software - FrontAlgorithms.git/blob - libs/fpa/Image/Functors/VertexIdentity.h
716c2e7b9851cf183232ddb8466d4956b53f42c8
[FrontAlgorithms.git] / libs / fpa / Image / Functors / VertexIdentity.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __fpa__Image__Functors__VertexIdentity__h__
7 #define __fpa__Image__Functors__VertexIdentity__h__
8
9 #include <fpa/Image/Functors/VertexParentBase.h>
10
11 namespace fpa
12 {
13   namespace Image
14   {
15     namespace Functors
16     {
17       /**
18        */
19       template< class _TInputImage, class _TOutputValue >
20       class VertexIdentity
21         : public fpa::Image::Functors::VertexParentBase< _TInputImage, _TOutputValue >
22       {
23       public:
24         typedef _TInputImage                    TInputImage;
25         typedef _TOutputValue                   TOutputValue;
26         typedef VertexIdentity                  Self;
27         typedef itk::SmartPointer< Self >       Pointer;
28         typedef itk::SmartPointer< const Self > ConstPointer;
29         typedef fpa::Image::Functors::VertexParentBase< TInputImage, TOutputValue > Superclass;
30
31         typedef typename Superclass::TVertex TVertex;
32
33       public:
34         itkNewMacro( Self );
35         itkTypeMacro(
36           fpa::Image::Functors::VertexIdentity,
37           fpa::Image::Functors::VertexParentBase
38           );
39
40       public:
41         virtual TOutputValue Evaluate(
42           const TVertex& a, const TVertex& p
43           ) const override
44           {
45             return( TOutputValue( this->m_Image->GetPixel( a ) ) );
46           }
47
48       protected:
49         VertexIdentity( )
50           : Superclass( )
51           { }
52         virtual ~VertexIdentity( ) { }
53
54       private:
55         VertexIdentity( const Self& other );
56         Self& operator=( const Self& other );
57       };
58
59     } // ecapseman
60
61   } // ecapseman
62
63 } // ecapseman
64
65 #endif // __fpa__Image__Functors__VertexIdentity__h__
66
67 // eof - $RCSfile$