Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ClippingProperty Class Reference

Property for defining a clipping plane for datasets. More...

#include <mitkClippingProperty.h>

Inheritance diagram for mitk::ClippingProperty:
Collaboration diagram for mitk::ClippingProperty:

Public Types

typedef std::string ValueType
 The type used for string-based value representation. More...
 

Public Member Functions

 mitkClassMacro (ClippingProperty, BaseProperty)
 
Pointer Clone () const
 
 mitkNewMacro2Param (ClippingProperty, const Point3D &, const Vector3D &)
 
bool GetClippingEnabled () const
 Check whether clipping is enabled. More...
 
void SetClippingEnabled (bool enabled)
 Enable or disable clipping. More...
 
const Point3D & GetOrigin () const
 Get the origin point of the clipping plane. More...
 
void SetOrigin (const Point3D &origin)
 Set the origin point of the clipping plane. More...
 
const Vector3D & GetNormal () const
 Get the normal vector of the clipping plane. More...
 
void SetNormal (const Vector3D &normal)
 Set the normal vector of the clipping plane. More...
 
std::string GetValueAsString () const override
 Return the clipping state and plane parameters as a string. More...
 
bool ToJSON (nlohmann::json &j) const override
 Serialize the clipping property to JSON. More...
 
bool FromJSON (const nlohmann::json &j) override
 Deserialize the clipping property from JSON. More...
 
BaseProperty & operator= (const BaseProperty &property)
 Assign a property value to this instance. More...
 
- Public Member Functions inherited from mitk::BaseProperty
 mitkClassMacroItkParent (BaseProperty, itk::Object)
 
Pointer Clone () const
 
bool operator== (const BaseProperty &property) const
 Compare two properties for equality. More...
 
BaseProperty & operator= (const BaseProperty &property)
 Assign a property value to this instance. More...
 
bool AssignProperty (const BaseProperty &property)
 Assign a property value to this instance and report success. More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ClippingProperty ()
 
 ClippingProperty (const ClippingProperty &other)
 
 ClippingProperty (const Point3D &origin, const Vector3D &normal)
 
 mitkCloneMacro (ClippingProperty)
 
- Protected Member Functions inherited from mitk::BaseProperty
 BaseProperty ()
 
 BaseProperty (const BaseProperty &other)
 
 ~BaseProperty () override
 

Protected Attributes

bool m_ClippingEnabled
 
Point3D m_Origin
 
Vector3D m_Normal
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::BaseProperty
static const std::string VALUE_CANNOT_BE_CONVERTED_TO_STRING
 Default return value for properties that cannot be converted to a string. More...
 

Detailed Description

Property for defining a clipping plane for datasets.

Stores a clipping plane defined by an origin point and a normal vector, along with an enabled/disabled flag. When enabled, the clipping plane can be used by renderers to clip the associated data object.

When constructed with an origin and normal, clipping is automatically enabled. The default constructor creates a disabled clipping property with origin and normal at (0, 0, 0).

See also
BaseProperty

Definition at line 39 of file mitkClippingProperty.h.

Member Typedef Documentation

◆ ValueType

typedef std::string mitk::ClippingProperty::ValueType

The type used for string-based value representation.

Definition at line 45 of file mitkClippingProperty.h.

Constructor & Destructor Documentation

◆ ClippingProperty() [1/3]

mitk::ClippingProperty::ClippingProperty ( )
protected

◆ ClippingProperty() [2/3]

mitk::ClippingProperty::ClippingProperty ( const ClippingProperty &  other)
protected

◆ ClippingProperty() [3/3]

mitk::ClippingProperty::ClippingProperty ( const Point3D &  origin,
const Vector3D &  normal 
)
protected

Member Function Documentation

◆ Clone()

Pointer mitk::ClippingProperty::Clone ( ) const

◆ FromJSON()

bool mitk::ClippingProperty::FromJSON ( const nlohmann::json &  j)
overridevirtual

Deserialize the clipping property from JSON.

Reads "Enabled", "Origin", and "Normal" fields.

Parameters
[in]jThe JSON object containing clipping data.
Returns
Always true.

Implements mitk::BaseProperty.

◆ GetClippingEnabled()

bool mitk::ClippingProperty::GetClippingEnabled ( ) const

Check whether clipping is enabled.

Returns
true if clipping is enabled, false otherwise.

◆ GetNormal()

const Vector3D& mitk::ClippingProperty::GetNormal ( ) const

Get the normal vector of the clipping plane.

Returns
A const reference to the normal vector.

◆ GetOrigin()

const Point3D& mitk::ClippingProperty::GetOrigin ( ) const

Get the origin point of the clipping plane.

Returns
A const reference to the origin point.

◆ GetValueAsString()

std::string mitk::ClippingProperty::GetValueAsString ( ) const
overridevirtual

Return the clipping state and plane parameters as a string.

Returns
A string showing the enabled state, origin, and normal.

Reimplemented from mitk::BaseProperty.

◆ mitkClassMacro()

mitk::ClippingProperty::mitkClassMacro ( ClippingProperty  ,
BaseProperty   
)

◆ mitkCloneMacro()

mitk::ClippingProperty::mitkCloneMacro ( ClippingProperty  )
protected

◆ mitkNewMacro2Param()

mitk::ClippingProperty::mitkNewMacro2Param ( ClippingProperty  ,
const Point3D &  ,
const Vector3D &   
)

◆ New()

static Pointer mitk::ClippingProperty::New ( )
static

◆ operator=()

BaseProperty& mitk::BaseProperty::operator=

Assign a property value to this instance.

Performs a polymorphic assignment from the given property. The assignment succeeds only if the source and target properties are of the same type. The subclass-specific Assign() method is called to perform the actual value copy.

Subclasses must implement Assign(const BaseProperty&) and call the superclass Assign method for proper handling. The copy assignment operator of the subclass should be disabled and the base class operator should be made visible using "using" statements.

Parameters
[in]propertyThe property whose value should be assigned to this instance.
Returns
A reference to this property.
See also
AssignProperty
Assign

◆ SetClippingEnabled()

void mitk::ClippingProperty::SetClippingEnabled ( bool  enabled)

Enable or disable clipping.

Marks the property as modified if the state changes.

Parameters
[in]enabledtrue to enable clipping, false to disable.

◆ SetNormal()

void mitk::ClippingProperty::SetNormal ( const Vector3D &  normal)

Set the normal vector of the clipping plane.

Marks the property as modified if the new normal differs from the current one.

Parameters
[in]normalThe new normal vector.

◆ SetOrigin()

void mitk::ClippingProperty::SetOrigin ( const Point3D &  origin)

Set the origin point of the clipping plane.

Marks the property as modified if the new origin differs from the current one.

Parameters
[in]originThe new origin point.

◆ ToJSON()

bool mitk::ClippingProperty::ToJSON ( nlohmann::json &  j) const
overridevirtual

Serialize the clipping property to JSON.

Serializes "Enabled", "Origin", and "Normal" fields.

Parameters
[out]jThe JSON object to write the value into.
Returns
Always true.

Implements mitk::BaseProperty.

Member Data Documentation

◆ m_ClippingEnabled

bool mitk::ClippingProperty::m_ClippingEnabled
protected

Definition at line 126 of file mitkClippingProperty.h.

◆ m_Normal

Vector3D mitk::ClippingProperty::m_Normal
protected

Definition at line 129 of file mitkClippingProperty.h.

◆ m_Origin

Point3D mitk::ClippingProperty::m_Origin
protected

Definition at line 128 of file mitkClippingProperty.h.


The documentation for this class was generated from the following file: