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