Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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"
25 #include "mitkModelFitUIDHelper.h"
28 
29 #include "MitkModelFitExports.h"
30 
31 namespace mitk
32 {
33 
34  namespace modelFit
35  {
40  class MITKMODELFIT_EXPORT ModelFitInfo : public itk::LightObject
41  {
42  public:
44  typedef std::vector<Parameter::Pointer> ParamListType;
45  typedef ParamListType::const_iterator ConstIterType;
46 
47  mitkClassMacroItkParent(ModelFitInfo, itk::LightObject);
48  itkSimpleNewMacro(ModelFitInfo);
49 
51  x(mitk::ModelFitConstants::MODEL_X_VALUE_DEFAULT()),
52  xAxisName(mitk::ModelFitConstants::XAXIS_NAME_VALUE_DEFAULT()),
53  yAxisName(mitk::ModelFitConstants::YAXIS_NAME_VALUE_DEFAULT())
54  {
55  }
56 
62  void AddParameter(Parameter::Pointer p);
63 
71  Parameter::ConstPointer GetParameter(const std::string& name, const Parameter::Type& type)
72  const;
73 
80  void DeleteParameter(const std::string& name, const Parameter::Type& type);
81 
83  const ParamListType& GetParameters() const;
84 
86  std::string modelName;
88  std::string modelType;
90  std::string function;
92  std::string functionClassID;
94  std::string x;
95 
97  std::string xAxisName;
99  std::string xAxisUnit;
100 
102  std::string yAxisName;
104  std::string yAxisUnit;
105 
107  UIDType uid;
109  std::string fitName;
111  std::string fitType;
115  UIDType roiUID;
117  UIDType inputUID;
121 
122  private:
123  typedef ParamListType::iterator IterType;
125 
126  ParamListType parameterList;
127  itk::SimpleFastMutexLock mutex;
128  };
129 
138  MITKMODELFIT_EXPORT const std::string GetMandatoryProperty(const mitk::DataNode* node,
139  const std::string& prop);
140 
149  MITKMODELFIT_EXPORT const std::string GetMandatoryProperty(const mitk::BaseData* data,
150  const std::string& prop);
151 
160  MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromNode(const ModelFitInfo::UIDType& uid,
161  const mitk::DataStorage* storage);
162 
172  const ModelParameterizerBase* usedParameterizer, mitk::BaseData* inputImage,
173  const std::string& fitType, const std::string& fitName = "", const NodeUIDType roiUID = "");
177  const ModelParameterizerBase* usedParameterizer, mitk::BaseData* inputImage,
178  const std::string& fitType, const ScalarListLookupTable& inputData, const std::string& fitName = "",
179  const NodeUIDType roiUID = "");
180 
186  MITKMODELFIT_EXPORT DataStorage::SetOfObjects::ConstPointer GetNodesOfFit(
187  const ModelFitInfo::UIDType& fitUID,
188  const mitk::DataStorage* storage);
189 
190  typedef std::set<ModelFitInfo::UIDType> NodeUIDSetType;
196  MITKMODELFIT_EXPORT NodeUIDSetType GetFitUIDsOfNode(const mitk::DataNode* node,
197  const mitk::DataStorage* storage);
198 
199  }
200 }
201 
202 #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)
Base of all data objects.
Definition: mitkBaseData.h:37
DataCollection - Class to facilitate loading/accessing structured data.
mitk::Image::Pointer inputImage
Data class for modelfit properties that store a map of lists (e.g. static parameters).
StaticParameterMap staticParamMap
#define MITKMODELFIT_EXPORT
MITKMODELFIT_EXPORT ModelFitInfo::Pointer CreateFitInfoFromModelParameterizer(const ModelParameterizerBase *usedParameterizer, mitk::BaseData *inputImage, const std::string &fitType, const std::string &fitName="", const NodeUIDType roiUID="")
#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...
std::string NodeUIDType
Definition: mitkUIDHelper.h:26
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