Medical Imaging Interaction Toolkit  2021.10.99-9c07a326
Medical Imaging Interaction Toolkit
mitkScalarListLookupTable.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 mitkScalarListLookupTable_h
14 #define mitkScalarListLookupTable_h
15 
16 #include <string>
17 #include <vector>
18 #include <map>
19 
20 #include "MitkModelFitExports.h"
21 
22 namespace mitk
23 {
29  {
30  public:
31  typedef std::string KeyType;
32  typedef std::vector<double> ValueType;
33  typedef std::map<KeyType, ValueType> LookupTableType;
34  typedef std::pair<KeyType, ValueType> EntryType;
35 
38 
39  virtual const char* GetNameOfClass() const;
40 
46  void SetTableValue(const KeyType& key, const ValueType& value);
47 
53  bool ValueExists(const KeyType& key) const;
54 
61  const ValueType& GetTableValue(const KeyType& key) const;
62 
67  const LookupTableType& GetLookupTable() const;
68 
69  void SetLookupTable(const LookupTableType& table);
70 
71  bool operator==(const ScalarListLookupTable& lookupTable) const;
72  bool operator!=(const ScalarListLookupTable& lookupTable) const;
73 
74  virtual ScalarListLookupTable& operator=(const ScalarListLookupTable& other);
75 
76  protected:
77  LookupTableType m_LookupTable;
78  };
79 
87  MITKMODELFIT_EXPORT std::ostream& operator<<(std::ostream& stream,
88  const ScalarListLookupTable& l);
89 }
90 
91 #endif // mitkScalarListLookupTable_h
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
DataCollection - Class to facilitate loading/accessing structured data.
Data class for modelfit properties that store a map of lists (e.g. static parameters).
#define MITKMODELFIT_EXPORT
std::pair< KeyType, ValueType > EntryType
MITKCORE_EXPORT bool operator!=(const InteractionEvent &a, const InteractionEvent &b)
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
std::map< KeyType, ValueType > LookupTableType