Medical Imaging Interaction Toolkit  2018.4.99-a3d2e8fb
Medical Imaging Interaction Toolkit
mitk::NumericTwoCompartmentExchangeModel Class Reference

Implementation of the numeric model function of the 2 Compartment Exchange model, using an Aterial Input Function The Model calculates the measured Concentration-Time-Curve from the mass balance equations of the 2-tissue compartent Model. More...

#include <mitkNumericTwoCompartmentExchangeModel.h>

Inheritance diagram for mitk::NumericTwoCompartmentExchangeModel:
Collaboration diagram for mitk::NumericTwoCompartmentExchangeModel:

Public Types

typedef NumericTwoCompartmentExchangeModel Self
 
typedef AIFBasedModelBase Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef std::vector< double > state_type
 
- Public Types inherited from mitk::AIFBasedModelBase
typedef AIFBasedModelBase Self
 
typedef ModelBase Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::Array< double > AterialInputFunctionType
 
- 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
 
virtual const double & GetODEINTStepSize ()
 
virtual void SetODEINTStepSize (double _arg)
 
ParameterNamesType GetParameterNames () const override
 
ParametersSizeType GetNumberOfParameters () const override
 
ParamterUnitMapType GetParameterUnits () const override
 
ParameterNamesType GetStaticParameterNames () const override
 
ParametersSizeType GetNumberOfStaticParameters () const override
 
- Public Member Functions inherited from mitk::AIFBasedModelBase
virtual const AterialInputFunctionTypeGetAterialInputFunctionValues ()
 
virtual const TimeGridTypeGetAterialInputFunctionTimeGrid ()
 
virtual void SetAterialInputFunctionValues (AterialInputFunctionType _arg)
 
virtual void SetAterialInputFunctionTimeGrid (TimeGridType _arg)
 
std::string GetXAxisName () const override
 
std::string GetXAxisUnit () const override
 
std::string GetYAxisName () const override
 
std::string GetYAxisUnit () const override
 
const TimeGridTypeGetCurrentAterialInputFunctionTimeGrid () const
 
const AterialInputFunctionType GetAterialInputFunction (TimeGridType currentTimeGrid) const
 
ParamterUnitMapType GetStaticParameterUnits () const override
 
- Public Member Functions inherited from mitk::ModelBase
ParamterScaleMapType GetParameterScales () const override
 
DerivedParamterScaleMapType GetDerivedParameterScales () const override
 
DerivedParamterUnitMapType GetDerivedParameterUnits () const override
 
FunctionStringType GetFunctionString () const override
 
ModellClassIDType GetClassID () const override
 
std::string GetXName () const override
 
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 MODEL_DISPLAY_NAME
 
static const std::string NAME_PARAMETER_F
 
static const std::string NAME_PARAMETER_PS
 
static const std::string NAME_PARAMETER_ve
 
static const std::string NAME_PARAMETER_vp
 
static const std::string NAME_STATIC_PARAMETER_ODEINTStepSize
 
static const std::string UNIT_PARAMETER_F
 
static const std::string UNIT_PARAMETER_PS
 
static const std::string UNIT_PARAMETER_ve
 
static const std::string UNIT_PARAMETER_vp
 
static const unsigned int POSITION_PARAMETER_F
 
static const unsigned int POSITION_PARAMETER_PS
 
static const unsigned int POSITION_PARAMETER_ve
 
static const unsigned int POSITION_PARAMETER_vp
 
static const unsigned int NUMBER_OF_PARAMETERS
 
- Static Public Attributes inherited from mitk::AIFBasedModelBase
static const std::string NAME_STATIC_PARAMETER_AIF
 
static const std::string NAME_STATIC_PARAMETER_AIFTimeGrid
 
static const std::string UNIT_STATIC_PARAMETER_AIF
 
static const std::string UNIT_STATIC_PARAMETER_AIFTimeGrid
 

Protected Member Functions

 NumericTwoCompartmentExchangeModel ()
 
 ~NumericTwoCompartmentExchangeModel () 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
 
void PrintSelf (std::ostream &os, ::itk::Indent indent) const override
 
- Protected Member Functions inherited from mitk::AIFBasedModelBase
 AIFBasedModelBase ()
 
 ~AIFBasedModelBase () override
 
bool ValidateModel (std::string &error) const override
 
void PrintSelf (std::ostream &os, ::itk::Indent indent) const override
 
- Protected Member Functions inherited from mitk::ModelBase
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::AIFBasedModelBase
TimeGridType m_AterialInputFunctionTimeGrid
 
AterialInputFunctionType m_AterialInputFunctionValues
 
- Protected Attributes inherited from mitk::ModelBase
TimeGridType m_TimeGrid
 

Detailed Description

Implementation of the numeric model function of the 2 Compartment Exchange model, using an Aterial Input Function The Model calculates the measured Concentration-Time-Curve from the mass balance equations of the 2-tissue compartent Model.

