Medical Imaging Interaction Toolkit  2026.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  {
38  class MITKMODELFIT_EXPORT ModelFitInfo : public itk::LightObject
39  {
40  public:
41  typedef std::string UIDType;
42  typedef std::vector<Parameter::Pointer> ParamListType;
43  typedef ParamListType::const_iterator ConstIterType;
44 
47 
49  x(mitk::ModelFitConstants::MODEL_X_VALUE_DEFAULT()),
50  xAxisName(mitk::ModelFitConstants::XAXIS_NAME_VALUE_DEFAULT()),
51  yAxisName(mitk::ModelFitConstants::YAXIS_NAME_VALUE_DEFAULT())
52  {
53  }
54 
59  void AddParameter(Parameter::Pointer p);
60 
67  Parameter::ConstPointer GetParameter(const std::string& name, const Parameter::Type& type)
68  const;
69 
75  void DeleteParameter(const std::string& name, const Parameter::Type& type);
76 
78  const ParamListType& GetParameters() const;
79 
81  std::string modelName;
83  std::string modelType;
85  std::string function;
87  std::string functionClassID;
89  std::string x;
90 
92  std::string xAxisName;
94  std::string xAxisUnit;
95 
97  std::string yAxisName;
99  std::string yAxisUnit;
100 
104  std::string fitName;
106  std::string fitType;
113  mitk::Image::ConstPointer inputImage;
114 
115  private:
116  typedef ParamListType::iterator IterType;
117  typedef std::lock_guard<std::mutex> LockType;
118 
119  ParamListType parameterList;
120  std::mutex mutex;
121  };
122 
131  const std::string& prop);
132 
141  const std::string& prop);
142 
152  const mitk::DataStorage* storage);
153 
164  const ModelParameterizerBase* usedParameterizer, mitk::BaseData* inputImage,
165  const std::string& fitType, const std::string& fitName = "", const ModelFitInfo::UIDType& roiUID = "");
166 
169  const ModelParameterizerBase* usedParameterizer, mitk::BaseData* inputImage,
170  const std::string& fitType, const ScalarListLookupTable& inputData, const std::string& fitName = "",
171  const ModelFitInfo::UIDType& roiUID = "");
172 
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;
184 
192  const mitk::DataStorage* storage);
193 
194  }
195 }
196 
197 #endif
#define MITKMODELFIT_EXPORT
Base class of all data objects.
Definition: mitkBaseData.h:60
Central node class of the MITK data tree, associating a data object with properties and mappers.
Definition: mitkDataNode.h:72
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Data class for model fit properties that store a map of lists (e.g. static parameters).
Data class that stores all information about a model fit relevant to visualization.
mitkClassMacroItkParent(ModelFitInfo, itk::LightObject)
const ParamListType & GetParameters() const
Returns a const reference to the parameter list.
void AddParameter(Parameter::Pointer p)
Adds the given parameter to this fit's parameter list if it doesn't exist already.
void DeleteParameter(const std::string &name, const Parameter::Type &type)
Removes the parameter with the given name and type from the list.
Parameter::ConstPointer GetParameter(const std::string &name, const Parameter::Type &type) const
Searches for the parameter with the given name and type and returns it.
std::vector< Parameter::Pointer > ParamListType
ScalarListLookupTable inputData
StaticParameterMap staticParamMap
ParamListType::const_iterator ConstIterType
mitk::Image::ConstPointer inputImage
Data structure that stores information about the static parameters of a model fit.
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.
MITKMODELFIT_EXPORT const std::string GetMandatoryProperty(const mitk::DataNode *node, const std::string &prop)
Reads a mandatory string property from a data node.
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.
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.
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.
std::set< ModelFitInfo::UIDType > NodeUIDSetType
Find image slices visible on a given plane.