Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkTwoStepLinearModel.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 mitkTwoStepLinearModel_h
14 #define mitkTwoStepLinearModel_h
15 
16 #include <mitkModelBase.h>
17 
18 #include <MitkModelFitExports.h>
19 
20 namespace mitk
21 {
22 
35  {
36 
37  public:
42 
43  typedef Superclass::ParameterNameType ParameterNameType;
44  typedef Superclass::ParametersSizeType ParametersSizeType;
45 
47  itkFactorylessNewMacro(Self);
48  itkCloneMacro(Self);
49 
52 
53  static const std::string NAME_PARAMETER_y0;
54  static const std::string NAME_PARAMETER_x0;
55  static const std::string NAME_PARAMETER_b0;
56  static const std::string NAME_PARAMETER_b1;
57 
58  static const unsigned int NUMBER_OF_PARAMETERS;
59 
60  static const std::string UNIT_PARAMETER_y0;
61  static const std::string UNIT_PARAMETER_x0;
62  static const std::string UNIT_PARAMETER_b0;
63  static const std::string UNIT_PARAMETER_b1;
64 
65  static const unsigned int POSITION_PARAMETER_y0;
66  static const unsigned int POSITION_PARAMETER_x0;
67  static const unsigned int POSITION_PARAMETER_b0;
68  static const unsigned int POSITION_PARAMETER_b1;
69 
70  static const std::string NAME_DERIVED_PARAMETER_auc;
71  static const std::string NAME_DERIVED_PARAMETER_y_fin;
72  static const std::string NAME_DERIVED_PARAMETER_y_max;
73  static const std::string NAME_DERIVED_PARAMETER_y1;
74 
75  static const unsigned int NUMBER_OF_DERIVED_PARAMETERS;
76 
77  static const std::string UNIT_DERIVED_PARAMETER_auc;
78  static const std::string UNIT_DERIVED_PARAMETER_y_fin;
79  static const std::string UNIT_DERIVED_PARAMETER_y_max;
80  static const std::string UNIT_DERIVED_PARAMETER_y1;
81 
82  static const unsigned int NUMBER_OF_STATIC_PARAMETERS;
83 
84  static const std::string MODEL_DISPLAY_NAME;
85 
86  static const std::string MODEL_TYPE;
87 
88  static const std::string FUNCTION_STRING;
89 
90  static const std::string X_NAME;
91 
92  static const std::string X_AXIS_NAME;
93 
94  static const std::string X_AXIS_UNIT;
95 
96  static const std::string Y_AXIS_NAME;
97 
98  static const std::string Y_AXIS_UNIT;
99 
100 
101  ParameterNamesType GetParameterNames() const override;
102 
103  ParametersSizeType GetNumberOfParameters() const override;
104 
105  ParamterUnitMapType GetParameterUnits() const override;
106 
107  ParameterNamesType GetDerivedParameterNames() const override;
108 
109  ParametersSizeType GetNumberOfDerivedParameters() const override;
110 
111  ParamterUnitMapType GetDerivedParameterUnits() const override;
112 
113  ParameterNamesType GetStaticParameterNames() const override;
114 
115  ParametersSizeType GetNumberOfStaticParameters() const override;
116 
117  std::string GetModelDisplayName() const override;
118 
119  std::string GetModelType() const override;
120 
121  FunctionStringType GetFunctionString() const override;
122 
123  std::string GetXName() const override;
124 
125  std::string GetXAxisName() const override;
126 
127  std::string GetXAxisUnit() const override;
128 
129  std::string GetYAxisName() const override;
130 
131  std::string GetYAxisUnit() const override;
132 
133 
134  protected:
136  virtual ~TwoStepLinearModel(){};
137 
139 
141 
142  ModelResultType ComputeModelfunction(const ParametersType& parameters) const override;
144  parameters) const override;
145 
147  const StaticParameterValuesType& values) override;
149 
150  static double ComputeSignalFromParameters(double x, double t, double a1, double a2, double b1, double b2);
151 
152  private:
153 
154  void operator=(const Self&); //purposely not implemented
155  };
156 }
157 
158 
159 #endif
#define MITKMODELFIT_EXPORT
Base class for (dynamic) models.
Definition: mitkModelBase.h:56
ModelTraitsInterface::ParametersSizeType ParametersSizeType
Definition: mitkModelBase.h:73
ModelTraitsInterface::ParameterNamesType ParameterNamesType
Definition: mitkModelBase.h:72
std::map< ParameterNameType, DerivedParameterValueType > DerivedParameterMapType
Definition: mitkModelBase.h:83
std::vector< StaticParameterValueType > StaticParameterValuesType
Definition: mitkModelBase.h:79
ModelTraitsInterface::ParameterNameType ParameterNameType
Definition: mitkModelBase.h:71
ModelTraitsInterface::ModelResultType ModelResultType
Definition: mitkModelBase.h:63
ModelTraitsInterface::ParametersType ParametersType
Definition: mitkModelBase.h:67
std::string FunctionStringType
Type for the function string representation of the model.
std::map< ParameterNameType, std::string > ParamterUnitMapType
Map type associating parameter names to their unit strings.
Piecewise linear model with two segments joined at a transition point.
StaticParameterValuesType GetStaticParameterValue(const ParameterNameType &name) const override
Retrieves a single static parameter value by name.
itk::SmartPointer< const Self > ConstPointer
static double ComputeSignalFromParameters(double x, double t, double a1, double a2, double b1, double b2)
mitkCloneMacro(TwoStepLinearModel)
Superclass::ParameterNameType ParameterNameType
void SetStaticParameter(const ParameterNameType &name, const StaticParameterValuesType &values) override
Sets a single static parameter by name.
DerivedParameterMapType ComputeDerivedParameters(const mitk::ModelBase::ParametersType &parameters) const override
Computes derived parameters from the given model parameters.
ModelResultType ComputeModelfunction(const ParametersType &parameters) const override
Computes the model function for the given parameters.
TwoStepLinearModel(const TwoStepLinearModel &source)
itk::SmartPointer< Self > Pointer
Superclass::ParametersSizeType ParametersSizeType
Find image slices visible on a given plane.