Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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 #include <nlohmann/json_fwd.hpp>
20 
21 #include "MitkModelFitExports.h"
22 
23 namespace mitk
24 {
30  {
31  public:
32  typedef std::string KeyType;
33  typedef std::vector<double> ValueType;
34  typedef std::map<KeyType, ValueType> LookupTableType;
35  typedef std::pair<KeyType, ValueType> EntryType;
36 
39 
40  virtual const char* GetNameOfClass() const;
41 
47  void SetTableValue(const KeyType& key, const ValueType& value);
48 
54  bool ValueExists(const KeyType& key) const;
55 
62  const ValueType& GetTableValue(const KeyType& key) const;
63 
68  const LookupTableType& GetLookupTable() const;
69 
70  void SetLookupTable(const LookupTableType& table);
71 
72  bool operator==(const ScalarListLookupTable& lookupTable) const;
73  bool operator!=(const ScalarListLookupTable& lookupTable) const;
74 
75  virtual ScalarListLookupTable& operator=(const ScalarListLookupTable& other);
76 
77  protected:
79  };
80 
88  MITKMODELFIT_EXPORT std::ostream& operator<<(std::ostream& stream,
89  const ScalarListLookupTable& l);
90 
93 }
94 
95 #endif
mitk::ScalarListLookupTable::KeyType
std::string KeyType
Definition: mitkScalarListLookupTable.h:32
mitk::ScalarListLookupTable::m_LookupTable
LookupTableType m_LookupTable
Definition: mitkScalarListLookupTable.h:78
mitk::ScalarListLookupTable::LookupTableType
std::map< KeyType, ValueType > LookupTableType
Definition: mitkScalarListLookupTable.h:34
mitk::to_json
void to_json(nlohmann::json &j, const GenericLookupTable< T > &t)
Definition: mitkGenericLookupTable.h:98
MitkModelFitExports.h
mitk::operator<<
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
mitk::from_json
void from_json(const nlohmann::json &, GenericLookupTable< T > &)
Definition: mitkGenericLookupTable.h:104
mitk::ScalarListLookupTable::ValueType
std::vector< double > ValueType
Definition: mitkScalarListLookupTable.h:33
MITKMODELFIT_EXPORT
#define MITKMODELFIT_EXPORT
Definition: MitkModelFitExports.h:15
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ScalarListLookupTable
Data class for modelfit properties that store a map of lists (e.g. static parameters).
Definition: mitkScalarListLookupTable.h:29
mitk::operator!=
MITKCORE_EXPORT bool operator!=(const InteractionEvent &a, const InteractionEvent &b)
mitk::ScalarListLookupTable::EntryType
std::pair< KeyType, ValueType > EntryType
Definition: mitkScalarListLookupTable.h:35
json
nlohmann::json json
Definition: mitkModelTestFixture.h:29
mitk::operator==
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
mitk::ScalarListLookupTable::~ScalarListLookupTable
virtual ~ScalarListLookupTable()
Definition: mitkScalarListLookupTable.h:38
mitk::ScalarListLookupTable::ScalarListLookupTable
ScalarListLookupTable()
Definition: mitkScalarListLookupTable.h:37