Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkClippingProperty.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 mitkClippingProperty_h
14 #define mitkClippingProperty_h
15 
16 #include <mitkBaseProperty.h>
17 #include <mitkNumericTypes.h>
18 #include <MitkCoreExports.h>
19 
20 #include <itkConfigure.h>
21 
22 #include <string>
23 
24 namespace mitk
25 {
40  {
41  public:
43 
45  typedef std::string ValueType;
46 
47  itkFactorylessNewMacro(Self);
48 
49  itkCloneMacro(Self)
51 
56  bool GetClippingEnabled() const;
57 
65  void SetClippingEnabled(bool enabled);
66 
71  const Point3D &GetOrigin() const;
72 
80  void SetOrigin(const Point3D &origin);
81 
86  const Vector3D &GetNormal() const;
87 
95  void SetNormal(const Vector3D &normal);
96 
101  std::string GetValueAsString() const override;
102 
111  bool ToJSON(nlohmann::json& j) const override;
112 
121  bool FromJSON(const nlohmann::json& j) override;
122 
123  using BaseProperty::operator=;
124 
125  protected:
126  bool m_ClippingEnabled;
127 
128  Point3D m_Origin;
129  Vector3D m_Normal;
130 
133  ClippingProperty(const Point3D &origin, const Vector3D &normal);
134 
136 
137  private:
138  // purposely not implemented
139  ClippingProperty &operator=(const ClippingProperty &);
140 
141  bool IsEqual(const BaseProperty &property) const override;
142  bool Assign(const BaseProperty &property) override;
143  };
144 
145 
146 } // namespace mitk
147 
148 #endif
void SetOrigin(mitk::TimeGeometry *tg, const std::array< double, 3 > &origin, mitk::TimeStepType t)
Sets the origin at the given time step.
std::tuple< double, double, double > GetOrigin(const mitk::TimeGeometry *tg, mitk::TimeStepType t)
Returns the origin (x, y, z) at the given time step.
#define MITKCORE_EXPORT
Abstract base class for properties.
Property for defining a clipping plane for datasets.
mitkClassMacro(ClippingProperty, BaseProperty)
std::string ValueType
The type used for string-based value representation.
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:75
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:148
nlohmann::json json
Convenience header that includes all MITK numeric types.
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).