Medical Imaging Interaction Toolkit  2018.4.99-b20efe7f
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 <itkMutexLockHolder.h>
17 #include <itkSimpleFastMutexLock.h>
18 
19 #include <mitkDataStorage.h>
20 
21 #include "mitkModelFitConstants.h"
22 #include "mitkModelFitParameter.h"
27 
28 #include "MitkModelFitExports.h"
29 
30 namespace mitk
31 {
32 
33  namespace modelFit
34  {
39  class MITKMODELFIT_EXPORT ModelFitInfo : public itk::LightObject
40  {
41  public:
42  typedef std::string UIDType;
43  typedef std::vector<Parameter::Pointer> ParamListType;
44  typedef ParamListType::const_iterator ConstIterType;
45 
46  mitkClassMacroItkParent(ModelFitInfo, itk::LightObject);
47  itkSimpleNewMacro(ModelFitInfo);
48 
50  x(mitk::ModelFitConstants::MODEL_X_VALUE_DEFAULT()),
51  xAxisName(mitk::ModelFitConstants::XAXIS_NAME_VALUE_DEFAULT()),
52  yAxisName(mitk::ModelFitConstants::YAXIS_NAME_VALUE_DEFAULT())
53  {
54  }
55 
61  void AddParameter(Parameter::Pointer p);
62 
70  Parameter::ConstPointer GetParameter(const std::string& name, const Parameter::Type& type)
71  const;
72 
79  void DeleteParameter(const std::string& name, const Parameter::Type& type);
80 
82  const ParamListType& GetParameters() const;
83 
85  std::string modelName;
87  std::string modelType;
89  std::string function;
91  std::string functionClassID;
93  std::string x;
94 
96  std::string xAxisName;
98  std::string xAxisUnit;
99 
101  std::string yAxisName;
103  std::string yAxisUnit;
104 
106  UIDType uid;
108  std::string fitName;
110  std::string fitType;
114  UIDType roiUID;
118 
119  private:
120  typedef ParamListType::iterator IterType;
122 
123  ParamListType parameterList;
124  itk::SimpleFastMutexLock mutex;
125  };
126 
135  MITKMODELFIT_EXPORT const std::string GetMandatoryProperty(const mitk::DataNode* node,
136  const std::string& prop);
137 
146  MITKMODELFIT_EXPORT const std::string GetMandatoryProperty(const mitk::BaseData* data,
147  const std::string& prop);
148 
157  MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromNode(const ModelFitInfo::UIDType& uid,
158  const mitk::DataStorage* storage);
159 
169  const ModelParameterizerBase* usedParameterizer, mitk::BaseData* inputImage,
170  const std::string& fitType, const std::string& fitName = "", const ModelFitInfo::UIDType& roiUID = "");
174  const ModelParameterizerBase* usedParameterizer, mitk::BaseData* inputImage,
175  const std::string& fitType, const ScalarListLookupTable& inputData, const std::string& fitName = "",
176  const ModelFitInfo::UIDType& roiUID = "");
177 
183  MITKMODELFIT_EXPORT DataStorage::SetOfObjects::ConstPointer GetNodesOfFit(
184  const ModelFitInfo::UIDType& fitUID,
185  const mitk::DataStorage* storage);
186 
187  typedef std::set<ModelFitInfo::UIDType> NodeUIDSetType;
193  MITKMODELFIT_EXPORT NodeUIDSetType GetFitUIDsOfNode(const mitk::DataNode* node,
194  const mitk::DataStorage* storage);
195 
196  }
197 }
198 
199 #endif // mitkModelFit_h
MITKMODELFIT_EXPORT NodeUIDSetType GetFitUIDsOfNode(const mitk::DataNode *node, const mitk::DataStorage *storage)
Data management class that handles &#39;was created by&#39; relations.
MITKMODELFIT_EXPORT DataStorage::SetOfObjects::ConstPointer GetNodesOfFit(const ModelFitInfo::UIDType &fitUID, const mitk::DataStorage *storage)
mitk::Image::ConstPointer inputImage
Base of all data objects.
Definition: mitkBaseData.h:42
DataCollection - Class to facilitate loading/accessing structured data.
MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromModelParameterizer(const ModelParameterizerBase *usedParameterizer, mitk::BaseData *inputImage, const std::string &fitType, const std::string &fitName="", const ModelFitInfo::UIDType &roiUID="")
Data class for modelfit properties that store a map of lists (e.g. static parameters).
StaticParameterMap staticParamMap
#define MITKMODELFIT_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
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 ...
Data class that stores all information about a modelfit that is relevant to the visualization and sto...
ScalarListLookupTable inputData
std::set< ModelFitInfo::UIDType > NodeUIDSetType
ParamListType::const_iterator ConstIterType
std::vector< Parameter::Pointer > ParamListType
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...
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57