Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkTestModel.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 mitkTestModel_h
14 #define mitkTestModel_h
15 
16 #include <mitkModelBase.h>
17 
18 #include <MitkModelFitExports.h>
19 
20 namespace mitk
21 {
22 
34  {
35 
36  public:
37  typedef TestModel Self;
41 
42  typedef Superclass::ParameterNameType ParameterNameType;
43  typedef Superclass::ParametersSizeType ParametersSizeType;
44 
46  itkFactorylessNewMacro(Self);
47  itkCloneMacro(Self);
48 
50  itkTypeMacro(TestModel, ModelBase);
51 
53 
55 
56  std::string GetModelDisplayName() const override;
57 
58  std::string GetModelType() const override;
59 
61 
62  std::string GetXName() const override;
63 
64  std::string GetXAxisName() const override;
65 
66  std::string GetXAxisUnit() const override;
67 
68  std::string GetYAxisName() const override;
69 
70  std::string GetYAxisUnit() const override;
71 
73 
75 
77 
79 
81 
83 
84  protected:
85  TestModel() {};
86  TestModel(const TestModel &other);
87  ~TestModel() override {};
88 
89  ModelResultType ComputeModelfunction(const ParametersType& parameters) const override;
91  parameters) const override;
92 
94  const StaticParameterValuesType& values) override;
96  override;
97 
99 
100  private:
101  void operator=(const Self&); //purposely not implemented
102 
103  };
104 }
105 
106 #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::map< ParameterNameType, double > ParamterScaleMapType
Map type associating parameter names to their scaling factors.
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.
Simple linear test model used to verify factory and framework functionality.
Definition: mitkTestModel.h:34
ModelResultType ComputeModelfunction(const ParametersType &parameters) const override
Computes the model function for the given parameters.
ParameterNamesType GetDerivedParameterNames() const override
Returns the names of derived parameters that can be computed by the model.
void SetStaticParameter(const ParameterNameType &name, const StaticParameterValuesType &values) override
Sets a single static parameter by name.
ParametersSizeType GetNumberOfStaticParameters() const override
Returns the number of static parameters.
mitk::ModelBase Superclass
Definition: mitkTestModel.h:38
ParamterUnitMapType GetParameterUnits() const override
Default implementation returns no unit string ("") for every defined parameter.
itk::SmartPointer< Self > Pointer
Definition: mitkTestModel.h:39
std::string GetYAxisName() const override
Default implementation returns an empty string.
ParametersSizeType GetNumberOfDerivedParameters() const override
Returns the number of derived parameters that can be computed by the model.
ParamterScaleMapType GetParameterScales() const override
Default implementation returns a scale of 1.0 for every defined parameter.
ParametersSizeType GetNumberOfParameters() const override
Returns the number of parameters that must be defined when using the model to compute the signal (Get...
std::string GetYAxisUnit() const override
Default implementation returns an empty string.
ParameterNamesType GetStaticParameterNames() const override
Returns the names of static parameters used when computing the signal.
StaticParameterValuesType GetStaticParameterValue(const ParameterNameType &name) const override
Retrieves a single static parameter value by name.
TestModel Self
Definition: mitkTestModel.h:37
itk::SmartPointer< const Self > ConstPointer
Definition: mitkTestModel.h:40
Superclass::ParametersSizeType ParametersSizeType
Definition: mitkTestModel.h:43
std::string GetModelType() const override
Default implementation returns "Unknown" as model type.
DerivedParameterMapType ComputeDerivedParameters(const mitk::ModelBase::ParametersType &parameters) const override
Computes derived parameters from the given model parameters.
~TestModel() override
Definition: mitkTestModel.h:87
std::string GetModelDisplayName() const override
Default implementation returns GetClassID as display name.
std::string GetXAxisUnit() const override
Default implementation returns an empty string.
ParameterNamesType GetParameterNames() const override
Returns the names of parameters that must be defined when using the model to compute the signal (GetS...
TestModel(const TestModel &other)
std::string GetXName() const override
Default implementation returns an empty string.
FunctionStringType GetFunctionString() const override
Default implementation returns an empty function string.
std::string GetXAxisName() const override
Default implementation returns an empty string.
Superclass::ParameterNameType ParameterNameType
Definition: mitkTestModel.h:42
Find image slices visible on a given plane.