Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkModelFitInfo.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkModelFitInfo_h
14 #define mitkModelFitInfo_h
15 
16 #include <mitkDataStorage.h>
17 
18 #include "mitkModelFitConstants.h"
19 #include "mitkModelFitParameter.h"
24 
25 #include "MitkModelFitExports.h"
26 
27 namespace mitk
28 {
29 
30  namespace modelFit
31  {
36  class MITKMODELFIT_EXPORT ModelFitInfo : public itk::LightObject
37  {
38  public:
39  typedef std::string UIDType;
40  typedef std::vector<Parameter::Pointer> ParamListType;
41  typedef ParamListType::const_iterator ConstIterType;
42 
43  mitkClassMacroItkParent(ModelFitInfo, itk::LightObject);
44  itkSimpleNewMacro(ModelFitInfo);
45 
47  x(mitk::ModelFitConstants::MODEL_X_VALUE_DEFAULT()),
48  xAxisName(mitk::ModelFitConstants::XAXIS_NAME_VALUE_DEFAULT()),
49  yAxisName(mitk::ModelFitConstants::YAXIS_NAME_VALUE_DEFAULT())
50  {
51  }
52 
58  void AddParameter(Parameter::Pointer p);
59 
67  Parameter::ConstPointer GetParameter(const std::string& name, const Parameter::Type& type)
68  const;
69 
76  void DeleteParameter(const std::string& name, const Parameter::Type& type);
77 
79  const ParamListType& GetParameters() const;
80 
82  std::string modelName;
84  std::string modelType;
86  std::string function;
88  std::string functionClassID;
90  std::string x;
91 
93  std::string xAxisName;
95  std::string xAxisUnit;
96 
98  std::string yAxisName;
100  std::string yAxisUnit;
101 
105  std::string fitName;
107  std::string fitType;
115 
116  private:
117  typedef ParamListType::iterator IterType;
118  typedef std::lock_guard<std::mutex> LockType;
119 
120  ParamListType parameterList;
121  std::mutex mutex;
122  };
123 
132  MITKMODELFIT_EXPORT const std::string GetMandatoryProperty(const mitk::DataNode* node,
133  const std::string& prop);
134 
143  MITKMODELFIT_EXPORT const std::string GetMandatoryProperty(const mitk::BaseData* data,
144  const std::string& prop);
145 
154  MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromNode(const ModelFitInfo::UIDType& uid,
155  const mitk::DataStorage* storage);
156 
165  const ModelParameterizerBase* usedParameterizer, mitk::BaseData* inputImage,
166  const std::string& fitType, const std::string& fitName = "", const ModelFitInfo::UIDType& roiUID = "");
170  const ModelParameterizerBase* usedParameterizer, mitk::BaseData* inputImage,
171  const std::string& fitType, const ScalarListLookupTable& inputData, const std::string& fitName = "",
172  const ModelFitInfo::UIDType& roiUID = "");
173 
179  MITKMODELFIT_EXPORT DataStorage::SetOfObjects::ConstPointer GetNodesOfFit(
180  const ModelFitInfo::UIDType& fitUID,
181  const mitk::DataStorage* storage);
182 
183  typedef std::set<ModelFitInfo::UIDType> NodeUIDSetType;
190  const mitk::DataStorage* storage);
191 
192  }
193 }
194 
195 #endif
mitk::modelFit::ModelFitInfo::yAxisUnit
std::string yAxisUnit
Definition: mitkModelFitInfo.h:100
mitk::modelFit::GetMandatoryProperty
const MITKMODELFIT_EXPORT 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....
mitkModelTraitsInterface.h
mitk::ModelParameterizerBase
Definition: mitkModelParameterizerBase.h:36
mitk::modelFit::ModelFitInfo::x
std::string x
Definition: mitkModelFitInfo.h:90
MitkModelFitExports.h
mitkDataStorage.h
mitk::modelFit::ModelFitInfo::inputImage
mitk::Image::ConstPointer inputImage
Definition: mitkModelFitInfo.h:114
mitk::modelFit::ModelFitInfo
Data class that stores all information about a modelfit that is relevant to the visualization and sto...
Definition: mitkModelFitInfo.h:36
mitkModelFitStaticParameterMap.h
mitk::modelFit::ModelFitInfo::modelType
std::string modelType
Definition: mitkModelFitInfo.h:84
mitk::modelFit::ModelFitInfo::fitName
std::string fitName
Definition: mitkModelFitInfo.h:105
mitk::modelFit::ModelFitInfo::yAxisName
std::string yAxisName
Definition: mitkModelFitInfo.h:98
mitk::ModelFitConstants
Definition: mitkModelFitConstants.h:22
mitk::modelFit::ModelFitInfo::roiUID
UIDType roiUID
Definition: mitkModelFitInfo.h:111
mitk::modelFit::CreateFitInfoFromNode
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 ...
itk::SmartPointer< const Self >
mitk::modelFit::GetNodesOfFit
MITKMODELFIT_EXPORT DataStorage::SetOfObjects::ConstPointer GetNodesOfFit(const ModelFitInfo::UIDType &fitUID, const mitk::DataStorage *storage)
mitk::modelFit::ModelFitInfo::modelName
std::string modelName
Definition: mitkModelFitInfo.h:82
mitk::modelFit::ModelFitInfo::UIDType
std::string UIDType
Definition: mitkModelFitInfo.h:39
mitkModelFitConstants.h
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk::modelFit::Parameter::Type
Type
Definition: mitkModelFitParameter.h:34
MITKMODELFIT_EXPORT
#define MITKMODELFIT_EXPORT
Definition: MitkModelFitExports.h:15
mitk::modelFit::GetFitUIDsOfNode
MITKMODELFIT_EXPORT NodeUIDSetType GetFitUIDsOfNode(const mitk::DataNode *node, const mitk::DataStorage *storage)
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ScalarListLookupTable
Data class for modelfit properties that store a map of lists (e.g. static parameters).
Definition: mitkScalarListLookupTable.h:29
mitk::modelFit::ModelFitInfo::ModelFitInfo
ModelFitInfo()
Definition: mitkModelFitInfo.h:46
mitk::modelFit::ModelFitInfo::staticParamMap
StaticParameterMap staticParamMap
Definition: mitkModelFitInfo.h:109
mitk::modelFit::ModelFitInfo::xAxisName
std::string xAxisName
Definition: mitkModelFitInfo.h:93
mitk::modelFit::CreateFitInfoFromModelParameterizer
MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromModelParameterizer(const ModelParameterizerBase *usedParameterizer, mitk::BaseData *inputImage, const std::string &fitType, const std::string &fitName="", const ModelFitInfo::UIDType &roiUID="")
mitk::modelFit::ModelFitInfo::ConstIterType
ParamListType::const_iterator ConstIterType
Definition: mitkModelFitInfo.h:41
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
mitk::modelFit::ModelFitInfo::inputData
ScalarListLookupTable inputData
Definition: mitkModelFitInfo.h:113
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
mitk::modelFit::ModelFitInfo::fitType
std::string fitType
Definition: mitkModelFitInfo.h:107
mitk::modelFit::ModelFitInfo::xAxisUnit
std::string xAxisUnit
Definition: mitkModelFitInfo.h:95
mitk::modelFit::ModelFitInfo::ParamListType
std::vector< Parameter::Pointer > ParamListType
Definition: mitkModelFitInfo.h:40
mitkModelParameterizerBase.h
mitk::modelFit::StaticParameterMap
Definition: mitkModelFitStaticParameterMap.h:28
mitk::modelFit::ModelFitInfo::functionClassID
std::string functionClassID
Definition: mitkModelFitInfo.h:88
mitkModelFitParameter.h
mitk::modelFit::ModelFitInfo::uid
UIDType uid
Definition: mitkModelFitInfo.h:103
mitk::modelFit::NodeUIDSetType
std::set< ModelFitInfo::UIDType > NodeUIDSetType
Definition: mitkModelFitInfo.h:183
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
mitkScalarListLookupTable.h