Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::AIFBasedModelBase Class Reference

Base class for all pharmacokinetic perfusion models that use an Arterial Input Function (AIF). More...

#include <mitkAIFBasedModelBase.h>

Inheritance diagram for mitk::AIFBasedModelBase:
Collaboration diagram for mitk::AIFBasedModelBase:

Public Types

typedef AIFBasedModelBase Self
 
typedef ModelBase Superclass
 
typedef itk::SmartPointer< Self > Pointer
 
typedef itk::SmartPointer< const Self > ConstPointer
 
typedef itk::Array< double > AterialInputFunctionType
 Array type for the Arterial Input Function AIF(t). More...
 
- Public Types inherited from mitk::ModelBase
typedef ModelBase Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< Self > Pointer
 
typedef itk::SmartPointer< const Self > ConstPointer
 
typedef ModelTraitsInterface::ModelResultType ModelResultType
 
typedef ModelTraitsInterface::ParameterValueType ParameterValueType
 
typedef ModelTraitsInterface::ParametersType ParametersType
 
typedef itk::Array< double > TimeGridType
 Type defining the time grid used by models. More...
 
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< StaticParameterValueType > StaticParameterValuesType
 
typedef std::map< ParameterNameType, StaticParameterValuesType > StaticParameterMapType
 
typedef double DerivedParameterValueType
 
typedef std::map< ParameterNameType, DerivedParameterValueType > DerivedParameterMapType
 
- Public Types inherited from mitk::ModelTraitsInterface
typedef itk::Array< double > ModelResultType
 Type representing the model output signal as an array of doubles. More...
 
using ParameterValueType = double
 Type of a single parameter value. More...
 
typedef itk::Array< ParameterValueType > ParametersType
 Type representing a vector of parameter values. More...
 
typedef std::string ParameterNameType
 Type used for parameter names. More...
 
typedef std::vector< ParameterNameType > ParameterNamesType
 Type for a list of parameter names. More...
 
typedef ParametersType::SizeValueType ParametersSizeType
 Type for the count of parameters. More...
 
typedef ParameterNamesType DerivedParameterNamesType
 Type for a list of derived parameter names. More...
 
typedef ParametersSizeType DerivedParametersSizeType
 Type for the count of derived parameters. More...
 
typedef std::map< ParameterNameType, double > ParamterScaleMapType
 Map type associating parameter names to their scaling factors. More...
 
typedef std::map< ParameterNameType, std::string > ParamterUnitMapType
 Map type associating parameter names to their unit strings. More...
 
typedef std::map< ParameterNameType, double > DerivedParamterScaleMapType
 Map type associating derived parameter names to their scaling factors. More...
 
typedef std::map< ParameterNameType, std::string > DerivedParamterUnitMapType
 Map type associating derived parameter names to their unit strings. More...
 
typedef std::string FunctionStringType
 Type for the function string representation of the model. More...
 
typedef std::string ModellClassIDType
 Type for the unique class identifier of the model. More...
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual const AterialInputFunctionType & GetAterialInputFunctionValues ()
 Returns the currently set AIF concentration values. More...
 
virtual const TimeGridType & GetAterialInputFunctionTimeGrid ()
 Returns the currently set AIF time grid. More...
 
virtual void SetAterialInputFunctionValues (AterialInputFunctionType _arg)
 Sets the AIF concentration values. More...
 
virtual void SetAterialInputFunctionTimeGrid (TimeGridType _arg)
 Sets the AIF time grid. More...
 
std::string GetXAxisName () const override
 Returns the X axis name ("Time"). More...
 
std::string GetXAxisUnit () const override
 Returns the X axis unit ("s"). More...
 
std::string GetYAxisName () const override
 Returns the Y axis name ("Concentration"). More...
 
std::string GetYAxisUnit () const override
 Returns the Y axis unit ("mM"). More...
 
const TimeGridType & GetCurrentAterialInputFunctionTimeGrid () const
 Returns the time grid currently used for the AIF. More...
 
const AterialInputFunctionType GetAterialInputFunction (TimeGridType currentTimeGrid) const
 Returns the AIF values interpolated to the given time grid. More...
 
ParameterNamesType GetStaticParameterNames () const override
 Returns the names of all static parameters (AIF, AIF time grid). More...
 
ParametersSizeType GetNumberOfStaticParameters () const override
 Returns the number of static parameters (always 2). More...
 
ParamterUnitMapType GetStaticParameterUnits () const override
 Returns the unit map for all static parameters. More...
 
