diff --git a/Modules/ModelFit/include/mitkExponentialSaturationModel.h b/Modules/ModelFit/include/mitkExponentialSaturationModel.h index 7072660796..9bd3adc25a 100644 --- a/Modules/ModelFit/include/mitkExponentialSaturationModel.h +++ b/Modules/ModelFit/include/mitkExponentialSaturationModel.h @@ -1,86 +1,142 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef __MITK_EXPONENTIAL_SATURATION_MODEL_H_ #define __MITK_EXPONENTIAL_SATURATION_MODEL_H_ #include "mitkModelBase.h" #include "MitkModelFitExports.h" namespace mitk { /** @class ExponentialSaturationModel - * @brief This genric model has the form: if x Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef Superclass::ParameterNameType ParameterNameType; typedef Superclass::ParametersSizeType ParametersSizeType; /** Method for creation through the object factory. */ itkFactorylessNewMacro(Self); itkCloneMacro(Self); /** Run-time type information (and related methods). */ itkTypeMacro(ExponentialSaturationModel, ModelBase); - std::string GetModelDisplayName() const override; + static const std::string NAME_PARAMETER_BAT; + static const std::string NAME_PARAMETER_y_bl; + static const std::string NAME_PARAMETER_y_fin; + static const std::string NAME_PARAMETER_k; - std::string GetModelType() const override; + static const unsigned int NUMBER_OF_PARAMETERS; - FunctionStringType GetFunctionString() const override; + static const std::string UNIT_PARAMETER_BAT; + static const std::string UNIT_PARAMETER_y_bl; + static const std::string UNIT_PARAMETER_y_fin; + static const std::string UNIT_PARAMETER_k; - std::string GetXName() const override; + static const unsigned int POSITION_PARAMETER_BAT; + static const unsigned int POSITION_PARAMETER_y_bl; + static const unsigned int POSITION_PARAMETER_y_fin; + static const unsigned int POSITION_PARAMETER_k; + + static const unsigned int NUMBER_OF_DERIVED_PARAMETERS; + + static const unsigned int NUMBER_OF_STATIC_PARAMETERS; + + static const std::string MODEL_DISPLAY_NAME; + + static const std::string MODEL_TYPE; + + static const std::string FUNCTION_STRING; + + static const std::string X_NAME; + + static const std::string X_AXIS_NAME; + + static const std::string X_AXIS_UNIT; + + static const std::string Y_AXIS_NAME; + + static const std::string Y_AXIS_UNIT; ParameterNamesType GetParameterNames() const override; ParametersSizeType GetNumberOfParameters() const override; + ParamterUnitMapType GetParameterUnits() const override; + + ParameterNamesType GetDerivedParameterNames() const override; + + ParametersSizeType GetNumberOfDerivedParameters() const override; + + ParamterUnitMapType GetDerivedParameterUnits() const override; + ParameterNamesType GetStaticParameterNames() const override; ParametersSizeType GetNumberOfStaticParameters() const override; + ParamterUnitMapType GetStaticParameterUnits() const override; + + std::string GetModelDisplayName() const override; + + std::string GetModelType() const override; + + FunctionStringType GetFunctionString() const override; + + std::string GetXName() const override; + + std::string GetXAxisName() const override; + + std::string GetXAxisUnit() const override; + + std::string GetYAxisName() const override; + + std::string GetYAxisUnit() const override; + + protected: ExponentialSaturationModel() {}; ~ExponentialSaturationModel() override {}; /** * Actual implementation of the clone method. This method should be reimplemeted * in subclasses to clone the extra required parameters. */ itk::LightObject::Pointer InternalClone() const override; ModelResultType ComputeModelfunction(const ParametersType& parameters) const override; void SetStaticParameter(const ParameterNameType& name, const StaticParameterValuesType& values) override; StaticParameterValuesType GetStaticParameterValue(const ParameterNameType& name) const override; private: //No copy constructor allowed ExponentialSaturationModel(const Self& source); void operator=(const Self&); //purposely not implemented }; } #endif diff --git a/Modules/ModelFit/src/Models/mitkExponentialSaturationModel.cpp b/Modules/ModelFit/src/Models/mitkExponentialSaturationModel.cpp index 51bcecc086..00e5ec5009 100644 --- a/Modules/ModelFit/src/Models/mitkExponentialSaturationModel.cpp +++ b/Modules/ModelFit/src/Models/mitkExponentialSaturationModel.cpp @@ -1,112 +1,217 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #include "mitkExponentialSaturationModel.h" #include "mitkNumericConstants.h" +const std::string mitk::ExponentialSaturationModel::NAME_PARAMETER_BAT = "BAT"; +const std::string mitk::ExponentialSaturationModel::NAME_PARAMETER_y_bl = "y_bl"; +const std::string mitk::ExponentialSaturationModel::NAME_PARAMETER_y_fin = "y_fin"; +const std::string mitk::ExponentialSaturationModel::NAME_PARAMETER_k = "k"; + +const unsigned int mitk::ExponentialSaturationModel::NUMBER_OF_PARAMETERS = 4; + +const std::string mitk::ExponentialSaturationModel::UNIT_PARAMETER_BAT = "[x]"; +const std::string mitk::ExponentialSaturationModel::UNIT_PARAMETER_y_bl = "[y]"; +const std::string mitk::ExponentialSaturationModel::UNIT_PARAMETER_y_fin = "[y]"; +const std::string mitk::ExponentialSaturationModel::UNIT_PARAMETER_k = "1/[x]"; + + +const unsigned int mitk::ExponentialSaturationModel::POSITION_PARAMETER_BAT = 0; +const unsigned int mitk::ExponentialSaturationModel::POSITION_PARAMETER_y_bl = 1; +const unsigned int mitk::ExponentialSaturationModel::POSITION_PARAMETER_y_fin = 2; +const unsigned int mitk::ExponentialSaturationModel::POSITION_PARAMETER_k = 3; + +const unsigned int mitk::ExponentialSaturationModel::NUMBER_OF_DERIVED_PARAMETERS = 0; + +const unsigned int mitk::ExponentialSaturationModel::NUMBER_OF_STATIC_PARAMETERS = 0; + +const std::string mitk::ExponentialSaturationModel::MODEL_DISPLAY_NAME = "Exponential Saturation Model"; + +const std::string mitk::ExponentialSaturationModel::MODEL_TYPE = "Generic"; + +const std::string mitk::ExponentialSaturationModel::FUNCTION_STRING = "if xSetTimeGrid(this->m_TimeGrid); return newClone.GetPointer(); };