Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitk::ModelFitFunctorBase Class Referenceabstract

#include <mitkModelFitFunctorBase.h>

Inheritance diagram for mitk::ModelFitFunctorBase:
Collaboration diagram for mitk::ModelFitFunctorBase:

Public Types

typedef ModelFitFunctorBase Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef ScalarType ParameterImagePixelType
 
typedef std::vector< ParameterImagePixelTypeInputPixelArrayType
 
typedef std::vector< ParameterImagePixelTypeOutputPixelArrayType
 
typedef ModelBase::ParameterNamesType ParameterNamesType
 

Public Member Functions

virtual const char * GetClassName () const
 
OutputPixelArrayType Compute (const InputPixelArrayType &value, const ModelBase *model, const ModelBase::ParametersType &initialParameters) const
 
unsigned int GetNumberOfOutputs (const ModelBase *model) const
 
ParameterNamesType GetEvaluationParameterNames () const
 
void ResetEvaluationParameters ()
 
void RegisterEvaluationParameter (const std::string &parameterName, SVModelFitCostFunction *evaluationCostFunction)
 
const SVModelFitCostFunctionGetEvaluationParameterCostFunction (const std::string &parameterName) const
 
virtual ParameterNamesType GetCriterionNames () const =0
 
ParameterNamesType GetDebugParameterNames () const
 
virtual void DebugParameterMapsOn ()
 
virtual void DebugParameterMapsOff ()
 
virtual void SetDebugParameterMaps (bool _arg)
 
virtual bool GetDebugParameterMaps () const
 

Protected Types

typedef ModelBase::ParametersType ParametersType
 
typedef ModelFitCostFunctionInterface::SignalType SignalType
 
typedef std::map< std::string, ParameterImagePixelTypeDebugParameterMapType
 

Protected Member Functions

 ModelFitFunctorBase ()
 
 ~ModelFitFunctorBase () override
 
virtual OutputPixelArrayType GetCriteria (const ModelBase *model, const ParametersType &parameters, const SignalType &sample) const =0
 
OutputPixelArrayType GetDerivedParameters (const ModelBase *model, const ParametersType &parameters) const
 
OutputPixelArrayType GetEvaluationParameters (const ModelBase *model, const ParametersType &parameters, const SignalType &sample) const
 
virtual ParametersType DoModelFit (const SignalType &value, const ModelBase *model, const ModelBase::ParametersType &initialParameters, DebugParameterMapType &debugParameters) const =0
 
virtual ParameterNamesType DefineDebugParameterNames () const =0
 

Detailed Description

Definition at line 30 of file mitkModelFitFunctorBase.h.

Member Typedef Documentation

◆ ConstPointer

◆ DebugParameterMapType

Definition at line 110 of file mitkModelFitFunctorBase.h.

◆ InputPixelArrayType

◆ OutputPixelArrayType

◆ ParameterImagePixelType

◆ ParameterNamesType

◆ ParametersType

◆ Pointer

◆ Self

◆ SignalType

◆ Superclass

Definition at line 34 of file mitkModelFitFunctorBase.h.

Constructor & Destructor Documentation

◆ ModelFitFunctorBase()

mitk::ModelFitFunctorBase::ModelFitFunctorBase ( )
protected

◆ ~ModelFitFunctorBase()

mitk::ModelFitFunctorBase::~ModelFitFunctorBase ( )
overrideprotected

Member Function Documentation

◆ Compute()

OutputPixelArrayType mitk::ModelFitFunctorBase::Compute ( const InputPixelArrayType value,
const ModelBase model,
const ModelBase::ParametersType initialParameters 
) const

Returns the values determined by fitting the passed model. The values in the returned vector are ordered in the following sequence:

  • model parameters (see also GetParameterNames())
  • derived model parameters (see also GetDerivedParameterNames())
  • criterion(s) (see also GetCriterionNames())
  • evaluation parameters (see also GetEvaluationParameterNames())
    Parameters
    valueSignal the model should be fitted onto
    modelPointer to the preconfigured/ready to use model instance for the fitting against the signal curve
    initialParametersparameters of the model that should be used as starting point of the fitting process.
    Precondition
    model must point to a valid instance.
    Size of initialParameters must be equal to model->GetNumberOfParameters().

