- namespace Functors
- {
- /**
- */
- template< class VV, class C >
- class CastVertexValueToCost
- : public itk::FunctionBase< VV, C >
- {
- public:
- // Type-related and pointers
- typedef CastVertexValueToCost Self;
- typedef itk::FunctionBase< VV, C > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkNewMacro( Self );
- itkTypeMacro( CastVertexValueToCost, itkFunctionBase );
-
- public:
- virtual C Evaluate( const VV& v ) const
- { return( C( v ) ); }
-
- protected:
- CastVertexValueToCost( )
- : Superclass( )
- { }
- virtual ~CastVertexValueToCost( )
- { }
-
- private:
- // Purposely not implemented
- CastVertexValueToCost( const Self& );
- void operator=( const Self& );
- };
-
- /**
- */
- template< class VV, class C >
- class CastVertexValueToConstantCost
- : public itk::FunctionBase< VV, C >
- {
- public:
- // Type-related and pointers
- typedef CastVertexValueToConstantCost Self;
- typedef itk::FunctionBase< VV, C > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkNewMacro( Self );
- itkTypeMacro( CastVertexValueToConstantCost, itkFunctionBase );
-
- public:
- virtual C Evaluate( const VV& v ) const
- { return( C( 1 ) ); }
-
- protected:
- CastVertexValueToConstantCost( )
- : Superclass( )
- { }
- virtual ~CastVertexValueToConstantCost( )
- { }
-
- private:
- // Purposely not implemented
- CastVertexValueToConstantCost( const Self& );
- void operator=( const Self& );
- };
-
- } // ecapseman
-