Medical Imaging Interaction Toolkit
2024.06.99-fe296c79
Medical Imaging Interaction Toolkit
|
Base class for (dynamic) models. A model can be used to calculate its signal given the discrete time grid of the signal and the parameters of the model.
A model has 3 types of parameters:
.
More...
#include <mitkModelBase.h>
Protected Member Functions | |
virtual ModelResultType | ComputeModelfunction (const ParametersType ¶meters) const =0 |
virtual bool | ValidateModel (std::string &error) const |
virtual DerivedParameterMapType | ComputeDerivedParameters (const ParametersType ¶meters) const |
virtual void | SetStaticParameter (const ParameterNameType &name, const StaticParameterValuesType &values)=0 |
virtual StaticParameterValuesType | GetStaticParameterValue (const ParameterNameType &name) const =0 |
ModelBase () | |
~ModelBase () override | |
void | PrintSelf (std::ostream &os, ::itk::Indent indent) const override |
Protected Member Functions inherited from mitk::ModelTraitsInterface | |
ModelTraitsInterface () | |
virtual | ~ModelTraitsInterface () |
Protected Attributes | |
TimeGridType | m_TimeGrid |
Base class for (dynamic) models. A model can be used to calculate its signal given the discrete time grid of the signal and the parameters of the model.
A model has 3 types of parameters:
.
"Parameters" and "static parameters" are used to compute the signal of the model. "Parameters" are the ones that will be changed for/by model fitting. "Static parameters" are used to configure the model for fitting but are itself not part of the fitting scope (compare itk::Transform parameters and static parameters). "Derived parameters" are model specific parameters computed from "Parameters" e.g. (DerivedParam1 = Param1/Param2). It may be implemented if e.g. for practical usage not the fitted parameters are needed but derivation of them.
Definition at line 47 of file mitkModelBase.h.
typedef itk::SmartPointer< const Self > mitk::ModelBase::ConstPointer |
Definition at line 53 of file mitkModelBase.h.
typedef std::map<ParameterNameType, DerivedParameterValueType> mitk::ModelBase::DerivedParameterMapType |
Definition at line 75 of file mitkModelBase.h.
Definition at line 67 of file mitkModelBase.h.
Definition at line 68 of file mitkModelBase.h.
typedef double mitk::ModelBase::DerivedParameterValueType |
Definition at line 74 of file mitkModelBase.h.
Definition at line 55 of file mitkModelBase.h.
Definition at line 64 of file mitkModelBase.h.
Definition at line 63 of file mitkModelBase.h.
Definition at line 65 of file mitkModelBase.h.
Definition at line 59 of file mitkModelBase.h.
Definition at line 58 of file mitkModelBase.h.
typedef itk::SmartPointer< Self > mitk::ModelBase::Pointer |
Definition at line 52 of file mitkModelBase.h.
typedef ModelBase mitk::ModelBase::Self |
Definition at line 50 of file mitkModelBase.h.
typedef std::map<ParameterNameType, StaticParameterValuesType> mitk::ModelBase::StaticParameterMapType |
Definition at line 72 of file mitkModelBase.h.
typedef std::vector<StaticParameterValueType> mitk::ModelBase::StaticParameterValuesType |
Definition at line 71 of file mitkModelBase.h.
typedef double mitk::ModelBase::StaticParameterValueType |
Definition at line 70 of file mitkModelBase.h.
typedef itk::Object mitk::ModelBase::Superclass |
Definition at line 51 of file mitkModelBase.h.
typedef itk::Array<double> mitk::ModelBase::TimeGridType |
Type defining the time grid used be models.
Definition at line 62 of file mitkModelBase.h.
|
protected |
|
overrideprotected |
|
protectedvirtual |
Helper function called by GetDerivedParameters(). Implement in derived classes to realize the concrete computation of derived parameters.
Reimplemented in mitk::ThreeStepLinearModel, mitk::LinearModel, mitk::ExtendedToftsModel, mitk::StandardToftsModel, mitk::TestModel, mitk::TwoStepLinearModel, and mitk::ExponentialDecayModel.
|
protectedpure virtual |
Implemented in mitk::ThreeStepLinearModel, mitk::ExponentialDecayModel, mitk::LinearModel, mitk::ExponentialSaturationModel, mitk::DescriptivePharmacokineticBrixModel, mitk::ExpDecayOffsetModel, mitk::TwoCompartmentExchangeModel, mitk::ExtendedToftsModel, mitk::StandardToftsModel, mitk::GenericParamModel, mitk::TestModel, mitk::TwoTissueCompartmentModel, mitk::TwoTissueCompartmentFDGModel, mitk::ExtendedOneTissueCompartmentModel, mitk::OneTissueCompartmentModel, and mitk::TwoStepLinearModel.
|
overridevirtual |
Default implementation the class name of the concrete instance as ID.
Implements mitk::ModelTraitsInterface.
|
virtual |
Reimplemented in mitk::GenericParamModel, mitk::TwoCompartmentExchangeModel, mitk::ExpDecayOffsetModel, mitk::ExponentialDecayModel, mitk::ExponentialSaturationModel, mitk::AIFBasedModelBase, mitk::ExtendedToftsModel, mitk::StandardToftsModel, mitk::TestModel, mitk::LinearModel, mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::ExtendedOneTissueCompartmentModel, mitk::TwoTissueCompartmentFDGModel, mitk::TwoTissueCompartmentModel, and mitk::OneTissueCompartmentModel.
|
overridevirtual |
Returns the names of derived parameters that can/will be computed by the model given specific model parameters.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::ExtendedToftsModel, mitk::StandardToftsModel, and mitk::TestModel.
DerivedParameterMapType mitk::ModelBase::GetDerivedParameters | ( | const ParametersType & | parameters | ) | const |
Generic interface method that computes all derived parameters implemented for the given models. To changed the derived parameter computation. ComputeDerivedParameters must be (re)implemented.
parameters | The parameters of the model for which the derived parameters should be computed. It calls GetStaticParameter for every name defined in GetStaticParameterNames(). |
|
overridevirtual |
Default implementation returns a scale of 1.0 for every defined derived parameter.
Implements mitk::ModelTraitsInterface.
|
overridevirtual |
Default implementation returns no unit string ("") for every defined derived parameter.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::ExtendedToftsModel, and mitk::StandardToftsModel.
|
overridevirtual |
Default implementation returns an empty functions string.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, and mitk::TestModel.
|
overridevirtual |
Default implementation returns GetClassID as display name.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::TwoCompartmentExchangeModel, mitk::ExtendedToftsModel, mitk::StandardToftsModel, mitk::TwoTissueCompartmentModel, mitk::TwoTissueCompartmentFDGModel, mitk::ExtendedOneTissueCompartmentModel, mitk::OneTissueCompartmentModel, and mitk::TestModel.
|
overridevirtual |
Default implementation returns "Unkown" as model type.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::TwoCompartmentExchangeModel, mitk::ExtendedToftsModel, mitk::StandardToftsModel, mitk::TwoTissueCompartmentModel, mitk::TwoTissueCompartmentFDGModel, mitk::ExtendedOneTissueCompartmentModel, mitk::OneTissueCompartmentModel, and mitk::TestModel.
|
overridevirtual |
Returns the number of derived parameters that can/will be computed by the model given specific model parameters.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::ExtendedToftsModel, mitk::StandardToftsModel, and mitk::TestModel.
|
pure virtual |
Returns the number of static parameters that will be used when using the model to compute the signal (but are not defined via GetSignal()).
Implemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::ExponentialDecayModel, mitk::LinearModel, mitk::ExponentialSaturationModel, mitk::AIFBasedModelBase, mitk::ExpDecayOffsetModel, mitk::GenericParamModel, and mitk::TestModel.
|
overridevirtual |
Default implementation returns a scale of 1.0 for every defined parameter.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::TestModel.
|
overridevirtual |
Default implementation returns no unit string ("") for every defined parameter.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::TwoStepLinearModel, mitk::TwoCompartmentExchangeModel, mitk::ExtendedToftsModel, mitk::StandardToftsModel, mitk::TwoTissueCompartmentModel, mitk::TwoTissueCompartmentFDGModel, mitk::ExtendedOneTissueCompartmentModel, mitk::OneTissueCompartmentModel, and mitk::TestModel.
ModelResultType mitk::ModelBase::GetSignal | ( | const ParametersType & | parameters | ) | const |
|
pure virtual |
Returns the names of static parameters that will be used when using the model to compute the signal (but are not defined via GetSignal()).
Implemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::ExponentialDecayModel, mitk::LinearModel, mitk::AIFBasedModelBase, mitk::ExponentialSaturationModel, mitk::ExpDecayOffsetModel, mitk::GenericParamModel, and mitk::TestModel.
StaticParameterMapType mitk::ModelBase::GetStaticParameters | ( | ) | const |
Generic interface method that can be used to retrieve the static parameters of the model; e.g. in order to serialize the model settings. It calls GetStaticParameter for every name defined in GetStaticParameterNames().
|
virtual |
Default implementation returns no unit string ("") for every defined parameter.
Reimplemented in mitk::DescriptivePharmacokineticBrixModel, and mitk::AIFBasedModelBase.
|
protectedpure virtual |
Helper function called by GetStaticParameters(). Implement in derived classes to realize the concrete retrieval of static parameters.
Implemented in mitk::ThreeStepLinearModel, mitk::ExponentialDecayModel, mitk::LinearModel, mitk::ExponentialSaturationModel, mitk::DescriptivePharmacokineticBrixModel, mitk::ExpDecayOffsetModel, mitk::AIFBasedModelBase, mitk::GenericParamModel, mitk::TestModel, and mitk::TwoStepLinearModel.
|
virtual |
Gets the time grid of the model. It indicates the time points correlated with the signal the model should produce.
|
overridevirtual |
Default implementation returns an empty string.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::AIFBasedModelBase, and mitk::TestModel.
|
overridevirtual |
Default implementation returns an empty string.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::AIFBasedModelBase, and mitk::TestModel.
|
overridevirtual |
Default implementation returns an empty string.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, and mitk::TestModel.
|
overridevirtual |
Default implementation returns an empty string.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::AIFBasedModelBase, and mitk::TestModel.
|
overridevirtual |
Default implementation returns an empty string.
Implements mitk::ModelTraitsInterface.
Reimplemented in mitk::ThreeStepLinearModel, mitk::TwoStepLinearModel, mitk::DescriptivePharmacokineticBrixModel, mitk::AIFBasedModelBase, and mitk::TestModel.
|
overrideprotected |
|
protectedpure virtual |
Helper function called by SetStaticParameters(). Implement in derived classes to realize the concrete setting of static parameters.
Implemented in mitk::ThreeStepLinearModel, mitk::ExponentialDecayModel, mitk::LinearModel, mitk::ExponentialSaturationModel, mitk::DescriptivePharmacokineticBrixModel, mitk::ExpDecayOffsetModel, mitk::AIFBasedModelBase, mitk::GenericParamModel, mitk::TestModel, and mitk::TwoStepLinearModel.
void mitk::ModelBase::SetStaticParameters | ( | const StaticParameterMapType & | parameters, |
bool | allParameters = true |
||
) |
Generic interface method that can be used to set the static parameters of the model before it is used. It checks the validity of the passed map and uses SetStaticParameter to set the values.
parameters | The map with the static parameters and their values. |
allParameters | If true an exception will be thrown if the keys of passed parameters do not equal the return of GetStaticParameterNames. Thus if true, one must set all static parameters of the model. |
|
virtual |
Sets the time grid of the model. It indicates the time points correlated with the signal the model should produce.
|
protectedvirtual |
Member is called by GetSignal() before ComputeModelfunction(). It indicates if model is in a valid state and ready to compute the signal. The default implementation checks nothing and always returns true. Reimplement to realize special behavior for derived classes.
[out] | error | Set internally to indicate the error reason if method returns false. Is used by GetSignal() for the exception comment. |
Reimplemented in mitk::AIFBasedModelBase.
|
protected |
Definition at line 203 of file mitkModelBase.h.