Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkModelFitStaticParameterMap.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 mitkModelFitStaticParameterMap_h
14 #define mitkModelFitStaticParameterMap_h
15 
16 #include <vector>
17 #include <string>
18 #include <map>
19 
20 #include "MitkModelFitExports.h"
21 #include "mitkModelBase.h"
22 
23 namespace mitk
24 {
25  namespace modelFit
26  {
29  {
30  private:
32  typedef ModelBase::ParameterNameType KeyType;
33 
34  public:
38  typedef std::pair<KeyType, ValueType> StaticParameterType;
39 
40  private:
42  typedef ModelBase::StaticParameterMapType MapType;
43 
44  /* @brief Stores the variables with their value lists */
45  MapType m_map;
46 
51  unsigned int m_numValues;
52 
53  public:
55  typedef MapType::const_iterator const_iterator;
56 
57  StaticParameterMap() : m_numValues(1) {}
58 
74  void Add(const std::string& name, const ValueType& newList);
75 
82  const ValueType& Get(const std::string& name) const;
83 
84  MapType::size_type Size() const
85  {
86  return m_map.size();
87  }
88 
90  {
91  return m_map.begin();
92  }
93 
95  {
96  return m_map.end();
97  }
98 
124  void Sort(const std::string& name = "");
125 
129  void Clear();
130  };
131 
140  {
141  return (a.front() < b.front());
142  }
143  }
144 }
145 
146 #endif
mitk::modelFit::StaticParameterMap::Size
MapType::size_type Size() const
Definition: mitkModelFitStaticParameterMap.h:84
mitk::modelFit::StaticParameterMap::StaticParameterMap
StaticParameterMap()
Definition: mitkModelFitStaticParameterMap.h:57
MitkModelFitExports.h
mitk::ModelBase::StaticParameterValuesType
std::vector< StaticParameterValueType > StaticParameterValuesType
Definition: mitkModelBase.h:71
mitk::modelFit::operator<
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...
Definition: mitkModelFitStaticParameterMap.h:139
mitk::ModelBase::ParameterNameType
ModelTraitsInterface::ParameterNameType ParameterNameType
Definition: mitkModelBase.h:63
mitk::modelFit::StaticParameterMap::const_iterator
MapType::const_iterator const_iterator
Needed for 'foreach' support.
Definition: mitkModelFitStaticParameterMap.h:55
mitk::modelFit::StaticParameterMap::end
const_iterator end() const
Definition: mitkModelFitStaticParameterMap.h:94
mitk::modelFit::StaticParameterMap::StaticParameterType
std::pair< KeyType, ValueType > StaticParameterType
Type of a variable, consisting of name and value list.
Definition: mitkModelFitStaticParameterMap.h:38
MITKMODELFIT_EXPORT
#define MITKMODELFIT_EXPORT
Definition: MitkModelFitExports.h:15
mitkModelBase.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::modelFit::StaticParameterMap
Definition: mitkModelFitStaticParameterMap.h:28
mitk::MitkMultilabelIOMimeTypes::Get
MITKMULTILABELIO_EXPORT std::vector< CustomMimeType * > Get()
mitk::modelFit::StaticParameterMap::ValueType
ModelBase::StaticParameterValuesType ValueType
Type of the map value.
Definition: mitkModelFitStaticParameterMap.h:36
mitk::modelFit::StaticParameterMap::begin
const_iterator begin() const
Definition: mitkModelFitStaticParameterMap.h:89
mitk::ModelBase::StaticParameterMapType
std::map< ParameterNameType, StaticParameterValuesType > StaticParameterMapType
Definition: mitkModelBase.h:72