Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitk::TestModel Class Reference

#include <mitkTestModel.h>

Inheritance diagram for mitk::TestModel:
Collaboration diagram for mitk::TestModel:

Public Types

typedef TestModel 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
 
ParamterScaleMapType GetParameterScales () const override
 
ParamterUnitMapType GetParameterUnits () 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
 
ParameterNamesType GetParameterNames () const override
 
ParametersSizeType GetNumberOfParameters () const override
 
ParameterNamesType GetStaticParameterNames () const override
 
ParametersSizeType GetNumberOfStaticParameters () const override
 
ParameterNamesType GetDerivedParameterNames () const override
 
ParametersSizeType GetNumberOfDerivedParameters () const override
 
- Public Member Functions inherited from mitk::ModelBase
DerivedParamterScaleMapType GetDerivedParameterScales () const override
 
DerivedParamterUnitMapType GetDerivedParameterUnits () const override
 
ModellClassIDType GetClassID () const override
 
virtual ParamterUnitMapType GetStaticParameterUnits () const
 
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 ()
 

Protected Member Functions

 TestModel ()
 
 ~TestModel () override
 
itk::LightObject::Pointer InternalClone () const override
 
ModelResultType ComputeModelfunction (const ParametersType &parameters) const override
 
DerivedParameterMapType ComputeDerivedParameters (const mitk::ModelBase::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
 
 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

Simple (linear) test model that is used to check functionality of default implementations in factories and stuff.

Definition at line 24 of file mitkTestModel.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 31 of file mitkTestModel.h.

◆ ParameterNameType

typedef Superclass::ParameterNameType mitk::TestModel::ParameterNameType

Definition at line 33 of file mitkTestModel.h.

◆ ParametersSizeType

typedef Superclass::ParametersSizeType mitk::TestModel::ParametersSizeType

Definition at line 34 of file mitkTestModel.h.

◆ Pointer

Definition at line 30 of file mitkTestModel.h.

◆ Self

Definition at line 28 of file mitkTestModel.h.

◆ Superclass

Definition at line 29 of file mitkTestModel.h.

Constructor & Destructor Documentation

◆ TestModel()

mitk::TestModel::TestModel ( )
inlineprotected

Definition at line 76 of file mitkTestModel.h.

◆ ~TestModel()

mitk::TestModel::~TestModel ( )
inlineoverrideprotected

Definition at line 77 of file mitkTestModel.h.

Member Function Documentation

◆ Clone()

Pointer mitk::TestModel::Clone ( ) const

◆ ComputeDerivedParameters()

mitk::ModelBase::DerivedParameterMapType mitk::TestModel::ComputeDerivedParameters ( const mitk::ModelBase::ParametersType parameters) const
overrideprotectedvirtual

Helper function called by GetDerivedParameters(). Implement in derived classes to realize the concrete computation of derived parameters.

Remarks
Default implementation has no derived parameters

Reimplemented from mitk::ModelBase.

Definition at line 157 of file mitkTestModel.cpp.

◆ ComputeModelfunction()

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

Implements mitk::ModelBase.

Definition at line 113 of file mitkTestModel.cpp.

References mitk::ModelBase::m_TimeGrid.

◆ GetClassName()

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

Run-time type information (and related methods).

Reimplemented from mitk::ModelBase.

◆ GetDerivedParameterNames()

mitk::TestModel::ParameterNamesType mitk::TestModel::GetDerivedParameterNames ( ) const
overridevirtual

Returns the names of derived parameters that can/will be computed by the model given specific model parameters.

Remarks
Default implementation has no derived parameters

Reimplemented from mitk::ModelBase.

Definition at line 99 of file mitkTestModel.cpp.

◆ GetFunctionString()

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

Default implementation returns an empty functions string.

Reimplemented from mitk::ModelBase.

Definition at line 53 of file mitkTestModel.cpp.

◆ GetModelDisplayName()

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

Default implementation returns GetClassID as display name.

Reimplemented from mitk::ModelBase.

Definition at line 43 of file mitkTestModel.cpp.

◆ GetModelType()

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

Default implementation returns "Unkown" as model type.

Reimplemented from mitk::ModelBase.

Definition at line 48 of file mitkTestModel.cpp.

◆ GetNumberOfDerivedParameters()

mitk::TestModel::ParametersSizeType mitk::TestModel::GetNumberOfDerivedParameters ( ) const
overridevirtual

Returns the number of derived parameters that can/will be computed by the model given specific model parameters.

Remarks
Default implementation has no derived parameters

Reimplemented from mitk::ModelBase.

Definition at line 107 of file mitkTestModel.cpp.

◆ GetNumberOfParameters()

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

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

Implements mitk::ModelTraitsInterface.

Definition at line 93 of file mitkTestModel.cpp.

◆ GetNumberOfStaticParameters()

mitk::TestModel::ParametersSizeType mitk::TestModel::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.

Definition at line 136 of file mitkTestModel.cpp.

◆ GetParameterNames()

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

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

Implements mitk::ModelTraitsInterface.

Definition at line 84 of file mitkTestModel.cpp.

Referenced by GetParameterScales(), and GetParameterUnits().

◆ GetParameterScales()

mitk::TestModel::ParamterScaleMapType mitk::TestModel::GetParameterScales ( ) const
overridevirtual

Default implementation returns a scale of 1.0 for every defined parameter.

Reimplemented from mitk::ModelBase.

Definition at line 16 of file mitkTestModel.cpp.

References GetParameterNames().

◆ GetParameterUnits()

mitk::TestModel::ParamterUnitMapType mitk::TestModel::GetParameterUnits ( ) const
overridevirtual

Default implementation returns no unit string ("") for every defined parameter.

Reimplemented from mitk::ModelBase.

Definition at line 30 of file mitkTestModel.cpp.

References GetParameterNames().

◆ GetStaticParameterNames()

mitk::TestModel::ParameterNamesType mitk::TestModel::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.

Definition at line 129 of file mitkTestModel.cpp.

◆ GetStaticParameterValue()

mitk::TestModel::StaticParameterValuesType mitk::TestModel::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.

Definition at line 147 of file mitkTestModel.cpp.

◆ GetXAxisName()

std::string mitk::TestModel::GetXAxisName ( ) const
overridevirtual

Default implementation returns an empty string.

Reimplemented from mitk::ModelBase.

Definition at line 63 of file mitkTestModel.cpp.

◆ GetXAxisUnit()

std::string mitk::TestModel::GetXAxisUnit ( ) const
overridevirtual

Default implementation returns an empty string.

Reimplemented from mitk::ModelBase.

Definition at line 68 of file mitkTestModel.cpp.

◆ GetXName()

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

Default implementation returns an empty string.

Reimplemented from mitk::ModelBase.

Definition at line 58 of file mitkTestModel.cpp.

◆ GetYAxisName()

std::string mitk::TestModel::GetYAxisName ( ) const
overridevirtual

Default implementation returns an empty string.

Reimplemented from mitk::ModelBase.

Definition at line 73 of file mitkTestModel.cpp.

◆ GetYAxisUnit()

std::string mitk::TestModel::GetYAxisUnit ( ) const
overridevirtual

Default implementation returns an empty string.

Reimplemented from mitk::ModelBase.

Definition at line 78 of file mitkTestModel.cpp.

◆ InternalClone()

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

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

Definition at line 166 of file mitkTestModel.cpp.

References mitk::ModelBase::m_TimeGrid, and New().

◆ New()

static Pointer mitk::TestModel::New ( )
static

Method for creation through the object factory.

Referenced by InternalClone(), and mitkConcreteModelFactoryBaseTest().

◆ SetStaticParameter()

void mitk::TestModel::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.

Definition at line 141 of file mitkTestModel.cpp.


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