19 #ifndef __itkFunctorTableBase_h 20 #define __itkFunctorTableBase_h 22 #include "itkObject.h" 23 #include "itkObjectFactory.h" 37 template <
class TFunctor,
class TParameters,
class TFunctorValue >
67 const FunctorType &
GetFunctor()
const {
return m_Functor; }
77 if ( m_Functor != functor )
105 return m_Functor(param);
121 typename LightObject::Pointer loPtr = Superclass::InternalClone();
122 typename Self::Pointer rval =
dynamic_cast<Self *
>(loPtr.GetPointer());
125 itkExceptionMacro(<<
"downcast to type " << this->GetNameOfClass()<<
" failed.");
127 rval->m_Functor = m_Functor;
135 void operator=(
const Self&);
std::vector< double > STDVectorType
virtual ~FunctorTableBase()
LightObject::Pointer InternalClone() const ITK_OVERRIDE
const FunctorType & GetFunctor() const
FunctorValueType GetFunctionValue(const ParametersType ¶m)
virtual void Initialize()
SmartPointer< Self > Pointer
unsigned long GetTableSize() const
TFunctorValue FunctorValueType
SmartPointer< const Self > ConstPointer
void SetFunctor(const FunctorType &functor)
bool IsTableBuilt() const
FunctorType & GetFunctor()
utl_shared_ptr< STDVectorType > STDVectorPointer
TParameters ParametersType
use FunctorTableBase to accelerate evaluation of functions.