Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::modelFit Namespace Reference

Classes

class  ModelFitException
 Class-specific exception for model fits. More...
 
class  ModelFitInfo
 Data class that stores all information about a model fit relevant to visualization. More...
 
class  Parameter
 Data class that stores all information about a model fit parameter. More...
 
class  StaticParameterMap
 Data structure that stores information about the static parameters of a model fit. More...
 

Typedefs

typedef std::set< ModelFitInfo::UIDType > NodeUIDSetType
 
typedef std::map< ModelBase::ParameterNameType, Image::Pointer > ModelFitResultImageMapType
 
typedef std::vector< DataNode::Pointer > ModelFitResultNodeVectorType
 

Functions

MITKMODELFIT_EXPORT const std::string GetMandatoryProperty (const mitk::DataNode *node, const std::string &prop)
 Reads a mandatory string property from a data node. More...
 
MITKMODELFIT_EXPORT const std::string GetMandatoryProperty (const mitk::BaseData *data, const std::string &prop)
 Reads a mandatory string property from base data. More...
 
MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromNode (const ModelFitInfo::UIDType &uid, const mitk::DataStorage *storage)
 Creates a new ModelFitInfo instance from the nodes in the passed storage. More...
 
MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromModelParameterizer (const ModelParameterizerBase *usedParameterizer, mitk::BaseData *inputImage, const std::string &fitType, const std::string &fitName="", const ModelFitInfo::UIDType &roiUID="")
 Creates a new ModelFitInfo instance from a model parameterizer. More...
 
MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromModelParameterizer (const ModelParameterizerBase *usedParameterizer, mitk::BaseData *inputImage, const std::string &fitType, const ScalarListLookupTable &inputData, const std::string &fitName="", const ModelFitInfo::UIDType &roiUID="")
 
MITKMODELFIT_EXPORT DataStorage::SetOfObjects::ConstPointer GetNodesOfFit (const ModelFitInfo::UIDType &fitUID, const mitk::DataStorage *storage)
 Returns all nodes that belong to the fit indicated by the passed UID. More...
 
MITKMODELFIT_EXPORT NodeUIDSetType GetFitUIDsOfNode (const mitk::DataNode *node, const mitk::DataStorage *storage)
 Returns the UIDs of all fits that are derived from the passed node. More...
 
MITKMODELFIT_EXPORT Parameter::Pointer ExtractParameterFromData (const mitk::BaseData *data)
 Extracts parameter information from a data instance and returns it as a Parameter. More...
 
MITKMODELFIT_EXPORT void SetModelFitDataProperties (mitk::BaseData *data, const ModelBase::ParameterNameType &name, modelFit::Parameter::Type dataType, const modelFit::ModelFitInfo *fitInfo)
 
MITKMODELFIT_EXPORT mitk::ScalarListLookupTableProperty::Pointer ConvertStaticParametersToProperty (const mitk::modelFit::StaticParameterMap &params)
 
MITKMODELFIT_EXPORT DataNode::Pointer CreateResultNode (const ModelBase::ParameterNameType &name, modelFit::Parameter::Type nodeType, Image *parameterImage, const ModelFitInfo *modelFitInfo)
 
MITKMODELFIT_EXPORT ModelFitResultNodeVectorType CreateResultNodeMap (const ModelFitResultImageMapType &results, const ModelFitResultImageMapType &derivedResults, const ModelFitResultImageMapType &criterionResults, const ModelFitResultImageMapType &evaluationResults, const ModelFitInfo *fitInfo)
 
MITKMODELFIT_EXPORT void StoreResultsInDataStorage (DataStorage *storage, const ModelFitResultNodeVectorType &resultNodes, DataNode *parentNode=nullptr)
 
bool operator< (const StaticParameterMap::ValueType &a, const StaticParameterMap::ValueType &b)
 Compares two value lists by their first element. More...
 

Typedef Documentation

◆ ModelFitResultImageMapType

Definition at line 36 of file mitkModelFitResultHelper.h.

◆ ModelFitResultNodeVectorType

typedef std::vector<DataNode::Pointer> mitk::modelFit::ModelFitResultNodeVectorType

Definition at line 37 of file mitkModelFitResultHelper.h.

◆ NodeUIDSetType

Definition at line 183 of file mitkModelFitInfo.h.

Function Documentation

◆ ConvertStaticParametersToProperty()

MITKMODELFIT_EXPORT mitk::ScalarListLookupTableProperty::Pointer mitk::modelFit::ConvertStaticParametersToProperty ( const mitk::modelFit::StaticParameterMap &  params)

◆ CreateFitInfoFromModelParameterizer() [1/2]

