Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ConcreteModelFactoryBase< TModel > Class Template Reference

Template base class for model factories that operate on a specific model type. More...

#include <mitkConcreteModelFactoryBase.h>

Inheritance diagram for mitk::ConcreteModelFactoryBase< TModel >:
Collaboration diagram for mitk::ConcreteModelFactoryBase< TModel >:

Public Types

typedef ModelFactoryBase::ModelBaseType ModelBaseType
 
typedef ModelFactoryBase::ModelBasePointer ModelBasePointer
 
typedef TModel ModelType
 
typedef ModelType::Pointer ModelPointer
 
typedef ModelFactoryBase::ParameterNameType ParameterNameType
 
typedef ModelFactoryBase::ParameterNamesType ParameterNamesType
 
typedef ModelFactoryBase::ParametersSizeType ParametersSizeType
 
typedef ModelFactoryBase::ParamterScaleMapType ParamterScaleMapType
 
typedef ModelFactoryBase::ParamterUnitMapType ParamterUnitMapType
 
typedef ModelFactoryBase::DerivedParameterNamesType DerivedParameterNamesType
 
typedef ModelFactoryBase::DerivedParametersSizeType DerivedParametersSizeType
 
typedef ModelFactoryBase::DerivedParamterScaleMapType DerivedParamterScaleMapType
 
typedef ModelFactoryBase::DerivedParamterUnitMapType DerivedParamterUnitMapType
 
typedef ModelFactoryBase::FunctionStringType FunctionStringType
 
typedef ModelFactoryBase::ModellClassIDType ModellClassIDType
 
- Public Types inherited from mitk::ModelFactoryBase
typedef ModelBase ModelBaseType
 
typedef ModelBaseType::Pointer ModelBasePointer
 
typedef ModelTraitsInterface::ParameterNameType ParameterNameType
 
typedef ModelTraitsInterface::ParameterNamesType ParameterNamesType
 
typedef ModelTraitsInterface::ParametersSizeType ParametersSizeType
 
typedef ModelTraitsInterface::ParamterScaleMapType ParamterScaleMapType
 
typedef ModelTraitsInterface::ParamterUnitMapType ParamterUnitMapType
 
typedef ModelTraitsInterface::FunctionStringType FunctionStringType
 
typedef ModelTraitsInterface::ModellClassIDType ModellClassIDType
 
typedef ModelTraitsInterface::DerivedParameterNamesType DerivedParameterNamesType
 
typedef ModelTraitsInterface::DerivedParametersSizeType DerivedParametersSizeType
 
typedef ModelTraitsInterface::DerivedParamterScaleMapType DerivedParamterScaleMapType
 
typedef ModelTraitsInterface::DerivedParamterUnitMapType DerivedParamterUnitMapType
 
- Public Types inherited from mitk::ModelTraitsInterface
typedef itk::Array< double > ModelResultType
 Type representing the model output signal as an array of doubles. More...
 
using ParameterValueType = double
 Type of a single parameter value. More...
 
typedef itk::Array< ParameterValueType > ParametersType
 Type representing a vector of parameter values. More...
 
typedef std::string ParameterNameType
 Type used for parameter names. More...
 
typedef std::vector< ParameterNameType > ParameterNamesType
 Type for a list of parameter names. More...
 
typedef ParametersType::SizeValueType ParametersSizeType
 Type for the count of parameters. More...
 
typedef ParameterNamesType DerivedParameterNamesType
 Type for a list of derived parameter names. More...
 
typedef ParametersSizeType DerivedParametersSizeType
 Type for the count of derived parameters. More...
 
typedef std::map< ParameterNameType, double > ParamterScaleMapType
 Map type associating parameter names to their scaling factors. More...
 
typedef std::map< ParameterNameType, std::string > ParamterUnitMapType
 Map type associating parameter names to their unit strings. More...
 
typedef std::map< ParameterNameType, double > DerivedParamterScaleMapType
 Map type associating derived parameter names to their scaling factors. More...
 
typedef std::map< ParameterNameType, std::string > DerivedParamterUnitMapType
 Map type associating derived parameter names to their unit strings. More...
 
typedef std::string FunctionStringType
 Type for the function string representation of the model. More...
 
typedef std::string ModellClassIDType
 Type for the unique class identifier of the model. More...
 

Public Member Functions

 mitkClassMacro (ConcreteModelFactoryBase, ModelFactoryBase)
 
ModelBasePointer CreateModel () const override
 Creates and returns a new instance of the model. More...
 
ConstraintCheckerBase::Pointer CreateDefaultConstraints () const override
 Creates default constraints for the model fitting process. More...
 
ParameterNamesType GetParameterNames () const override
 Returns the names of parameters that must be defined when using the model to compute the signal (GetSignal()). More...
 
ParametersSizeType GetNumberOfParameters () const override
 Returns the number of parameters that must be defined when using the model to compute the signal (GetSignal()). More...
 
ParamterScaleMapType GetParameterScales () const override
 Returns the scaling factors for all model parameters. More...
 
ParamterUnitMapType GetParameterUnits () const override
 Returns the unit strings for all model parameters. More...
 
ParameterNamesType GetDerivedParameterNames () const override
 Returns the names of derived parameters that can be computed by the model. More...
 
ParametersSizeType GetNumberOfDerivedParameters () const override
 Returns the number of derived parameters that can be computed by the model. More...
 
DerivedParamterScaleMapType GetDerivedParameterScales () const override
 Returns the scaling factors for all derived parameters. More...
 
DerivedParamterUnitMapType GetDerivedParameterUnits () const override
 Returns the unit strings for all derived parameters. More...
 
std::string GetModelDisplayName () const override
 Returns the human-readable display name of the model. More...
 
std::string GetModelType () const override
 Returns the type/category string of the model (e.g. "Linear", "Pharmacokinetic"). More...
 
FunctionStringType GetFunctionString () const override
 Returns a parsable function string representing the model equation. More...
 
ModellClassIDType GetClassID () const override
 Returns the unique class identifier for this model type. More...
 
std::string GetXName () const override
 Returns the name of the independent variable used by the model (e.g. "x"). More...
 
std::string GetXAxisName () const override
 Returns the display name of the x-axis (e.g. "Time"). More...
 
std::string GetXAxisUnit () const override
 Returns the unit of the x-axis (e.g. "s", "ms"). More...
 
std::string GetYAxisName () const override
 Returns the display name of the y-axis (e.g. "Signal Intensity"). More...
 
std::string GetYAxisUnit () const override
 Returns the unit of the y-axis. More...
 
- Public Member Functions inherited from mitk::ModelFactoryBase
 mitkClassMacroItkParent (ModelFactoryBase, itk::Object)
 
ModelParameterizerBase::Pointer CreateParameterizer (const modelFit::ModelFitInfo *fit) const
 Creates a model parameterizer configured according to the given model fit info. More...
 
virtual ParametersType GetDefaultInitialParameterization () const =0
 Returns the default initial parameterization defined by the model developer. More...
 

Static Public Member Functions

static ModelPointer CreateConcreteModel ()
 

Protected Member Functions

 ConcreteModelFactoryBase ()
 
 ~ConcreteModelFactoryBase () override
 
- Protected Member Functions inherited from mitk::ModelFactoryBase
virtual ModelParameterizerBase::Pointer DoCreateParameterizer (const modelFit::ModelFitInfo *fit) const =0
 
 ModelFactoryBase ()
 
 ~ModelFactoryBase () override
 
- Protected Member Functions inherited from mitk::ModelTraitsInterface
 ModelTraitsInterface ()
 
virtual ~ModelTraitsInterface ()
 

Protected Attributes

ModelPointer m_Reference
 

Detailed Description

template<class TModel>
class mitk::ConcreteModelFactoryBase< TModel >

Template base class for model factories that operate on a specific model type.

This class provides default implementations for all ModelTraitsInterface methods by delegating to a reference model instance. It also implements CreateModel() to instantiate the concrete model type TModel.

Template Parameters
TModelThe concrete model type this factory creates.
See also
ModelFactoryBase, ModelBase

Definition at line 35 of file mitkConcreteModelFactoryBase.h.

Member Typedef Documentation

◆ DerivedParameterNamesType

◆ DerivedParametersSizeType

◆ DerivedParamterScaleMapType

◆ DerivedParamterUnitMapType

◆ FunctionStringType

◆ ModelBasePointer

Definition at line 46 of file mitkConcreteModelFactoryBase.h.

◆ ModelBaseType

Definition at line 45 of file mitkConcreteModelFactoryBase.h.

◆ ModellClassIDType

Definition at line 61 of file mitkConcreteModelFactoryBase.h.

◆ ModelPointer

