Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkConcreteModelFactoryBase.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkConcreteModelFactoryBase_h
14 #define mitkConcreteModelFactoryBase_h
15 
16 #include <mitkModelFactoryBase.h>
17 
18 #include <MitkModelFitExports.h>
19 
20 namespace mitk
21 {
34  template <class TModel>
36  {
37  public:
38 /* typedef ConcreteModelFactoryBase Self;
39  typedef ModelFactoryBase Superclass;
40  typedef itk::SmartPointer< Self > Pointer;
41  typedef itk::SmartPointer< const Self > ConstPointer;
42 */
44 
47 
48  typedef TModel ModelType;
49  typedef typename ModelType::Pointer ModelPointer;
50 
62 
64  {
65  return ModelType::New();
66  }
67 
68  ModelBasePointer CreateModel() const override
69  {
70  return CreateConcreteModel().GetPointer();
71  };
72 
74  {
75  ConstraintCheckerBase::Pointer noConstraints;
76  return noConstraints;
77  };
78 
80  {
81  return m_Reference->GetParameterNames();
82  };
83 
85  {
86  return m_Reference->GetNumberOfParameters();
87  };
88 
90  {
91  return m_Reference->GetParameterScales();
92  };
93 
95  {
96  return m_Reference->GetParameterUnits();
97  };
98 
100  {
101  return m_Reference->GetDerivedParameterNames();
102  };
103 
105  {
106  return m_Reference->GetNumberOfDerivedParameters();
107  };
108 
110  {
111  return m_Reference->GetDerivedParameterScales();
112  };
113 
115  {
116  return m_Reference->GetDerivedParameterUnits();
117  };
118 
119  std::string GetModelDisplayName() const override
120  {
121  return m_Reference->GetModelDisplayName();
122  };
123 
124  std::string GetModelType() const override
125  {
126  return m_Reference->GetModelType();
127  };
128 
130  {
131  return m_Reference->GetFunctionString();
132  };
133 
134  ModellClassIDType GetClassID() const override
135  {
136  return m_Reference->GetClassID();
137  };
138 
139  std::string GetXName() const override
140  {
141  return m_Reference->GetXName();
142  };
143 
144  std::string GetXAxisName() const override
145  {
146  return m_Reference->GetXAxisName();
147  };
148 
149  std::string GetXAxisUnit() const override
150  {
151  return m_Reference->GetXAxisUnit();
152  };
153 
154  std::string GetYAxisName() const override
155  {
156  return m_Reference->GetYAxisName();
157  };
158 
159  std::string GetYAxisUnit() const override
160  {
161  return m_Reference->GetYAxisUnit();
162  }
163 
164  protected:
166  {
167  m_Reference = ModelType::New();
168  };
169 
171  {
172  };
173 
175 
176  private:
177 
178  //No copy constructor allowed
179  ConcreteModelFactoryBase(const Self& source);
180  void operator=(const Self&); //purposely not implemented
181  };
182 }
183 
184 #endif
Template base class for model factories that operate on a specific model type.
DerivedParamterUnitMapType GetDerivedParameterUnits() const override
Returns the unit strings for all derived parameters.
std::string GetXAxisUnit() const override
Returns the unit of the x-axis (e.g. "s", "ms").
mitkClassMacro(ConcreteModelFactoryBase, ModelFactoryBase)
DerivedParamterScaleMapType GetDerivedParameterScales() const override
Returns the scaling factors for all derived parameters.
ModelFactoryBase::ParameterNameType ParameterNameType
ModelFactoryBase::ParamterScaleMapType ParamterScaleMapType
std::string GetYAxisName() const override
Returns the display name of the y-axis (e.g. "Signal Intensity").
ModelFactoryBase::ModelBasePointer ModelBasePointer
ParamterScaleMapType GetParameterScales() const override
Returns the scaling factors for all model parameters.
ModelFactoryBase::ParamterUnitMapType ParamterUnitMapType
FunctionStringType GetFunctionString() const override
Returns a parsable function string representing the model equation.
ModelFactoryBase::ParameterNamesType ParameterNamesType
std::string GetModelDisplayName() const override
Returns the human-readable display name of the model.
ModellClassIDType GetClassID() const override
Returns the unique class identifier for this model type.
ModelFactoryBase::DerivedParametersSizeType DerivedParametersSizeType
ModelFactoryBase::DerivedParameterNamesType DerivedParameterNamesType
ModelFactoryBase::ModellClassIDType ModellClassIDType
ModelFactoryBase::FunctionStringType FunctionStringType
ParamterUnitMapType GetParameterUnits() const override
Returns the unit strings for all model parameters.
std::string GetXName() const override
Returns the name of the independent variable used by the model (e.g. "x").
ParameterNamesType GetDerivedParameterNames() const override
Returns the names of derived parameters that can be computed by the model.
ModelFactoryBase::ModelBaseType ModelBaseType
ConstraintCheckerBase::Pointer CreateDefaultConstraints() const override
Creates default constraints for the model fitting process.
std::string GetYAxisUnit() const override
Returns the unit of the y-axis.
ModelFactoryBase::DerivedParamterUnitMapType DerivedParamterUnitMapType
ModelFactoryBase::DerivedParamterScaleMapType DerivedParamterScaleMapType
std::string GetXAxisName() const override
Returns the display name of the x-axis (e.g. "Time").
ModelFactoryBase::ParametersSizeType ParametersSizeType
std::string GetModelType() const override
Returns the type/category string of the model (e.g. "Linear", "Pharmacokinetic").
ParametersSizeType GetNumberOfDerivedParameters() const override
Returns the number of derived parameters that can be computed by the model.
ParametersSizeType GetNumberOfParameters() const override
Returns the number of parameters that must be defined when using the model to compute the signal (Get...
ModelBasePointer CreateModel() const override
Creates and returns a new instance of the model.
ParameterNamesType GetParameterNames() const override
Returns the names of parameters that must be defined when using the model to compute the signal (GetS...
Base class for (dynamic) models.
Definition: mitkModelBase.h:56
Abstract base class for model factories in the model fitting framework.
ModelTraitsInterface::ModellClassIDType ModellClassIDType
ModelTraitsInterface::DerivedParamterUnitMapType DerivedParamterUnitMapType
ModelTraitsInterface::ParamterScaleMapType ParamterScaleMapType
ModelTraitsInterface::ParameterNamesType ParameterNamesType
ModelTraitsInterface::DerivedParamterScaleMapType DerivedParamterScaleMapType
ModelTraitsInterface::DerivedParametersSizeType DerivedParametersSizeType
ModelTraitsInterface::FunctionStringType FunctionStringType
ModelTraitsInterface::DerivedParameterNamesType DerivedParameterNamesType
ModelTraitsInterface::ParamterUnitMapType ParamterUnitMapType
ModelTraitsInterface::ParametersSizeType ParametersSizeType
ModelTraitsInterface::ParameterNameType ParameterNameType
Find image slices visible on a given plane.