- Public Member Functions inherited from mitk::ModelBase
ParamterScaleMapType GetParameterScales () const override
 Default implementation returns a scale of 1.0 for every defined parameter. More...
 
ParamterUnitMapType GetParameterUnits () const override
 Default implementation returns no unit string ("") for every defined parameter. More...
 
DerivedParamterScaleMapType GetDerivedParameterScales () const override
 Default implementation returns a scale of 1.0 for every defined derived parameter. More...
 
DerivedParamterUnitMapType GetDerivedParameterUnits () const override
 Default implementation returns no unit string ("") for every defined derived parameter. More...
 
std::string GetModelDisplayName () const override
 Default implementation returns GetClassID as display name. More...
 
std::string GetModelType () const override
 Default implementation returns "Unknown" as model type. More...
 
FunctionStringType GetFunctionString () const override
 Default implementation returns an empty function string. More...
 
ModellClassIDType GetClassID () const override
 Default implementation returns the class name of the concrete instance as ID. More...
 
std::string GetXName () const override
 Default implementation returns an empty string. More...
 
DerivedParameterNamesType GetDerivedParameterNames () const override
 Returns the names of derived parameters that can be computed by the model. More...
 
DerivedParametersSizeType GetNumberOfDerivedParameters () const override
 Returns the number of derived parameters that can be computed by the model. More...
 
void SetStaticParameters (const StaticParameterMapType &parameters, bool allParameters=true)
 Sets the static parameters of the model before it is used. More...
 
StaticParameterMapType GetStaticParameters () const
 Retrieves the static parameters of the model (e.g. for serialization). More...
 
DerivedParameterMapType GetDerivedParameters (const ParametersType &parameters) const
 Computes all derived parameters for the given model parameters. More...
 
virtual void SetTimeGrid (const TimeGridType &grid)
 Sets the time grid of the model. More...
 
virtual const TimeGridType & GetTimeGrid ()
 Gets the time grid of the model. More...
 
ModelResultType GetSignal (const ParametersType &parameters) const
 Computes and returns the model signal for the given parameters. More...
 
- Public Member Functions inherited from mitk::ModelTraitsInterface
virtual ParameterNamesType GetParameterNames () const =0
 Returns the names of parameters that must be defined when using the model to compute the signal (GetSignal()). More...
 
virtual ParametersSizeType GetNumberOfParameters () const =0
 Returns the number of parameters that must be defined when using the model to compute the signal (GetSignal()). More...
 

Static Public Attributes

static const std::string NAME_STATIC_PARAMETER_AIF
 Name identifier for the AIF static parameter ("Arterial Input Function"). More...
 
static const std::string NAME_STATIC_PARAMETER_AIFTimeGrid
 Name identifier for the AIF time grid static parameter. More...
 
static const std::string UNIT_STATIC_PARAMETER_AIF
 Unit string for the AIF static parameter (mM). More...
 
static const std::string UNIT_STATIC_PARAMETER_AIFTimeGrid
 Unit string for the AIF time grid static parameter (s). More...
 
static const unsigned int NUMBER_OF_STATIC_PARAMETERS
 Number of static parameters (AIF values + AIF time grid = 2). More...
 
static const std::string X_AXIS_NAME
 Display name for the X axis ("Time"). More...
 
static const std::string X_AXIS_UNIT
 Unit for the X axis ("s"). More...
 
static const std::string Y_AXIS_NAME
 Display name for the Y axis ("Concentration"). More...
 
static const std::string Y_AXIS_UNIT
 Unit for the Y axis ("mM"). More...
 

Protected Member Functions

 AIFBasedModelBase ()
 
 ~AIFBasedModelBase () override
 
 AIFBasedModelBase (const AIFBasedModelBase &source)
 
bool ValidateModel (std::string &error) const override
 
void PrintSelf (std::ostream &os, ::itk::Indent indent) const override
 
void SetStaticParameter (const ParameterNameType &name, const StaticParameterValuesType &values) override
 Sets a single static parameter by name. More...
 
StaticParameterValuesType GetStaticParameterValue (const ParameterNameType &name) const override
 Retrieves a single static parameter value by name. More...
 
- Protected Member Functions inherited from mitk::ModelBase
virtual ModelResultType ComputeModelfunction (const ParametersType &parameters) const =0
 Computes the model function for the given parameters. More...
 
virtual DerivedParameterMapType ComputeDerivedParameters (const ParametersType &parameters) const
 Computes derived parameters from the given model parameters. More...
 
 ModelBase ()
 
 ~ModelBase () override
 
 ModelBase (const ModelBase &source)
 