◆ DebugParameterMapsOff()

virtual void mitk::ModelFitFunctorBase::DebugParameterMapsOff ( )
virtual

◆ DebugParameterMapsOn()

virtual void mitk::ModelFitFunctorBase::DebugParameterMapsOn ( )
virtual

◆ DefineDebugParameterNames()

virtual ParameterNamesType mitk::ModelFitFunctorBase::DefineDebugParameterNames ( ) const
protectedpure virtual

Returns names of the depug parameters generated by the functor. Will be called by GetDebugParameterNames, if debug is activated.

Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.

◆ DoModelFit()

virtual ParametersType mitk::ModelFitFunctorBase::DoModelFit ( const SignalType value,
const ModelBase model,
const ModelBase::ParametersType initialParameters,
DebugParameterMapType debugParameters 
) const
protectedpure virtual

Internal Method called by Compute(). It does the real fit and returns the found parameters. Additionally it must return its debug parameter via debugParameters.

Postcondition
If m_DebugParameterMaps is true, it must return all debug parameters defined by GetDebugParameterNames() via debugParameters.
Parameters
valueSignal the Model should be fitted against
modelPointer to the model that should be fitted
initialParametersInitial modal parameters for the fit
[out]debugParametersMap containing all debug parameters for the done fit (must only valid if m_DebugParameterMap is true)

Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.

◆ GetClassName()

virtual const char* mitk::ModelFitFunctorBase::GetClassName ( ) const
virtual

◆ GetCriteria()

virtual OutputPixelArrayType mitk::ModelFitFunctorBase::GetCriteria ( const ModelBase model,
const ParametersType parameters,
const SignalType sample 
) const
protectedpure virtual

Internal Method called by Compute to get the final criterion values thar dove the fit. must be implemented be concrete functor classes.

Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.

◆ GetCriterionNames()

virtual ParameterNamesType mitk::ModelFitFunctorBase::GetCriterionNames ( ) const
pure virtual

Returns names of the criterion used to fit the model.

Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.

◆ GetDebugParameterMaps()

virtual bool mitk::ModelFitFunctorBase::GetDebugParameterMaps ( ) const
virtual

◆ GetDebugParameterNames()

ParameterNamesType mitk::ModelFitFunctorBase::GetDebugParameterNames ( ) const

Returns names of the depug parameters generated by the functor. Is empty, if debug is deactivated.

◆ GetDerivedParameters()

OutputPixelArrayType mitk::ModelFitFunctorBase::GetDerivedParameters ( const ModelBase model,
const ParametersType parameters 
) const
protected

Internal Method called by Compute(). Gets all derived parameters of the models with the final found parameters of the fit.

◆ GetEvaluationParameterCostFunction()

const SVModelFitCostFunction* mitk::ModelFitFunctorBase::GetEvaluationParameterCostFunction ( const std::string &  parameterName) const

◆ GetEvaluationParameterNames()

ParameterNamesType mitk::ModelFitFunctorBase::GetEvaluationParameterNames ( ) const

Returns names of all evaluation parameters defined by the user

◆ GetEvaluationParameters()

OutputPixelArrayType mitk::ModelFitFunctorBase::GetEvaluationParameters ( const ModelBase model,
const ParametersType parameters,
const SignalType sample 
) const
protected

Internal Method called by Compute(). Gets the evaluation parameters for all cost functions enlisted by the user, based on the model with the final found parameters of the fit and the input signal.

◆ GetNumberOfOutputs()

unsigned int mitk::ModelFitFunctorBase::GetNumberOfOutputs ( const ModelBase model) const

Returns the number of outputs the fit functor will return if compute is called. The number depends in parts on the passed model.

Exceptions
Exceptionwill be thrown if no valid model is passed.

◆ RegisterEvaluationParameter()

void mitk::ModelFitFunctorBase::RegisterEvaluationParameter ( const std::string &  parameterName,
SVModelFitCostFunction evaluationCostFunction 
)

◆ ResetEvaluationParameters()

void mitk::ModelFitFunctorBase::ResetEvaluationParameters ( )

◆ SetDebugParameterMaps()

virtual void mitk::ModelFitFunctorBase::SetDebugParameterMaps ( bool  _arg)
virtual

The documentation for this class was generated from the following file: