Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkLookupTableProperty.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 #ifndef mitkLookupTableProperty_h
13 #define mitkLookupTableProperty_h
14 
15 #include <mitkBaseProperty.h>
16 #include <mitkLookupTable.h>
17 #include <MitkCoreExports.h>
18 
19 namespace mitk
20 {
38  {
39  protected:
40  LookupTable::Pointer m_LookupTable;
41 
43 
45 
46  LookupTableProperty(const mitk::LookupTable::Pointer lut);
47 
49 
50  public:
52  typedef LookupTable::Pointer ValueType;
53 
55 
56  itkFactorylessNewMacro(Self);
57 
58  itkCloneMacro(Self)
60 
65  itkGetObjectMacro(LookupTable, LookupTable);
66 
71  ValueType GetValue() const;
72 
80  void SetLookupTable(const mitk::LookupTable::Pointer aLookupTable);
81 
87  void SetValue(const ValueType &);
88 
96  std::string GetValueAsString() const override;
97 
107  bool ToJSON(nlohmann::json& j) const override;
108 
115  bool FromJSON(const nlohmann::json& j) override;
116 
117  using BaseProperty::operator=;
118 
119  private:
120  // purposely not implemented
121  LookupTableProperty &operator=(const LookupTableProperty &);
122 
123  bool IsEqual(const BaseProperty &property) const override;
124  bool Assign(const BaseProperty &property) override;
125  };
126 
127 } // namespace mitk
128 
129 #endif
#define MITKCORE_EXPORT
Abstract base class for properties.
Property to associate a mitk::LookupTable with a DataNode.
LookupTable::Pointer ValueType
The type of the value stored by this property.
LookupTable::Pointer m_LookupTable
mitkCloneMacro(LookupTableProperty)
LookupTableProperty(const LookupTableProperty &)
LookupTableProperty(const mitk::LookupTable::Pointer lut)
mitkClassMacro(LookupTableProperty, BaseProperty)
MITK wrapper for a vtkLookupTable.
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:62
nlohmann::json json
Find image slices visible on a given plane.
MITKCORE_EXPORT void ToJSON(nlohmann::json &j, AffineTransform3D::ConstPointer transform)
Serialize an AffineTransform3D to a JSON array with 16 elements (row-major 4x4 matrix).
MITKCORE_EXPORT void FromJSON(const nlohmann::json &j, AffineTransform3D::Pointer transform)
Deserialize an AffineTransform3D from a JSON array with 16 elements (row-major 4x4 matrix).