void PrintSelf (std::ostream &os, ::itk::Indent indent) const override
 
- Protected Member Functions inherited from mitk::ModelTraitsInterface
 ModelTraitsInterface ()
 
virtual ~ModelTraitsInterface ()
 

Protected Attributes

TimeGridType m_AterialInputFunctionTimeGrid
 
AterialInputFunctionType m_AterialInputFunctionValues
 
- Protected Attributes inherited from mitk::ModelBase
TimeGridType m_TimeGrid
 

Detailed Description

Base class for all pharmacokinetic perfusion models that use an Arterial Input Function (AIF).

All AIF-based models require an array of AIF concentration values and the corresponding time grid AIF(t). This class provides accessors for setting the AIF values and optionally a dedicated AIF time grid. It also provides interpolation of the AIF to a specified time grid that differs from the AIF's own time grid.

The AIF must be set via an itk::Array. If no dedicated AIF time grid is specified, the model's own time grid is assumed (e.g. when the AIF is derived from the same data set being fitted). In that case, AIF values must have the same length as the model time grid; otherwise validation will fail.

See also
ModelBase, AIFBasedModelParameterizerBase, AterialInputFunctionGenerator

Definition at line 38 of file mitkAIFBasedModelBase.h.

Member Typedef Documentation

◆ AterialInputFunctionType

Array type for the Arterial Input Function AIF(t).

Definition at line 77 of file mitkAIFBasedModelBase.h.

◆ ConstPointer

◆ Pointer

◆ Self

◆ Superclass

Constructor & Destructor Documentation

◆ AIFBasedModelBase() [1/2]

mitk::AIFBasedModelBase::AIFBasedModelBase ( )
protected

◆ ~AIFBasedModelBase()

mitk::AIFBasedModelBase::~AIFBasedModelBase ( )
overrideprotected

◆ AIFBasedModelBase() [2/2]

mitk::AIFBasedModelBase::AIFBasedModelBase ( const AIFBasedModelBase &  source)
protected

Member Function Documentation

◆ GetAterialInputFunction()

const AterialInputFunctionType mitk::AIFBasedModelBase::GetAterialInputFunction ( TimeGridType  currentTimeGrid) const

Returns the AIF values interpolated to the given time grid.

If currentTimeGrid is empty (size 0), the original uninterpolated AIF values are returned.

Parameters
[in]currentTimeGridThe time grid to interpolate the AIF onto.
Returns
Interpolated AIF values matching the requested time grid.

◆ GetAterialInputFunctionTimeGrid()

virtual const TimeGridType& mitk::AIFBasedModelBase::GetAterialInputFunctionTimeGrid ( )
virtual

Returns the currently set AIF time grid.

◆ GetAterialInputFunctionValues()

virtual const AterialInputFunctionType& mitk::AIFBasedModelBase::GetAterialInputFunctionValues ( )
virtual

Returns the currently set AIF concentration values.

◆ GetClassName()

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

◆ GetCurrentAterialInputFunctionTimeGrid()

const TimeGridType& mitk::AIFBasedModelBase::GetCurrentAterialInputFunctionTimeGrid ( ) const

Returns the time grid currently used for the AIF.

If a dedicated AIF time grid has been set, it is returned. Otherwise the model's own time grid is returned.

Returns
Reference to the active AIF time grid.

◆ GetNumberOfStaticParameters()

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

Returns the number of static parameters (always 2).

Returns
Number of static parameters.

Implements mitk::ModelBase.

◆ GetStaticParameterNames()

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

Returns the names of all static parameters (AIF, AIF time grid).

Returns
Vector of static parameter name strings.

Implements mitk::ModelBase.

◆ GetStaticParameterUnits()

ParamterUnitMapType mitk::AIFBasedModelBase::GetStaticParameterUnits ( ) const
overridevirtual

Returns the unit map for all static parameters.

Returns
Map of parameter names to their unit strings.

Reimplemented from mitk::ModelBase.

◆ GetStaticParameterValue()

StaticParameterValuesType mitk::AIFBasedModelBase::GetStaticParameterValue ( const ParameterNameType &  name) const
overrideprotectedvirtual

Retrieves a single static parameter value by name.

Helper function called by GetStaticParameters(). Must be implemented in derived classes.

Implements mitk::ModelBase.

◆ GetXAxisName()

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

Returns the X axis name ("Time").

Returns
The X axis display name.

Reimplemented from mitk::ModelBase.

◆ GetXAxisUnit()

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

