1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Functors__Dijkstra__Image__Identity__h__
6 #define __fpa__Functors__Dijkstra__Image__Identity__h__
8 #include <fpa/Functors/VertexFunction.h>
20 template< class _TImage, class _TValue >
22 : public fpa::Functors::VertexFunction< typename _TImage::IndexType, _TValue >
25 typedef _TImage TImage;
26 typedef _TValue TValue;
27 typedef typename TImage::IndexType TVertex;
28 typedef fpa::Functors::VertexFunction< TVertex, TValue > Superclass;
29 typedef Identity Self;
30 typedef itk::SmartPointer< Self > Pointer;
31 typedef itk::SmartPointer< const Self > ConstPointer;
36 fpa::Functors::Dijkstra::Image::Identity,
37 fpa::Functors::VertexFunction
41 virtual TValue Evaluate( const TVertex& v, const TVertex& p ) const override
44 dynamic_cast< const TImage* >(
45 this->m_DataObject.GetPointer( )
48 return( TValue( image->GetPixel( v ) ) );
50 return( TValue( -1 ) );
63 // Purposely not implemented.
64 Identity( const Self& other );
65 Self& operator=( const Self& other );
76 #endif // __fpa__Functors__Dijkstra__Identity__h__