Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkTransferFunctionProperty.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 mitkTransferFunctionProperty_h
13 #define mitkTransferFunctionProperty_h
14 
15 #include <mitkBaseProperty.h>
16 #include <mitkTransferFunction.h>
17 
18 namespace mitk
19 {
39  {
40  public:
42  typedef mitk::TransferFunction::Pointer ValueType;
43 
45 
46  itkFactorylessNewMacro(Self);
47 
48  itkCloneMacro(Self)
50 
55  itkSetMacro(Value, mitk::TransferFunction::Pointer);
56 
61  itkGetConstMacro(Value, mitk::TransferFunction::Pointer);
62 
67  std::string GetValueAsString() const override;
68 
78  bool ToJSON(nlohmann::json& j) const override;
79 
90  bool FromJSON(const nlohmann::json& j) override;
91 
92  using BaseProperty::operator=;
93 
94  protected:
95  mitk::TransferFunction::Pointer m_Value;
96 
99 
101 
103 
104  private:
105  // purposely not implemented
107 
108  bool IsEqual(const BaseProperty &property) const override;
109  bool Assign(const BaseProperty &property) override;
110  };
111 
112 
113 } // namespace mitk
114 
115 #endif
#define MITKCORE_EXPORT
Abstract base class for properties.
Property for storing a mitk::TransferFunction.
mitk::TransferFunction::Pointer ValueType
The type of the value stored by this property.
mitkClassMacro(TransferFunctionProperty, BaseProperty)
Wrapper for VTK scalar opacity, gradient opacity, and color transfer functions.
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:62
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:148
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).