Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitk::GenericParamModel Class Reference

#include <mitkGenericParamModel.h>

Inheritance diagram for mitk::GenericParamModel:
Collaboration diagram for mitk::GenericParamModel:

Public Types

typedef GenericParamModel Self
 
typedef mitk::ModelBase Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::ParameterNameType ParameterNameType
 
typedef Superclass::ParametersSizeType ParametersSizeType
 
- Public Types inherited from mitk::ModelBase
typedef ModelBase Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef ModelTraitsInterface::ModelResultType ModelResultType
 
typedef ModelTraitsInterface::ParameterValueType ParameterValueType
 
typedef ModelTraitsInterface::ParametersType ParametersType
 
typedef itk::Array< double > TimeGridType
 
typedef ModelTraitsInterface::ParameterNameType ParameterNameType
 
typedef ModelTraitsInterface::ParameterNamesType ParameterNamesType
 
typedef ModelTraitsInterface::ParametersSizeType ParametersSizeType
 
typedef ModelTraitsInterface::DerivedParameterNamesType DerivedParameterNamesType
 
typedef ModelTraitsInterface::DerivedParametersSizeType DerivedParametersSizeType
 
typedef double StaticParameterValueType
 
typedef std::vector< StaticParameterValueTypeStaticParameterValuesType
 
typedef std::map< ParameterNameType, StaticParameterValuesTypeStaticParameterMapType
 
typedef double DerivedParameterValueType
 
typedef std::map< ParameterNameType, DerivedParameterValueTypeDerivedParameterMapType
 
- Public Types inherited from mitk::ModelTraitsInterface
typedef itk::Array< double > ModelResultType
 
using ParameterValueType = double
 
typedef itk::Array< ParameterValueTypeParametersType
 
typedef std::string ParameterNameType
 
typedef std::vector< ParameterNameTypeParameterNamesType
 
typedef ParametersType::SizeValueType ParametersSizeType
 
typedef ParameterNamesType DerivedParameterNamesType
 
typedef ParametersSizeType DerivedParametersSizeType
 
typedef std::map< ParameterNameType, double > ParamterScaleMapType
 
typedef std::map< ParameterNameType, std::string > ParamterUnitMapType
 
typedef std::map< ParameterNameType, double > DerivedParamterScaleMapType
 
typedef std::map< ParameterNameType, std::string > DerivedParamterUnitMapType
 
typedef std::string FunctionStringType
 
typedef std::string ModellClassIDType
 

Public Member Functions

Pointer Clone () const
 
virtual const char * GetClassName () const
 
std::string GetModelDisplayName () const override
 
std::string GetModelType () const override
 
FunctionStringType GetFunctionString () const override
 
virtual void SetFunctionString (const char *_arg)
 
virtual void SetNumberOfParameters (ParametersSizeType _arg)
 
std::string GetXName () const override
 
ParameterNamesType GetParameterNames () const override
 
ParametersSizeType GetNumberOfParameters () const override
 
ParameterNamesType GetStaticParameterNames () const override
 
ParametersSizeType GetNumberOfStaticParameters () const override
 
- Public Member Functions inherited from mitk::ModelBase
ParamterScaleMapType GetParameterScales () const override
 
ParamterUnitMapType GetParameterUnits () const override
 
DerivedParamterScaleMapType GetDerivedParameterScales () const override
 
DerivedParamterUnitMapType GetDerivedParameterUnits () const override
 
std::string GetModelDisplayName () const override
 
std::string GetModelType () const override
 
FunctionStringType GetFunctionString () const override
 
ModellClassIDType GetClassID () 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
 
virtual ParamterUnitMapType GetStaticParameterUnits () const
 
DerivedParameterNamesType GetDerivedParameterNames () const override
 
DerivedParametersSizeType GetNumberOfDerivedParameters () const override
 
void SetStaticParameters (const StaticParameterMapType &parameters, bool allParameters=true)
 
StaticParameterMapType GetStaticParameters () const
 
DerivedParameterMapType GetDerivedParameters (const ParametersType &parameters) const
 
virtual void SetTimeGrid (const TimeGridType &grid)
 
virtual const TimeGridTypeGetTimeGrid ()
 
ModelResultType GetSignal (const ParametersType &parameters) const
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const std::string NAME_STATIC_PARAMETER_number
 

Protected Member Functions

 GenericParamModel ()
 
 ~GenericParamModel () override
 
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
 
- Protected Member Functions inherited from mitk::ModelBase
virtual bool ValidateModel (std::string &error) const
 
virtual DerivedParameterMapType ComputeDerivedParameters (const ParametersType &parameters) const
 
 ModelBase ()
 
 ~ModelBase () override
 
void PrintSelf (std::ostream &os, ::itk::Indent indent) const override
 
- Protected Member Functions inherited from mitk::ModelTraitsInterface
 ModelTraitsInterface ()
 
virtual ~ModelTraitsInterface ()
 

