13 #ifndef MODELFITFUNCTOR_POLICY_H 14 #define MODELFITFUNCTOR_POLICY_H 44 unsigned int result = 0;
46 if (m_Functor.IsNotNull() && m_ModelParameterizer.IsNotNull())
49 result = m_Functor->GetNumberOfOutputs(tempModel);
59 itkGenericExceptionMacro( <<
"Error. Functor is Null.");
69 itkGenericExceptionMacro( <<
"Error. Parameterizer is Null.");
72 m_ModelParameterizer = parameterizer;
77 return !(*
this == other);
82 return (this->m_Functor == other.m_Functor) &&
83 (this->m_ModelParameterizer == other.m_ModelParameterizer);
86 inline OutputPixelArrayType
operator()(
const InputPixelArrayType& value,
87 const IndexType& currentIndex)
const 91 itkGenericExceptionMacro( <<
"Error. Cannot process operator(). Functor is Null.");
94 if (!m_ModelParameterizer)
96 itkGenericExceptionMacro( <<
"Error. Cannot process operator(). Parameterizer is Null.");
100 m_ModelParameterizer->GenerateParameterizedModel(currentIndex);
103 OutputPixelArrayType result = m_Functor->Compute(value, parameterizedModel, initialParams);
110 FunctorConstPointer m_Functor;
111 ParameterizerConstPointer m_ModelParameterizer;
117 #endif // LEVENBERGMARQUARDTMODELFITFUNCTOR_H bool operator!=(const ModelFitFunctorPolicy &other) const
unsigned int GetNumberOfOutputs() const
std::vector< ParameterImagePixelType > InputPixelArrayType
DataCollection - Class to facilitate loading/accessing structured data.
void SetModelFitFunctor(const mitk::ModelFitFunctorBase *functor)
ModelFitFunctorBase::InputPixelArrayType OutputPixelArrayType
#define MITKMODELFIT_EXPORT
ModelFitFunctorBase::InputPixelArrayType InputPixelArrayType
mitk::ModelParameterizerBase ParameterizerType
itk::Index< 3 > IndexType
ModelFitFunctorBase::ConstPointer FunctorConstPointer
OutputPixelArrayType operator()(const InputPixelArrayType &value, const IndexType ¤tIndex) const
ParameterizerType::ConstPointer ParameterizerConstPointer
bool operator==(const ModelFitFunctorPolicy &other) const
ModelFitFunctorBase FunctorType
ModelBaseType::ParametersType ParametersType
void SetModelParameterizer(const ParameterizerType *parameterizer)