Returns the X axis unit ("s").

Returns
The X axis unit string.

Reimplemented from mitk::ModelBase.

◆ GetYAxisName()

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

Returns the Y axis name ("Concentration").

Returns
The Y axis display name.

Reimplemented from mitk::ModelBase.

◆ GetYAxisUnit()

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

Returns the Y axis unit ("mM").

Returns
The Y axis unit string.

Reimplemented from mitk::ModelBase.

◆ PrintSelf()

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

◆ SetAterialInputFunctionTimeGrid()

virtual void mitk::AIFBasedModelBase::SetAterialInputFunctionTimeGrid ( TimeGridType  _arg)
virtual

Sets the AIF time grid.

Parameters
[in]_argArray of time points in seconds corresponding to the AIF values.

◆ SetAterialInputFunctionValues()

virtual void mitk::AIFBasedModelBase::SetAterialInputFunctionValues ( AterialInputFunctionType  _arg)
virtual

Sets the AIF concentration values.

Parameters
[in]_argArray of AIF concentration values in mM.

◆ SetStaticParameter()

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

Sets a single static parameter by name.

Helper function called by SetStaticParameters(). Must be implemented in derived classes.

Implements mitk::ModelBase.

◆ ValidateModel()

bool mitk::AIFBasedModelBase::ValidateModel ( std::string &  error) const
overrideprotectedvirtual

Reimplementation that checks if AIF and timegrid settings are valid.

Parameters
[out]errorSet internally to indicate the error reason if method returns false. Is used by GetSignal() for the exception comment.
Returns
Returns true if the model is valid and can compute a signal. Otherwise it returns false.

Reimplemented from mitk::ModelBase.

Member Data Documentation

◆ m_AterialInputFunctionTimeGrid

TimeGridType mitk::AIFBasedModelBase::m_AterialInputFunctionTimeGrid
protected

Definition at line 153 of file mitkAIFBasedModelBase.h.

◆ m_AterialInputFunctionValues

AterialInputFunctionType mitk::AIFBasedModelBase::m_AterialInputFunctionValues
protected

Definition at line 154 of file mitkAIFBasedModelBase.h.

◆ NAME_STATIC_PARAMETER_AIF

const std::string mitk::AIFBasedModelBase::NAME_STATIC_PARAMETER_AIF
static

Name identifier for the AIF static parameter ("Arterial Input Function").

Definition at line 52 of file mitkAIFBasedModelBase.h.

◆ NAME_STATIC_PARAMETER_AIFTimeGrid

const std::string mitk::AIFBasedModelBase::NAME_STATIC_PARAMETER_AIFTimeGrid
static

Name identifier for the AIF time grid static parameter.

Definition at line 54 of file mitkAIFBasedModelBase.h.

◆ NUMBER_OF_STATIC_PARAMETERS

const unsigned int mitk::AIFBasedModelBase::NUMBER_OF_STATIC_PARAMETERS
static

Number of static parameters (AIF values + AIF time grid = 2).

Definition at line 62 of file mitkAIFBasedModelBase.h.

◆ UNIT_STATIC_PARAMETER_AIF

const std::string mitk::AIFBasedModelBase::UNIT_STATIC_PARAMETER_AIF
static

Unit string for the AIF static parameter (mM).

Definition at line 57 of file mitkAIFBasedModelBase.h.

◆ UNIT_STATIC_PARAMETER_AIFTimeGrid

const std::string mitk::AIFBasedModelBase::UNIT_STATIC_PARAMETER_AIFTimeGrid
static

Unit string for the AIF time grid static parameter (s).

Definition at line 59 of file mitkAIFBasedModelBase.h.

◆ X_AXIS_NAME

const std::string mitk::AIFBasedModelBase::X_AXIS_NAME
static

Display name for the X axis ("Time").

Definition at line 65 of file mitkAIFBasedModelBase.h.

◆ X_AXIS_UNIT

const std::string mitk::AIFBasedModelBase::X_AXIS_UNIT
static

Unit for the X axis ("s").

Definition at line 68 of file mitkAIFBasedModelBase.h.

◆ Y_AXIS_NAME

const std::string mitk::AIFBasedModelBase::Y_AXIS_NAME
static

Display name for the Y axis ("Concentration").

Definition at line 71 of file mitkAIFBasedModelBase.h.

◆ Y_AXIS_UNIT

const std::string mitk::AIFBasedModelBase::Y_AXIS_UNIT
static

Unit for the Y axis ("mM").

Definition at line 74 of file mitkAIFBasedModelBase.h.


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