Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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:
78  };
79 
87  MITKMODELFIT_EXPORT std::ostream& operator<<(std::ostream& stream,
88  const ScalarListLookupTable& l);
89 }
90 
91 #endif
mitk::ScalarListLookupTable::KeyType
std::string KeyType
Definition: mitkScalarListLookupTable.h:31
mitk::ScalarListLookupTable::m_LookupTable
LookupTableType m_LookupTable
Definition: mitkScalarListLookupTable.h:77
mitk::ScalarListLookupTable::LookupTableType
std::map< KeyType, ValueType > LookupTableType
Definition: mitkScalarListLookupTable.h:33
MitkModelFitExports.h
mitk::operator<<
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
mitk::ScalarListLookupTable::ValueType
std::vector< double > ValueType
Definition: mitkScalarListLookupTable.h:32
MITKMODELFIT_EXPORT
#define MITKMODELFIT_EXPORT
Definition: MitkModelFitExports.h:15
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::ScalarListLookupTable
Data class for modelfit properties that store a map of lists (e.g. static parameters).
Definition: mitkScalarListLookupTable.h:28
mitk::operator!=
MITKCORE_EXPORT bool operator!=(const InteractionEvent &a, const InteractionEvent &b)
mitk::ScalarListLookupTable::EntryType
std::pair< KeyType, ValueType > EntryType
Definition: mitkScalarListLookupTable.h:34
mitk::operator==
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
mitk::ScalarListLookupTable::~ScalarListLookupTable
virtual ~ScalarListLookupTable()
Definition: mitkScalarListLookupTable.h:37
mitk::ScalarListLookupTable::ScalarListLookupTable
ScalarListLookupTable()
Definition: mitkScalarListLookupTable.h:36