Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkLevelWindowProperty.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 mitkLevelWindowProperty_h
13 #define mitkLevelWindowProperty_h
14 
15 #include <mitkBaseProperty.h>
16 #include <mitkLevelWindow.h>
17 
18 namespace mitk
19 {
38  {
39  protected:
41 
43 
45 
47 
49 
50  public:
52 
53  itkFactorylessNewMacro(Self);
54 
56 
59 
61 
67 
72  const mitk::LevelWindow &GetValue() const;
73 
81  void SetLevelWindow(const LevelWindow &levWin);
82 
88  void SetValue(const ValueType &levWin);
89 
97  std::string GetValueAsString() const override;
98 
105  bool ToJSON(nlohmann::json& j) const override;
106 
113  bool FromJSON(const nlohmann::json& j) override;
114 
115  using BaseProperty::operator=;
116 
117  private:
118  // purposely not implemented
119  LevelWindowProperty &operator=(const LevelWindowProperty &);
120 
121  bool IsEqual(const BaseProperty &property) const override;
122  bool Assign(const BaseProperty &property) override;
123  };
124 
125 
126 } // namespace mitk
127 
128 #endif
#define MITKCORE_EXPORT
Abstract base class for properties.
Property for storing a mitk::LevelWindow value.
const mitk::LevelWindow & GetValue() const
Get the level window value (alias for GetLevelWindow()).
LevelWindowProperty(const LevelWindowProperty &other)
void SetValue(const ValueType &levWin)
Set the level window value (alias for SetLevelWindow()).
LevelWindow ValueType
The type of the value stored by this property.
const mitk::LevelWindow & GetLevelWindow() const
Get the level window value.
std::string GetValueAsString() const override
Return the level window as a human-readable string.
bool FromJSON(const nlohmann::json &j) override
Deserialize the level window value from JSON.
LevelWindowProperty(const mitk::LevelWindow &levWin)
mitkClassMacro(LevelWindowProperty, BaseProperty)
bool ToJSON(nlohmann::json &j) const override
Serialize the level window value to JSON.
void SetLevelWindow(const LevelWindow &levWin)
Set the level window value.
mitkCloneMacro(LevelWindowProperty)
The LevelWindow class Class to store level/window values.
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:62
nlohmann::json json
Find image slices visible on a given plane.