template<class TModel >
typedef ModelType::Pointer mitk::ConcreteModelFactoryBase< TModel >::ModelPointer

Definition at line 49 of file mitkConcreteModelFactoryBase.h.

◆ ModelType

template<class TModel >
typedef TModel mitk::ConcreteModelFactoryBase< TModel >::ModelType

Definition at line 48 of file mitkConcreteModelFactoryBase.h.

◆ ParameterNamesType

◆ ParameterNameType

Definition at line 51 of file mitkConcreteModelFactoryBase.h.

◆ ParametersSizeType

◆ ParamterScaleMapType

◆ ParamterUnitMapType

Constructor & Destructor Documentation

◆ ConcreteModelFactoryBase()

template<class TModel >
mitk::ConcreteModelFactoryBase< TModel >::ConcreteModelFactoryBase ( )
inlineprotected

◆ ~ConcreteModelFactoryBase()

template<class TModel >
mitk::ConcreteModelFactoryBase< TModel >::~ConcreteModelFactoryBase ( )
inlineoverrideprotected

Definition at line 170 of file mitkConcreteModelFactoryBase.h.

Member Function Documentation

◆ CreateConcreteModel()

template<class TModel >
static ModelPointer mitk::ConcreteModelFactoryBase< TModel >::CreateConcreteModel ( )
inlinestatic

◆ CreateDefaultConstraints()

template<class TModel >
ConstraintCheckerBase::Pointer mitk::ConcreteModelFactoryBase< TModel >::CreateDefaultConstraints ( ) const
inlineoverridevirtual

Creates default constraints for the model fitting process.

These constraints should/can be used for fitting if the user does not specify custom ones.

Returns
Pointer to the constraint checker for default constraints. May return a NULL pointer to indicate that the model has no constraints by default.

Implements mitk::ModelFactoryBase.

Reimplemented in mitk::TwoTissueCompartmentModelFactoryBase< TwoTissueCompartmentModelParameterizer >, and mitk::TwoCompartmentExchangeModelFactoryBase< TwoCompartmentExchangeModelParameterizer >.

Definition at line 73 of file mitkConcreteModelFactoryBase.h.

◆ CreateModel()

template<class TModel >
ModelBasePointer mitk::ConcreteModelFactoryBase< TModel >::CreateModel ( ) const
inlineoverridevirtual

Creates and returns a new instance of the model.

Returns
Smart pointer to the newly created model instance.

Implements mitk::ModelFactoryBase.

Definition at line 68 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::CreateConcreteModel().

◆ GetClassID()

template<class TModel >
ModellClassIDType mitk::ConcreteModelFactoryBase< TModel >::GetClassID ( ) const
inlineoverridevirtual

Returns the unique class identifier for this model type.

Returns
The model class ID string.

Implements mitk::ModelTraitsInterface.

Definition at line 134 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetDerivedParameterNames()

template<class TModel >
ParameterNamesType mitk::ConcreteModelFactoryBase< TModel >::GetDerivedParameterNames ( ) const
inlineoverridevirtual

Returns the names of derived parameters that can be computed by the model.

Returns
A vector of derived parameter name strings.

Implements mitk::ModelTraitsInterface.

Definition at line 99 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetDerivedParameterScales()

template<class TModel >
DerivedParamterScaleMapType mitk::ConcreteModelFactoryBase< TModel >::GetDerivedParameterScales ( ) const
inlineoverridevirtual

Returns the scaling factors for all derived parameters.

Returns
A map from derived parameter name to its scale factor.

Implements mitk::ModelTraitsInterface.

Definition at line 109 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetDerivedParameterUnits()

template<class TModel >
DerivedParamterUnitMapType mitk::ConcreteModelFactoryBase< TModel >::GetDerivedParameterUnits ( ) const
inlineoverridevirtual

Returns the unit strings for all derived parameters.

Returns
A map from derived parameter name to its unit string.

Implements mitk::ModelTraitsInterface.

Definition at line 114 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetFunctionString()

template<class TModel >
FunctionStringType mitk::ConcreteModelFactoryBase< TModel >::GetFunctionString ( ) const
inlineoverridevirtual

Returns a parsable function string representing the model equation.

Returns
The function string (e.g. "a*x+b").

Implements mitk::ModelTraitsInterface.

Definition at line 129 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetModelDisplayName()

template<class TModel >
std::string mitk::ConcreteModelFactoryBase< TModel >::GetModelDisplayName ( ) const
inlineoverridevirtual