MITKMODELFIT_EXPORT ModelFitInfo::Pointer mitk::modelFit::CreateFitInfoFromModelParameterizer ( const ModelParameterizerBase *  usedParameterizer,
mitk::BaseData *  inputImage,
const std::string &  fitType,
const ScalarListLookupTable &  inputData,
const std::string &  fitName = "",
const ModelFitInfo::UIDType &  roiUID = "" 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ CreateFitInfoFromModelParameterizer() [2/2]

MITKMODELFIT_EXPORT ModelFitInfo::Pointer mitk::modelFit::CreateFitInfoFromModelParameterizer ( const ModelParameterizerBase *  usedParameterizer,
mitk::BaseData *  inputImage,
const std::string &  fitType,
const std::string &  fitName = "",
const ModelFitInfo::UIDType &  roiUID = "" 
)

Creates a new ModelFitInfo instance from a model parameterizer.

Parameters
usedParameterizerPointer to the parameterizer used for the fit.
inputImagePointer to the input image. If it has no UID yet, one will be added.
fitTypeString identifying the type of fit (e.g. ROI based or pixel based).
fitNameOptional human readable name of the fit.
roiUIDUID of the ROI, if one was used.
Returns
The newly created ModelFitInfo on success or NULL otherwise.

◆ CreateFitInfoFromNode()

MITKMODELFIT_EXPORT ModelFitInfo::Pointer mitk::modelFit::CreateFitInfoFromNode ( const ModelFitInfo::UIDType &  uid,
const mitk::DataStorage *  storage 
)

Creates a new ModelFitInfo instance from the nodes in the passed storage.

The fit will be identified by the passed UID.

Parameters
uidThe UID of the fit that identifies the nodes in the storage.
storagePointer to the data storage containing the relevant nodes.
Returns
The newly created ModelFitInfo on success or NULL otherwise.

◆ CreateResultNode()

MITKMODELFIT_EXPORT DataNode::Pointer mitk::modelFit::CreateResultNode ( const ModelBase::ParameterNameType &  name,
modelFit::Parameter::Type  nodeType,
Image *  parameterImage,
const ModelFitInfo *  modelFitInfo 
)

◆ CreateResultNodeMap()

MITKMODELFIT_EXPORT ModelFitResultNodeVectorType mitk::modelFit::CreateResultNodeMap ( const ModelFitResultImageMapType &  results,
const ModelFitResultImageMapType &  derivedResults,
const ModelFitResultImageMapType &  criterionResults,
const ModelFitResultImageMapType &  evaluationResults,
const ModelFitInfo *  fitInfo 
)

◆ ExtractParameterFromData()

MITKMODELFIT_EXPORT Parameter::Pointer mitk::modelFit::ExtractParameterFromData ( const mitk::BaseData *  data)

Extracts parameter information from a data instance and returns it as a Parameter.

If the data does not encode a parameter/fit result, a null pointer will be returned.

Parameters
dataThe data instance that contains parameter information to be extracted.
Returns
The newly created parameter instance on success or NULL otherwise.

◆ GetFitUIDsOfNode()

MITKMODELFIT_EXPORT NodeUIDSetType mitk::modelFit::GetFitUIDsOfNode ( const mitk::DataNode *  node,
const mitk::DataStorage *  storage 
)

Returns the UIDs of all fits that are derived from the passed node.

Parameters
nodeThe parent node to search for derived fits.
storagePointer to the data storage containing relevant nodes.
Returns
The set of found fit UIDs.

◆ GetMandatoryProperty() [1/2]

MITKMODELFIT_EXPORT const std::string mitk::modelFit::GetMandatoryProperty ( const mitk::BaseData *  data,
const std::string &  prop 
)

Reads a mandatory string property from base data.

Parameters
dataThe data whose property value should be returned.
propThe name of the property that should be read.
Returns
The value of the found property.
Exceptions
ModelFitExceptionIf the property doesn't exist or returns an empty string.

◆ GetMandatoryProperty() [2/2]

MITKMODELFIT_EXPORT const std::string mitk::modelFit::GetMandatoryProperty ( const mitk::DataNode *  node,
const std::string &  prop 
)

Reads a mandatory string property from a data node.

Parameters
nodeThe node whose property value should be returned.
propThe name of the property that should be read.
Returns
The value of the found property.
Exceptions
ModelFitExceptionIf the property doesn't exist or returns an empty string.

◆ GetNodesOfFit()

MITKMODELFIT_EXPORT DataStorage::SetOfObjects::ConstPointer mitk::modelFit::GetNodesOfFit ( const ModelFitInfo::UIDType &  fitUID,
const mitk::DataStorage *  storage 
)

Returns all nodes that belong to the fit indicated by the passed UID.

Parameters
fitUIDThe UID of the fit.
storagePointer to the data storage containing relevant nodes.
Returns
The set of found nodes or null if storage is not valid.

◆ operator<()

bool mitk::modelFit::operator< ( const StaticParameterMap::ValueType &  a,
const StaticParameterMap::ValueType &  b 
)
inline

Compares two value lists by their first element.

Parameters
aThe first list to compare.
bThe second list to compare.
Returns
True if the first list's first item is smaller than the second one's.

Definition at line 122 of file mitkModelFitStaticParameterMap.h.

◆ SetModelFitDataProperties()

MITKMODELFIT_EXPORT void mitk::modelFit::SetModelFitDataProperties ( mitk::BaseData *  data,
const ModelBase::ParameterNameType &  name,
modelFit::Parameter::Type  dataType,
const modelFit::ModelFitInfo *  fitInfo 
)

Helper function that sets the properties of the passed base data according to the given model fit info instance and parameter specification.

Parameters
dataInstance that properties should be configured.
nameName of the parameter this data instance represents.
dataTypeType of the parameter this data instance represents.
fitInfoInstance to the fit info that contains the information of the fit that derived the parameter.
Precondition
Data must point to a valid instance.
fitInfo must point to an valid instance.

◆ StoreResultsInDataStorage()

MITKMODELFIT_EXPORT void mitk::modelFit::StoreResultsInDataStorage ( DataStorage *  storage,
const ModelFitResultNodeVectorType &  resultNodes,
DataNode *  parentNode = nullptr 
)