Additional Inherited Members

- Protected Attributes inherited from mitk::ModelBase
TimeGridType m_TimeGrid
 

Detailed Description

Model that can parse a user specified function string and uses it as model function that is represented by the model instance. The parser used to interpret the string can handle simple mathematical formulas (e.g. "3.5 + a * x * sin(x) - 1 / 2"). The parser is able to recognize:

  • sums, differences, products and divisions (a + b, 4 - 3, 2 * x, 9 / 3)
  • algebraic signs ( +5, -5)
  • exponentiation ( 2 ^ 4 )
  • parentheses (3 * (4 + 2))
  • following unary functions: abs, exp, sin, cos, tan, sind (sine in degrees), cosd (cosine in degrees), tand (tangent in degrees)
  • variables (x, a, b, ... j)

Remark: The variable "x" is reserved. It is the signal position / timepoint. Remark: The current version supports up to 10 model parameter. Don't use it for a model parameter that should be deduced by fitting (these are a..j).

Definition at line 37 of file mitkGenericParamModel.h.

Member Typedef Documentation

◆ ConstPointer

◆ ParameterNameType

◆ ParametersSizeType

◆ Pointer

◆ Self

◆ Superclass

Constructor & Destructor Documentation

◆ GenericParamModel()

mitk::GenericParamModel::GenericParamModel ( )
protected

◆ ~GenericParamModel()

mitk::GenericParamModel::~GenericParamModel ( )
inlineoverrideprotected

Definition at line 80 of file mitkGenericParamModel.h.

Member Function Documentation

◆ Clone()

Pointer mitk::GenericParamModel::Clone ( ) const

◆ ComputeModelfunction()

ModelResultType mitk::GenericParamModel::ComputeModelfunction ( const ParametersType parameters) const
overrideprotectedvirtual

Implements mitk::ModelBase.

◆ GetClassName()

virtual const char* mitk::GenericParamModel::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from mitk::ModelBase.

◆ GetFunctionString()

FunctionStringType mitk::GenericParamModel::GetFunctionString ( ) const
overridevirtual

◆ GetModelDisplayName()

std::string mitk::GenericParamModel::GetModelDisplayName ( ) const
overridevirtual

◆ GetModelType()

std::string mitk::GenericParamModel::GetModelType ( ) const
overridevirtual

◆ GetNumberOfParameters()

ParametersSizeType mitk::GenericParamModel::GetNumberOfParameters ( ) const
overridevirtual

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

Implements mitk::ModelTraitsInterface.

◆ GetNumberOfStaticParameters()

ParametersSizeType mitk::GenericParamModel::GetNumberOfStaticParameters ( ) const
overridevirtual

Returns the number of static parameters that will be used when using the model to compute the signal (but are not defined via GetSignal()).

Implements mitk::ModelBase.

◆ GetParameterNames()

ParameterNamesType mitk::GenericParamModel::GetParameterNames ( ) const
overridevirtual

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

Implements mitk::ModelTraitsInterface.

◆ GetStaticParameterNames()

ParameterNamesType mitk::GenericParamModel::GetStaticParameterNames ( ) const
overridevirtual

Returns the names of static parameters that will be used when using the model to compute the signal (but are not defined via GetSignal()).

Implements mitk::ModelBase.

◆ GetStaticParameterValue()

StaticParameterValuesType mitk::GenericParamModel::GetStaticParameterValue ( const ParameterNameType name) const
overrideprotectedvirtual

Helper function called by GetStaticParameters(). Implement in derived classes to realize the concrete retrieval of static parameters.

Implements mitk::ModelBase.

◆ GetXName()

std::string mitk::GenericParamModel::GetXName ( ) const
overridevirtual

◆ InternalClone()

itk::LightObject::Pointer mitk::GenericParamModel::InternalClone ( ) const
overrideprotected

Actual implementation of the clone method. This method should be reimplemeted in subclasses to clone the extra required parameters.

◆ New()

static Pointer mitk::GenericParamModel::New ( )
static

Method for creation through the object factory.

◆ SetFunctionString()

virtual void mitk::GenericParamModel::SetFunctionString ( const char *  _arg)
virtual

◆ SetNumberOfParameters()

virtual void mitk::GenericParamModel::SetNumberOfParameters ( ParametersSizeType  _arg)
virtual
Precondition
The Number of parameters must be between 1 and 10.

◆ SetStaticParameter()

void mitk::GenericParamModel::SetStaticParameter ( const ParameterNameType name,
const StaticParameterValuesType values 
)
overrideprotectedvirtual

Helper function called by SetStaticParameters(). Implement in derived classes to realize the concrete setting of static parameters.

Implements mitk::ModelBase.

Member Data Documentation

◆ NAME_STATIC_PARAMETER_number

const std::string mitk::GenericParamModel::NAME_STATIC_PARAMETER_number
static

Definition at line 54 of file mitkGenericParamModel.h.


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