vp * dCp(t)/dt = F * (CA(t) - Cp(t)) - PS * (Cp(t) - Ci(t)) ve * dCi(t)/dt = PS * (Cp(t) - Ci(t))

with concentration curve Cp(t) of the Blood Plasma p and Ce(t) of the Extracellular Extravascular Space(EES)(interstitial volume). CA(t) is the aterial concentration, i.e. the AIF Cp(t) and Ce(t) are found numerical via Runge-Kutta methode, implemented in Boosts numeric library ODEINT. Here we use a runge_kutta_cash_karp54 stepper with adaptive step size and error controll. From the resulting curves Cp(t) and Ce(t) the measured concentration Ctotal(t) is found vial

Ctotal(t) = vp * Cp(t) + ve * Ce(t)

where vp=Vp/VT and ve=Ve/VT are the portion of Plasma/EES volume Vp/Ve of the total volume VT respectively. The parameters PS, F, vp and ve are subject to the fitting routine

Definition at line 39 of file mitkNumericTwoCompartmentExchangeModel.h.

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ state_type

◆ Superclass

Constructor & Destructor Documentation

◆ NumericTwoCompartmentExchangeModel()

mitk::NumericTwoCompartmentExchangeModel::NumericTwoCompartmentExchangeModel ( )
protected

Definition at line 55 of file mitkNumericTwoCompartmentExchangeModel.cpp.

◆ ~NumericTwoCompartmentExchangeModel()

mitk::NumericTwoCompartmentExchangeModel::~NumericTwoCompartmentExchangeModel ( )
overrideprotected

Definition at line 60 of file mitkNumericTwoCompartmentExchangeModel.cpp.

Member Function Documentation

◆ Clone()

Pointer mitk::NumericTwoCompartmentExchangeModel::Clone ( ) const

◆ ComputeModelfunction()

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

Boost::numeric::odeint works with type std::vector<double> thus, aif and grid are converted to ModelParameters( of type std::vector)

Initialize class TwoCompartmentExchangeModelDifferentialEquations defining the differential equations. AIF and Grid must be set so that at step t the aterial Concentration Ca(t) can be interpolated from AIF

Results of odeeint x[0] and x[1]

Stepsize. Should be adapted by stepper (runge_kutta_cash_karp54)

perform Step t -> t+dt to calculate approximate value x(t+dt)

transfom result of Differential equations back to itk::Array and interpolate to m_TimeGrid (they are calculated on a different grid defined by stepsize of odeint)

Implements mitk::ModelBase.

Definition at line 163 of file mitkNumericTwoCompartmentExchangeModel.cpp.

References mitk::convertArrayToParameter(), mitk::convertParameterToArray(), mitk::AIFBasedModelBase::GetAterialInputFunction(), mitk::TwoCompartmentExchangeModelDifferentialEquations::initialize(), mitk::InterpolateSignalToNewTimeGrid(), mitk::ModelBase::m_TimeGrid, POSITION_PARAMETER_F, POSITION_PARAMETER_PS, POSITION_PARAMETER_ve, POSITION_PARAMETER_vp, mitk::TwoCompartmentExchangeModelDifferentialEquations::setAIF(), and mitk::TwoCompartmentExchangeModelDifferentialEquations::setAIFTimeGrid().

◆ GetClassName()

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

Run-time type information (and related methods).

Reimplemented from mitk::AIFBasedModelBase.

◆ GetModelDisplayName()

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

Default implementation returns GetClassID as display name.

Reimplemented from mitk::ModelBase.

Definition at line 44 of file mitkNumericTwoCompartmentExchangeModel.cpp.

References MODEL_DISPLAY_NAME.

◆ GetModelType()

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

Default implementation returns "Unkown" as model type.

Reimplemented from mitk::ModelBase.

Definition at line 49 of file mitkNumericTwoCompartmentExchangeModel.cpp.

◆ GetNumberOfParameters()

mitk::NumericTwoCompartmentExchangeModel::ParametersSizeType mitk::NumericTwoCompartmentExchangeModel::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 143 of file mitkNumericTwoCompartmentExchangeModel.cpp.

References NUMBER_OF_PARAMETERS.

◆ GetNumberOfStaticParameters()

mitk::NumericTwoCompartmentExchangeModel::ParametersSizeType mitk::NumericTwoCompartmentExchangeModel::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()).

Reimplemented from mitk::AIFBasedModelBase.

Definition at line 76 of file mitkNumericTwoCompartmentExchangeModel.cpp.

◆ GetODEINTStepSize()

virtual const double& mitk::NumericTwoCompartmentExchangeModel::GetODEINTStepSize ( )
virtual

Referenced by GetStaticParameterValue().

◆ GetParameterNames()

mitk::NumericTwoCompartmentExchangeModel::ParameterNamesType mitk::NumericTwoCompartmentExchangeModel::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 130 of file mitkNumericTwoCompartmentExchangeModel.cpp.

References NAME_PARAMETER_F, NAME_PARAMETER_PS, NAME_PARAMETER_ve, and NAME_PARAMETER_vp.

