|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Abstract base class for functors that perform model fitting. More...
#include <mitkModelFitFunctorBase.h>


Public Types | |
| typedef ModelFitFunctorBase | Self |
| typedef itk::Object | Superclass |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef itk::SmartPointer< const Self > | ConstPointer |
| typedef ScalarType | ParameterImagePixelType |
| typedef std::vector< ParameterImagePixelType > | InputPixelArrayType |
| typedef std::vector< ParameterImagePixelType > | OutputPixelArrayType |
| 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 |
| Performs model fitting and returns the results. More... | |
| unsigned int | GetNumberOfOutputs (const ModelBase *model) const |
| Returns the number of outputs the fit functor will produce. More... | |
| ParameterNamesType | GetEvaluationParameterNames () const |
| Returns names of all evaluation parameters defined by the user. More... | |
| void | ResetEvaluationParameters () |
| Removes all registered evaluation parameters. More... | |
| void | RegisterEvaluationParameter (const std::string ¶meterName, SVModelFitCostFunction *evaluationCostFunction) |
| Registers an evaluation parameter with its cost function. More... | |
| const SVModelFitCostFunction * | GetEvaluationParameterCostFunction (const std::string ¶meterName) const |
| Returns the cost function associated with the given evaluation parameter. More... | |
| virtual ParameterNamesType | GetCriterionNames () const =0 |
| Returns names of the criteria used to fit the model. More... | |
| ParameterNamesType | GetDebugParameterNames () const |
| Returns names of the debug parameters generated by the functor. More... | |
| 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, ParameterImagePixelType > | DebugParameterMapType |
Protected Member Functions | |
| ModelFitFunctorBase () | |
| ~ModelFitFunctorBase () override | |
| virtual OutputPixelArrayType | GetCriteria (const ModelBase *model, const ParametersType ¶meters, const SignalType &sample) const =0 |
| Internal method called by Compute() to get the final criterion values that drove the fit. More... | |
| OutputPixelArrayType | GetDerivedParameters (const ModelBase *model, const ParametersType ¶meters) const |
| Internal method called by Compute() to get derived parameters with the final fit parameters. More... | |
| OutputPixelArrayType | GetEvaluationParameters (const ModelBase *model, const ParametersType ¶meters, const SignalType &sample) const |
| Internal method called by Compute() to get evaluation parameters from user-defined cost functions. More... | |
| virtual ParametersType | DoModelFit (const SignalType &value, const ModelBase *model, const ModelBase::ParametersType &initialParameters, DebugParameterMapType &debugParameters) const =0 |
| Internal method that performs the actual model fitting. More... | |
| virtual ParameterNamesType | DefineDebugParameterNames () const =0 |
| Returns names of the debug parameters generated by the functor. More... | |
Abstract base class for functors that perform model fitting.
A model fit functor takes an observed signal, a model instance, and initial parameters, then performs the fitting optimization. Subclasses implement specific fitting algorithms (e.g. Levenberg-Marquardt). The functor also supports user-defined evaluation cost functions and optional debug parameter maps.
Definition at line 41 of file mitkModelFitFunctorBase.h.
| typedef itk::SmartPointer< const Self > mitk::ModelFitFunctorBase::ConstPointer |
Definition at line 47 of file mitkModelFitFunctorBase.h.
|
protected |
Definition at line 147 of file mitkModelFitFunctorBase.h.
| typedef std::vector<ParameterImagePixelType> mitk::ModelFitFunctorBase::InputPixelArrayType |
Definition at line 52 of file mitkModelFitFunctorBase.h.
| typedef std::vector<ParameterImagePixelType> mitk::ModelFitFunctorBase::OutputPixelArrayType |
Definition at line 53 of file mitkModelFitFunctorBase.h.
Definition at line 51 of file mitkModelFitFunctorBase.h.
Definition at line 84 of file mitkModelFitFunctorBase.h.
|
protected |
Definition at line 124 of file mitkModelFitFunctorBase.h.
Definition at line 46 of file mitkModelFitFunctorBase.h.
Definition at line 44 of file mitkModelFitFunctorBase.h.
Definition at line 125 of file mitkModelFitFunctorBase.h.
| typedef itk::Object mitk::ModelFitFunctorBase::Superclass |
Definition at line 45 of file mitkModelFitFunctorBase.h.
|
protected |
|
overrideprotected |
| OutputPixelArrayType mitk::ModelFitFunctorBase::Compute | ( | const InputPixelArrayType & | value, |
| const ModelBase * | model, | ||
| const ModelBase::ParametersType & | initialParameters | ||
| ) | const |
Performs model fitting and returns the results.
The values in the returned vector are ordered in the following sequence:
| value | Signal the model should be fitted onto. |
| model | Pointer to the preconfigured model instance. |
| initialParameters | Starting point parameters for the fitting process. |
|
virtual |
|
virtual |
|
protectedpure virtual |
Returns names of the debug parameters generated by the functor.
Will be called by GetDebugParameterNames() if debug is activated.
Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
|
protectedpure virtual |
Internal method that performs the actual model fitting.
Must be implemented by derived classes. Returns the found parameters and optionally populates the debug parameter map.
| value | Signal the model should be fitted against. | |
| model | Pointer to the model that should be fitted. | |
| initialParameters | Initial model parameters for the fit. | |
| [out] | debugParameters | Map containing all debug parameters (only valid if m_DebugParameterMaps is true). |
Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
|
virtual |
Reimplemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
|
protectedpure virtual |
Internal method called by Compute() to get the final criterion values that drove the fit.
Must be implemented by concrete functor classes.
Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
|
pure virtual |
Returns names of the criteria used to fit the model.
Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
|
virtual |
| ParameterNamesType mitk::ModelFitFunctorBase::GetDebugParameterNames | ( | ) | const |
Returns names of the debug parameters generated by the functor.
Returns an empty list if debug is deactivated.
|
protected |
Internal method called by Compute() to get derived parameters with the final fit parameters.
| const SVModelFitCostFunction* mitk::ModelFitFunctorBase::GetEvaluationParameterCostFunction | ( | const std::string & | parameterName | ) | const |
Returns the cost function associated with the given evaluation parameter.
| parameterName | The name of the evaluation parameter. |
| ParameterNamesType mitk::ModelFitFunctorBase::GetEvaluationParameterNames | ( | ) | const |
Returns names of all evaluation parameters defined by the user.
|
protected |
Internal method called by Compute() to get evaluation parameters from user-defined cost functions.
| unsigned int mitk::ModelFitFunctorBase::GetNumberOfOutputs | ( | const ModelBase * | model | ) | const |
Returns the number of outputs the fit functor will produce.
The number depends in part on the passed model.
| model | The model for which the output count is determined. |
| Exception | if no valid model is passed. |
| void mitk::ModelFitFunctorBase::RegisterEvaluationParameter | ( | const std::string & | parameterName, |
| SVModelFitCostFunction * | evaluationCostFunction | ||
| ) |
Registers an evaluation parameter with its cost function.
| parameterName | The name of the evaluation parameter. |
| evaluationCostFunction | The cost function used to compute this evaluation parameter. |
| void mitk::ModelFitFunctorBase::ResetEvaluationParameters | ( | ) |
Removes all registered evaluation parameters.
|
virtual |