Returns the human-readable display name of the model.

Returns
The model display name.

Implements mitk::ModelTraitsInterface.

Definition at line 119 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetModelType()

template<class TModel >
std::string mitk::ConcreteModelFactoryBase< TModel >::GetModelType ( ) const
inlineoverridevirtual

Returns the type/category string of the model (e.g. "Linear", "Pharmacokinetic").

Returns
The model type string.

Implements mitk::ModelTraitsInterface.

Definition at line 124 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetNumberOfDerivedParameters()

template<class TModel >
ParametersSizeType mitk::ConcreteModelFactoryBase< TModel >::GetNumberOfDerivedParameters ( ) const
inlineoverridevirtual

Returns the number of derived parameters that can be computed by the model.

Returns
The number of derived parameters.

Implements mitk::ModelTraitsInterface.

Definition at line 104 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetNumberOfParameters()

template<class TModel >
ParametersSizeType mitk::ConcreteModelFactoryBase< TModel >::GetNumberOfParameters ( ) const
inlineoverridevirtual

Returns the number of parameters that must be defined when using the model to compute the signal (GetSignal()).

Returns
The number of model parameters.

Implements mitk::ModelTraitsInterface.

Definition at line 84 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetParameterNames()

template<class TModel >
ParameterNamesType mitk::ConcreteModelFactoryBase< TModel >::GetParameterNames ( ) const
inlineoverridevirtual

Returns the names of parameters that must be defined when using the model to compute the signal (GetSignal()).

Returns
A vector of parameter name strings.

Implements mitk::ModelTraitsInterface.

Definition at line 79 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetParameterScales()

template<class TModel >
ParamterScaleMapType mitk::ConcreteModelFactoryBase< TModel >::GetParameterScales ( ) const
inlineoverridevirtual

Returns the scaling factors for all model parameters.

Returns
A map from parameter name to its scale factor.

Implements mitk::ModelTraitsInterface.

Definition at line 89 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetParameterUnits()

template<class TModel >
ParamterUnitMapType mitk::ConcreteModelFactoryBase< TModel >::GetParameterUnits ( ) const
inlineoverridevirtual

Returns the unit strings for all model parameters.

Returns
A map from parameter name to its unit string.

Implements mitk::ModelTraitsInterface.

Definition at line 94 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetXAxisName()

template<class TModel >
std::string mitk::ConcreteModelFactoryBase< TModel >::GetXAxisName ( ) const
inlineoverridevirtual

Returns the display name of the x-axis (e.g. "Time").

Returns
The x-axis name string.

Implements mitk::ModelTraitsInterface.

Definition at line 144 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetXAxisUnit()

template<class TModel >
std::string mitk::ConcreteModelFactoryBase< TModel >::GetXAxisUnit ( ) const
inlineoverridevirtual

Returns the unit of the x-axis (e.g. "s", "ms").

Returns
The x-axis unit string.

Implements mitk::ModelTraitsInterface.

Definition at line 149 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetXName()

template<class TModel >
std::string mitk::ConcreteModelFactoryBase< TModel >::GetXName ( ) const
inlineoverridevirtual

Returns the name of the independent variable used by the model (e.g. "x").

Returns
The variable name string.

Implements mitk::ModelTraitsInterface.

Definition at line 139 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetYAxisName()

template<class TModel >
std::string mitk::ConcreteModelFactoryBase< TModel >::GetYAxisName ( ) const
inlineoverridevirtual

Returns the display name of the y-axis (e.g. "Signal Intensity").

Returns
The y-axis name string.

Implements mitk::ModelTraitsInterface.

Definition at line 154 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ GetYAxisUnit()

template<class TModel >
std::string mitk::ConcreteModelFactoryBase< TModel >::GetYAxisUnit ( ) const
inlineoverridevirtual

Returns the unit of the y-axis.

Returns
The y-axis unit string.

Implements mitk::ModelTraitsInterface.

Definition at line 159 of file mitkConcreteModelFactoryBase.h.

References mitk::ConcreteModelFactoryBase< TModel >::m_Reference.

◆ mitkClassMacro()

template<class TModel >
mitk::ConcreteModelFactoryBase< TModel >::mitkClassMacro ( ConcreteModelFactoryBase< TModel >  ,
ModelFactoryBase   
)

Member Data Documentation

◆ m_Reference


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