◆ GetParameterUnits()

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

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

Reimplemented from mitk::ModelBase.

Definition at line 150 of file mitkNumericTwoCompartmentExchangeModel.cpp.

References NAME_PARAMETER_F, NAME_PARAMETER_PS, NAME_PARAMETER_ve, NAME_PARAMETER_vp, UNIT_PARAMETER_F, UNIT_PARAMETER_PS, UNIT_PARAMETER_ve, and UNIT_PARAMETER_vp.

◆ GetStaticParameterNames()

mitk::NumericTwoCompartmentExchangeModel::ParameterNamesType mitk::NumericTwoCompartmentExchangeModel::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()).

Reimplemented from mitk::AIFBasedModelBase.

Definition at line 65 of file mitkNumericTwoCompartmentExchangeModel.cpp.

References mitk::AIFBasedModelBase::NAME_STATIC_PARAMETER_AIF, mitk::AIFBasedModelBase::NAME_STATIC_PARAMETER_AIFTimeGrid, and NAME_STATIC_PARAMETER_ODEINTStepSize.

◆ GetStaticParameterValue()

◆ InternalClone()

itk::LightObject::Pointer mitk::NumericTwoCompartmentExchangeModel::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 269 of file mitkNumericTwoCompartmentExchangeModel.cpp.

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

◆ New()

static Pointer mitk::NumericTwoCompartmentExchangeModel::New ( )
static

Method for creation through the object factory.

Referenced by InternalClone().

◆ PrintSelf()

void mitk::NumericTwoCompartmentExchangeModel::PrintSelf ( std::ostream &  os,
::itk::Indent  indent 
) const
overrideprotected

◆ SetODEINTStepSize()

virtual void mitk::NumericTwoCompartmentExchangeModel::SetODEINTStepSize ( double  _arg)
virtual

Referenced by SetStaticParameter().

◆ SetStaticParameter()

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

Member Data Documentation

◆ MODEL_DISPLAY_NAME

const std::string mitk::NumericTwoCompartmentExchangeModel::MODEL_DISPLAY_NAME
static

Definition at line 59 of file mitkNumericTwoCompartmentExchangeModel.h.

Referenced by GetModelDisplayName().

◆ NAME_PARAMETER_F

const std::string mitk::NumericTwoCompartmentExchangeModel::NAME_PARAMETER_F
static

◆ NAME_PARAMETER_PS

const std::string mitk::NumericTwoCompartmentExchangeModel::NAME_PARAMETER_PS
static

◆ NAME_PARAMETER_ve

const std::string mitk::NumericTwoCompartmentExchangeModel::NAME_PARAMETER_ve
static

◆ NAME_PARAMETER_vp

const std::string mitk::NumericTwoCompartmentExchangeModel::NAME_PARAMETER_vp
static

◆ NAME_STATIC_PARAMETER_ODEINTStepSize

const std::string mitk::NumericTwoCompartmentExchangeModel::NAME_STATIC_PARAMETER_ODEINTStepSize
static

◆ NUMBER_OF_PARAMETERS

const unsigned int mitk::NumericTwoCompartmentExchangeModel::NUMBER_OF_PARAMETERS
static

Definition at line 77 of file mitkNumericTwoCompartmentExchangeModel.h.

Referenced by GetNumberOfParameters().

◆ POSITION_PARAMETER_F

const unsigned int mitk::NumericTwoCompartmentExchangeModel::POSITION_PARAMETER_F
static

◆ POSITION_PARAMETER_PS

const unsigned int mitk::NumericTwoCompartmentExchangeModel::POSITION_PARAMETER_PS
static

◆ POSITION_PARAMETER_ve

const unsigned int mitk::NumericTwoCompartmentExchangeModel::POSITION_PARAMETER_ve
static

◆ POSITION_PARAMETER_vp

const unsigned int mitk::NumericTwoCompartmentExchangeModel::POSITION_PARAMETER_vp
static

◆ UNIT_PARAMETER_F

const std::string mitk::NumericTwoCompartmentExchangeModel::UNIT_PARAMETER_F
static

Definition at line 67 of file mitkNumericTwoCompartmentExchangeModel.h.

Referenced by GetParameterUnits().

◆ UNIT_PARAMETER_PS

const std::string mitk::NumericTwoCompartmentExchangeModel::UNIT_PARAMETER_PS
static

Definition at line 68 of file mitkNumericTwoCompartmentExchangeModel.h.

Referenced by GetParameterUnits().

◆ UNIT_PARAMETER_ve

const std::string mitk::NumericTwoCompartmentExchangeModel::UNIT_PARAMETER_ve
static

Definition at line 69 of file mitkNumericTwoCompartmentExchangeModel.h.

Referenced by GetParameterUnits().

◆ UNIT_PARAMETER_vp

const std::string mitk::NumericTwoCompartmentExchangeModel::UNIT_PARAMETER_vp
static

Definition at line 70 of file mitkNumericTwoCompartmentExchangeModel.h.

Referenced by GetParameterUnits().


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