13 #ifndef mitkModelBase_h
14 #define mitkModelBase_h
19 #include <itkArray2D.h>
20 #include <itkObject.h>
261 void PrintSelf(std::ostream& os, ::itk::Indent indent)
const override;
269 void operator=(
const Self&);
#define MITKMODELFIT_EXPORT
Base class for (dynamic) models.
virtual ModelResultType ComputeModelfunction(const ParametersType ¶meters) const =0
Computes the model function for the given parameters.
std::string GetXName() const override
Default implementation returns an empty string.
ModellClassIDType GetClassID() const override
Default implementation returns the class name of the concrete instance as ID.
virtual ParameterNamesType GetStaticParameterNames() const =0
Returns the names of static parameters used when computing the signal.
DerivedParamterUnitMapType GetDerivedParameterUnits() const override
Default implementation returns no unit string ("") for every defined derived parameter.
virtual ParametersSizeType GetNumberOfStaticParameters() const =0
Returns the number of static parameters.
double DerivedParameterValueType
ModelTraitsInterface::DerivedParameterNamesType DerivedParameterNamesType
ModelTraitsInterface::DerivedParametersSizeType DerivedParametersSizeType
virtual bool ValidateModel(std::string &error) const
Validates whether the model is in a valid state to compute the signal.
itk::SmartPointer< const Self > ConstPointer
virtual DerivedParameterMapType ComputeDerivedParameters(const ParametersType ¶meters) const
Computes derived parameters from the given model parameters.
itk::SmartPointer< Self > Pointer
ModelTraitsInterface::ParametersSizeType ParametersSizeType
ModelTraitsInterface::ParameterNamesType ParameterNamesType
std::map< ParameterNameType, DerivedParameterValueType > DerivedParameterMapType
virtual ParamterUnitMapType GetStaticParameterUnits() const
Default implementation returns no unit string ("") for every defined static parameter.
std::map< ParameterNameType, StaticParameterValuesType > StaticParameterMapType
ModelTraitsInterface::ParameterValueType ParameterValueType
ModelBase(const ModelBase &source)
StaticParameterMapType GetStaticParameters() const
Retrieves the static parameters of the model (e.g. for serialization).
std::string GetModelType() const override
Default implementation returns "Unknown" as model type.
ParamterScaleMapType GetParameterScales() const override
Default implementation returns a scale of 1.0 for every defined parameter.
virtual StaticParameterValuesType GetStaticParameterValue(const ParameterNameType &name) const =0
Retrieves a single static parameter value by name.
virtual void SetStaticParameter(const ParameterNameType &name, const StaticParameterValuesType &values)=0
Sets a single static parameter by name.
std::string GetYAxisName() const override
Default implementation returns an empty string.
std::vector< StaticParameterValueType > StaticParameterValuesType
virtual void SetTimeGrid(const TimeGridType &grid)
Sets the time grid of the model.
std::string GetXAxisName() const override
Default implementation returns an empty string.
ModelResultType GetSignal(const ParametersType ¶meters) const
Computes and returns the model signal for the given parameters.
DerivedParameterNamesType GetDerivedParameterNames() const override
Returns the names of derived parameters that can be computed by the model.
FunctionStringType GetFunctionString() const override
Default implementation returns an empty function string.
ModelTraitsInterface::ParameterNameType ParameterNameType
ParamterUnitMapType GetParameterUnits() const override
Default implementation returns no unit string ("") for every defined parameter.
void PrintSelf(std::ostream &os, ::itk::Indent indent) const override
double StaticParameterValueType
std::string GetXAxisUnit() const override
Default implementation returns an empty string.
DerivedParamterScaleMapType GetDerivedParameterScales() const override
Default implementation returns a scale of 1.0 for every defined derived parameter.
void SetStaticParameters(const StaticParameterMapType ¶meters, bool allParameters=true)
Sets the static parameters of the model before it is used.
DerivedParametersSizeType GetNumberOfDerivedParameters() const override
Returns the number of derived parameters that can be computed by the model.
DerivedParameterMapType GetDerivedParameters(const ParametersType ¶meters) const
Computes all derived parameters for the given model parameters.
ModelTraitsInterface::ModelResultType ModelResultType
itk::Array< double > TimeGridType
Type defining the time grid used by models.
std::string GetYAxisUnit() const override
Default implementation returns an empty string.
ModelTraitsInterface::ParametersType ParametersType
std::string GetModelDisplayName() const override
Default implementation returns GetClassID as display name.
Pure virtual interface that defines the traits (metadata) of a model used for fitting.
std::map< ParameterNameType, double > ParamterScaleMapType
Map type associating parameter names to their scaling factors.
std::string FunctionStringType
Type for the function string representation of the model.
ParametersType::SizeValueType ParametersSizeType
Type for the count of parameters.
itk::Array< double > ModelResultType
Type representing the model output signal as an array of doubles.
ParametersSizeType DerivedParametersSizeType
Type for the count of derived parameters.
std::map< ParameterNameType, std::string > ParamterUnitMapType
Map type associating parameter names to their unit strings.
std::string ModellClassIDType
Type for the unique class identifier of the model.
itk::Array< ParameterValueType > ParametersType
Type representing a vector of parameter values.
std::string ParameterNameType
Type used for parameter names.
std::map< ParameterNameType, std::string > DerivedParamterUnitMapType
Map type associating derived parameter names to their unit strings.
double ParameterValueType
Type of a single parameter value.
std::map< ParameterNameType, double > DerivedParamterScaleMapType
Map type associating derived parameter names to their scaling factors.
ParameterNamesType DerivedParameterNamesType
Type for a list of derived parameter names.
std::vector< ParameterNameType > ParameterNamesType
Type for a list of parameter names.
Find image slices visible on a given plane.