Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Classes | |
class | ModelFitException |
Class-specific exception for modelfits. More... | |
class | ModelFitInfo |
Data class that stores all information about a modelfit that is relevant to the visualization and stored as properties in the result nodes. More... | |
class | Parameter |
Data class that stores all information about a modelfit parameter. Such a parameter is going to be fitted for the according model. More... | |
class | StaticParameterMap |
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 the string property with the given name from the data of the given node and returns its value. Throws a ModelFitException if the property doesn't exist. More... | |
MITKMODELFIT_EXPORT const std::string | GetMandatoryProperty (const mitk::BaseData *data, const std::string &prop) |
Reads the string property with the given name from the given base data and returns its value. Throws a ModelFitException if the property doesn't exist. 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. The fit will be identified by the passed UID. Returns the instance on success. More... | |
MITKMODELFIT_EXPORT ModelFitInfo::Pointer | CreateFitInfoFromModelParameterizer (const ModelParameterizerBase *usedParameterizer, mitk::BaseData *inputImage, const std::string &fitType, const std::string &fitName="", const NodeUIDType roiUID="") |
MITKMODELFIT_EXPORT ModelFitInfo::Pointer | CreateFitInfoFromModelParameterizer (const ModelParameterizerBase *usedParameterizer, mitk::BaseData *inputImage, const std::string &fitType, const ScalarListLookupTable &inputData, const std::string &fitName="", const NodeUIDType roiUID="") |
MITKMODELFIT_EXPORT DataStorage::SetOfObjects::ConstPointer | GetNodesOfFit (const ModelFitInfo::UIDType &fitUID, const mitk::DataStorage *storage) |
MITKMODELFIT_EXPORT NodeUIDSetType | GetFitUIDsOfNode (const mitk::DataNode *node, const mitk::DataStorage *storage) |
MITKMODELFIT_EXPORT Parameter::Pointer | ExtractParameterFromData (const mitk::BaseData *data) |
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 ¶ms) |
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 var lists and returns true if the first list's first item is lower than the second one's. More... | |
void | AdaptDataPropertyToParameter (mitk::BaseData *data, const ModelBase::ParameterNameType &name, modelFit::Parameter::Type dataType, const modelFit::ModelFitInfo *fitInfo) |
void | AdaptDataPropertyToModelFit (mitk::BaseData *data, const modelFit::ModelFitInfo *fitInfo) |
mitk::DataNode::Pointer | CreateNode (const ModelBase::ParameterNameType &name, Image *parameterImage, const ModelFitInfo *fitInfo) |
typedef std::map<ModelBase::ParameterNameType,Image::Pointer> mitk::modelFit::ModelFitResultImageMapType |
Definition at line 34 of file mitkModelFitResultHelper.h.
typedef std::vector<DataNode::Pointer> mitk::modelFit::ModelFitResultNodeVectorType |
Definition at line 37 of file mitkModelFitResultHelper.h.
typedef std::set<ModelFitInfo::UIDType> mitk::modelFit::NodeUIDSetType |
Definition at line 190 of file mitkModelFitInfo.h.
void mitk::modelFit::AdaptDataPropertyToModelFit | ( | mitk::BaseData * | data, |
const modelFit::ModelFitInfo * | fitInfo | ||
) |
Definition at line 85 of file mitkModelFitResultHelper.cpp.
References ConvertStaticParametersToProperty(), mitk::ModelFitConstants::FIT_INPUT_DATA_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_INPUT_IMAGEUID_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_INPUT_ROIUID_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_STATIC_PARAMETERS_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_TYPE_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_UID_PROPERTY_NAME(), mitk::modelFit::ModelFitInfo::fitName, mitk::modelFit::ModelFitInfo::fitType, mitk::modelFit::ModelFitInfo::function, mitk::modelFit::ModelFitInfo::functionClassID, mitk::ScalarListLookupTable::GetLookupTable(), mitk::BaseData::GetPropertyList(), mitk::modelFit::ModelFitInfo::inputData, mitk::modelFit::ModelFitInfo::inputUID, mitkThrow, mitk::ModelFitConstants::MODEL_FUNCTION_CLASS_PROPERTY_NAME(), mitk::ModelFitConstants::MODEL_FUNCTION_PROPERTY_NAME(), mitk::ModelFitConstants::MODEL_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::MODEL_TYPE_PROPERTY_NAME(), mitk::ModelFitConstants::MODEL_X_PROPERTY_NAME(), mitk::modelFit::ModelFitInfo::modelName, mitk::modelFit::ModelFitInfo::modelType, mitk::modelFit::ModelFitInfo::roiUID, mitk::BaseData::SetProperty(), mitk::modelFit::ModelFitInfo::staticParamMap, mitk::modelFit::ModelFitInfo::uid, mitk::modelFit::ModelFitInfo::x, mitk::ModelFitConstants::XAXIS_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::XAXIS_UNIT_PROPERTY_NAME(), mitk::modelFit::ModelFitInfo::xAxisName, mitk::modelFit::ModelFitInfo::xAxisUnit, mitk::ModelFitConstants::YAXIS_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::YAXIS_UNIT_PROPERTY_NAME(), mitk::modelFit::ModelFitInfo::yAxisName, and mitk::modelFit::ModelFitInfo::yAxisUnit.
Referenced by SetModelFitDataProperties().
void mitk::modelFit::AdaptDataPropertyToParameter | ( | mitk::BaseData * | data, |
const ModelBase::ParameterNameType & | name, | ||
modelFit::Parameter::Type | dataType, | ||
const modelFit::ModelFitInfo * | fitInfo | ||
) |
Definition at line 29 of file mitkModelFitResultHelper.cpp.
References mitk::modelFit::Parameter::CriterionType, mitk::modelFit::Parameter::DerivedType, mitk::modelFit::Parameter::EvaluationType, mitk::modelFit::ModelFitInfo::GetParameter(), mitk::BaseData::GetPropertyList(), mitkThrow, mitk::ModelFitConstants::PARAMETER_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::PARAMETER_SCALE_PROPERTY_NAME(), mitk::ModelFitConstants::PARAMETER_TYPE_PROPERTY_NAME(), mitk::ModelFitConstants::PARAMETER_TYPE_VALUE_CRITERION(), mitk::ModelFitConstants::PARAMETER_TYPE_VALUE_DERIVED_PARAMETER(), mitk::ModelFitConstants::PARAMETER_TYPE_VALUE_EVALUATION_PARAMETER(), mitk::ModelFitConstants::PARAMETER_TYPE_VALUE_PARAMETER(), mitk::ModelFitConstants::PARAMETER_UNIT_PROPERTY_NAME(), and mitk::modelFit::Parameter::ParameterType.
Referenced by SetModelFitDataProperties().
mitk::ScalarListLookupTableProperty::Pointer mitk::modelFit::ConvertStaticParametersToProperty | ( | const mitk::modelFit::StaticParameterMap & | params | ) |
Definition at line 185 of file mitkModelFitResultHelper.cpp.
References mitk::modelFit::StaticParameterMap::begin(), mitk::modelFit::StaticParameterMap::end(), and mitk::ScalarListLookupTable::SetTableValue().
Referenced by AdaptDataPropertyToModelFit().
mitk::modelFit::ModelFitInfo::Pointer mitk::modelFit::CreateFitInfoFromModelParameterizer | ( | const ModelParameterizerBase * | usedParameterizer, |
mitk::BaseData * | inputImage, | ||
const std::string & | fitType, | ||
const std::string & | fitName = "" , |
||
const NodeUIDType | roiUID = "" |
||
) |
creates a new ModelFitInfo instance from a passed modal instance and his traits instance*
usedModel | Pointer to a model which was used for a fit, which should get a fit info created. |
modelTraits | Pointer to traits interface for the model that was used for the fit. |
inputImage | Pointer to the input image. If it has no UID yet, a property will be added to the node. |
fitType | String identifying the type of the fit (e.g. ROI based or voxel based) |
fitName | Optional human readable name of the fit. |
roiUID | UID of the ROI, if one was used. |
Definition at line 262 of file mitkModelFitInfo.cpp.
References mitk::modelFit::Parameter::DerivedType, mitk::EnsureModelFitUID(), mitk::modelFit::ModelFitInfo::fitName, mitk::modelFit::ModelFitInfo::fitType, mitk::ModelTraitsInterface::GetClassID(), mitk::ModelTraitsInterface::GetDerivedParameterNames(), mitk::ModelTraitsInterface::GetDerivedParameterScales(), mitk::ModelTraitsInterface::GetDerivedParameterUnits(), mitk::ModelTraitsInterface::GetFunctionString(), mitk::ModelParameterizerBase::GetGlobalStaticParameters(), mitk::ModelTraitsInterface::GetModelDisplayName(), mitk::ModelTraitsInterface::GetModelType(), mitk::ModelTraitsInterface::GetParameterNames(), mitk::ModelTraitsInterface::GetParameterScales(), mitk::ModelTraitsInterface::GetParameterUnits(), mitk::UIDGenerator::GetUID(), mitk::ModelTraitsInterface::GetXAxisName(), mitk::ModelTraitsInterface::GetXAxisUnit(), mitk::ModelTraitsInterface::GetXName(), mitk::ModelTraitsInterface::GetYAxisName(), mitk::ModelTraitsInterface::GetYAxisUnit(), mitk::modelFit::ModelFitInfo::inputImage, mitkThrow, mitk::modelFit::Parameter::ParameterType, mitk::modelFit::ModelFitInfo::roiUID, mitk::modelFit::ModelFitInfo::staticParamMap, and mitk::modelFit::ModelFitInfo::uid.
Referenced by CreateFitInfoFromModelParameterizer(), Generate3StepLinearModelFit_PixelBased(), Generate3StepLinearModelFit_ROIBased(), generateAIFbasedModelFit_PixelBased(), generateAIFbasedModelFit_ROIBased(), generateDescriptiveBrixModel_PixelBased(), and generateDescriptiveBrixModel_ROIBased().
mitk::modelFit::ModelFitInfo::Pointer mitk::modelFit::CreateFitInfoFromModelParameterizer | ( | const ModelParameterizerBase * | usedParameterizer, |
mitk::BaseData * | inputImage, | ||
const std::string & | fitType, | ||
const ScalarListLookupTable & | inputData, | ||
const std::string & | fitName = "" , |
||
const NodeUIDType | roiUID = "" |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Overloaded version that allows additional definition of optional input data for the fit.
Definition at line 380 of file mitkModelFitInfo.cpp.
References CreateFitInfoFromModelParameterizer(), info(), and mitk::modelFit::ModelFitInfo::inputData.
mitk::modelFit::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. Returns the instance on success.
uid | The uid of the fit that should get its ModelFitInfo created and which identifies the nodes in the storage. |
storage | Pointer to the data storage containing any potential relevantThe nodes. |
Definition at line 120 of file mitkModelFitInfo.cpp.
References ExtractParameterFromData(), mitk::ModelFitConstants::FIT_INPUT_DATA_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_INPUT_IMAGEUID_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_INPUT_ROIUID_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_STATIC_PARAMETERS_PROPERTY_NAME(), mitk::ModelFitConstants::FIT_TYPE_PROPERTY_NAME(), mitk::ScalarListLookupTable::GetLookupTable(), GetMandatoryProperty(), mitk::GetNodeByModelFitUID(), GetNodesOfFit(), mitk::modelFit::ModelFitInfo::inputImage, MITK_ERROR, mitk::ModelFitConstants::MODEL_FUNCTION_CLASS_PROPERTY_NAME(), mitk::ModelFitConstants::MODEL_FUNCTION_PROPERTY_NAME(), mitk::ModelFitConstants::MODEL_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::MODEL_TYPE_PROPERTY_NAME(), mitk::ModelFitConstants::MODEL_X_PROPERTY_NAME(), mitk::modelFit::ModelFitInfo::uid, mitk::ModelFitConstants::XAXIS_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::XAXIS_UNIT_PROPERTY_NAME(), mitk::ModelFitConstants::YAXIS_NAME_PROPERTY_NAME(), and mitk::ModelFitConstants::YAXIS_UNIT_PROPERTY_NAME().
Referenced by mitkModelFitInfoTest().
mitk::DataNode::Pointer mitk::modelFit::CreateNode | ( | const ModelBase::ParameterNameType & | name, |
Image * | parameterImage, | ||
const ModelFitInfo * | fitInfo | ||
) |
Definition at line 153 of file mitkModelFitResultHelper.cpp.
References mitk::modelFit::ModelFitInfo::fitName, mitkThrow, and mitk::DataNode::New().
Referenced by CreateResultNode().
MITKMODELFIT_EXPORT mitk::DataNode::Pointer mitk::modelFit::CreateResultNode | ( | const ModelBase::ParameterNameType & | name, |
modelFit::Parameter::Type | nodeType, | ||
Image * | parameterImage, | ||
const ModelFitInfo * | modelFitInfo | ||
) |
Definition at line 207 of file mitkModelFitResultHelper.cpp.
References CreateNode(), mitkThrow, and SetModelFitDataProperties().
Referenced by CreateResultNodeMap().
MITKMODELFIT_EXPORT mitk::modelFit::ModelFitResultNodeVectorType mitk::modelFit::CreateResultNodeMap | ( | const ModelFitResultImageMapType & | results, |
const ModelFitResultImageMapType & | derivedResults, | ||
const ModelFitResultImageMapType & | criterionResults, | ||
const ModelFitResultImageMapType & | evaluationResults, | ||
const ModelFitInfo * | fitInfo | ||
) |
Definition at line 225 of file mitkModelFitResultHelper.cpp.
References CreateResultNode(), mitk::modelFit::Parameter::CriterionType, mitk::modelFit::Parameter::DerivedType, mitk::modelFit::Parameter::EvaluationType, mitkThrow, and mitk::modelFit::Parameter::ParameterType.
Referenced by ParameterFitBackgroundJob::run().
mitk::modelFit::Parameter::Pointer mitk::modelFit::ExtractParameterFromData | ( | const mitk::BaseData * | data | ) |
Extracts the parameter information stored in the data instance and returns it as parameter instance. If the data does not encode an parameter/fit result a Null pointer will be returned.
data | The data instance that contains parameter information that should be extracted. |
Definition at line 22 of file mitkModelFitParameter.cpp.
References mitk::modelFit::Parameter::CriterionType, mitk::modelFit::Parameter::DerivedType, mitk::modelFit::Parameter::EvaluationType, mitk::BaseData::GetPropertyList(), mitk::ModelFitConstants::PARAMETER_NAME_PROPERTY_NAME(), mitk::ModelFitConstants::PARAMETER_SCALE_PROPERTY_NAME(), mitk::ModelFitConstants::PARAMETER_TYPE_PROPERTY_NAME(), mitk::ModelFitConstants::PARAMETER_TYPE_VALUE_CRITERION(), mitk::ModelFitConstants::PARAMETER_TYPE_VALUE_DERIVED_PARAMETER(), mitk::ModelFitConstants::PARAMETER_TYPE_VALUE_EVALUATION_PARAMETER(), mitk::ModelFitConstants::PARAMETER_UNIT_PROPERTY_NAME(), and mitk::modelFit::Parameter::ParameterType.
Referenced by CreateFitInfoFromNode().
mitk::modelFit::NodeUIDSetType mitk::modelFit::GetFitUIDsOfNode | ( | const mitk::DataNode * | node, |
const mitk::DataStorage * | storage | ||
) |
Returns the UIDs of all fits that are derived (directly or indirectly from the passed node).
node | The node which defines the parent node. It will be searched in his derived nodes for fits. |
storage | Pointer to the data storage containing any potential relevant nodes. |
Definition at line 407 of file mitkModelFitInfo.cpp.
References mitk::ModelFitConstants::FIT_UID_PROPERTY_NAME(), mitk::DataStorage::GetDerivations(), mitk::NodePredicateDataProperty::New(), and mitk::modelFit::ModelFitInfo::uid.
Referenced by mitkModelFitInfoTest().
const std::string mitk::modelFit::GetMandatoryProperty | ( | const mitk::DataNode * | node, |
const std::string & | prop | ||
) |
Reads the string property with the given name from the data of the given node and returns its value. Throws a ModelFitException if the property doesn't exist.
node | The node whose property value should be returned. |
prop | The name of the property that should be read. |
ModelFitException | If the property doesn't exist or returns an empty string. |
Definition at line 87 of file mitkModelFitInfo.cpp.
References mitk::DataNode::GetData(), mitk::DataNode::GetName(), mitk::BaseData::GetPropertyList(), and mitkThrowException.
Referenced by CreateFitInfoFromNode(), and mitkModelFitInfoTest().
const std::string mitk::modelFit::GetMandatoryProperty | ( | const mitk::BaseData * | data, |
const std::string & | prop | ||
) |
Reads the string property with the given name from the given base data and returns its value. Throws a ModelFitException if the property doesn't exist.
data | The data whose property value should be returned. |
prop | The name of the property that should be read. |
ModelFitException | If the property doesn't exist or returns an empty string. |
Definition at line 104 of file mitkModelFitInfo.cpp.
References mitk::BaseData::GetPropertyList(), and mitkThrowException.
mitk::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.
fitUID | The uid of the fit that is relevant for the query. |
storage | Pointer to the data storage containing any potential relevant nodes. |
Definition at line 393 of file mitkModelFitInfo.cpp.
References mitk::ModelFitConstants::FIT_UID_PROPERTY_NAME(), mitk::DataStorage::GetSubset(), mitk::NodePredicateDataProperty::New(), and mitk::StringProperty::New().
Referenced by CreateFitInfoFromNode(), and mitkModelFitInfoTest().
|
inline |
Compares two var lists and returns true if the first list's first item is lower than the second one's.
a | The first list to compare the other one to. |
b | The other list to compare the first one to. |
Definition at line 139 of file mitkModelFitStaticParameterMap.h.
Referenced by Json::releaseStringValue(), and splitString().
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.
data | Instance that properties should be configured. |
name | Name of the parameter this data instance represents. |
dataType | Type of the parameter this data instance represents. |
fitInfo | Instance to the fit info that containes the information of the fit that derived the parameter. |
Definition at line 201 of file mitkModelFitResultHelper.cpp.
References AdaptDataPropertyToModelFit(), and AdaptDataPropertyToParameter().
Referenced by CreateResultNode(), mitk::storeModelFitResultImage(), and storeResultImage().
MITKMODELFIT_EXPORT void mitk::modelFit::StoreResultsInDataStorage | ( | DataStorage * | storage, |
const ModelFitResultNodeVectorType & | resultNodes, | ||
DataNode * | parentNode = nullptr |
||
) |
Definition at line 261 of file mitkModelFitResultHelper.cpp.
References mitk::DataStorage::Add(), mitk::DICOMPMPropertyHelper::DeriveDICOMPMProperties(), mitk::DICOMQIPropertyHelper::DeriveDICOMSourceProperties(), mitk::DataNode::GetData(), and mitkThrow.