|
Medical Imaging Interaction Toolkit
2025.12.02
Medical Imaging Interaction Toolkit
|
Abstract base class for properties. More...
#include <mitkBaseProperty.h>


Public Member Functions | |
| mitkClassMacroItkParent (BaseProperty, itk::Object) | |
| Pointer | Clone () const |
| bool | operator== (const BaseProperty &property) const |
| Subclasses must implement IsEqual(const BaseProperty&) to support comparison. More... | |
| BaseProperty & | operator= (const BaseProperty &property) |
| Assigns property to this BaseProperty instance. More... | |
| bool | AssignProperty (const BaseProperty &property) |
| Assigns property to this BaseProperty instance. More... | |
| virtual std::string | GetValueAsString () const |
| virtual bool | ToJSON (nlohmann::json &j) const =0 |
| Serialize property value(s) to JSON. More... | |
| virtual bool | FromJSON (const nlohmann::json &j)=0 |
| Deserialize property value(s) from JSON. More... | |
Static Public Attributes | |
| static const std::string | VALUE_CANNOT_BE_CONVERTED_TO_STRING |
| Default return value if a property which can not be returned as string. More... | |
Protected Member Functions | |
| BaseProperty () | |
| BaseProperty (const BaseProperty &other) | |
| ~BaseProperty () override | |
Abstract base class for properties.
Base class for properties. Properties are arbitrary additional information (to define a new type of information you have to define a subclass of BaseProperty) that can be added to a PropertyList. Concrete subclasses of BaseProperty should define Set-/Get-methods to assess the property value, which should be stored by value (not by reference). Subclasses must implement an operator==(const BaseProperty& property), which is used by PropertyList to check whether a property has been changed.
Definition at line 36 of file mitkBaseProperty.h.
|
protected |
|
protected |
|
overrideprotected |
| bool mitk::BaseProperty::AssignProperty | ( | const BaseProperty & | property | ) |
Assigns property to this BaseProperty instance.
This method is identical to the assignment operator, except for the return type. It allows to directly check if the assignment was successful.
| Pointer mitk::BaseProperty::Clone | ( | ) | const |
|
pure virtual |
Deserialize property value(s) from JSON.
Rely on exceptions for error handling when implementing deserialization.
Implemented in mitk::IsoDoseLevelVectorProperty, mitk::IsoDoseLevelSetProperty, mitk::WeakPointerProperty, mitk::VectorProperty< DATATYPE >, mitk::TransferFunctionProperty, mitk::TemporoSpatialStringProperty, mitk::StringProperty, mitk::SmartPointerProperty, mitk::StringLookupTableProperty, mitk::IntLookupTableProperty, mitk::BoolLookupTableProperty, mitk::FloatLookupTableProperty, mitk::Point3iProperty, mitk::Point4dProperty, mitk::Point3dProperty, mitk::Point2dProperty, mitk::Vector3DProperty, mitk::DoubleProperty, mitk::FloatProperty, mitk::UShortProperty, mitk::UIntProperty, mitk::IntProperty, mitk::BoolProperty, mitk::LookupTableProperty, mitk::LevelWindowProperty, mitk::GroupTagProperty, mitk::EnumerationProperty, mitk::ColorProperty, mitk::ClippingProperty, mitk::AnnotationProperty, mitk::GenericProperty< T >, mitk::GenericProperty< Point4D >, mitk::GenericProperty< double >, mitk::GenericProperty< IntLookupTable >, mitk::GenericProperty< float >, mitk::GenericProperty< Point3I >, mitk::GenericProperty< int >, mitk::GenericProperty< unsigned int >, mitk::GenericProperty< FloatLookupTable >, mitk::GenericProperty< unsigned short >, mitk::GenericProperty< Vector3D >, mitk::GenericProperty< Point2D >, mitk::GenericProperty< BoolLookupTable >, mitk::GenericProperty< Point3D >, mitk::GenericProperty< StringLookupTable >, and mitk::GenericProperty< bool >.
|
virtual |
Reimplemented in mitk::IsoDoseLevelVectorProperty, mitk::IsoDoseLevelSetProperty, mitk::WeakPointerProperty, mitk::VectorProperty< DATATYPE >, mitk::TransferFunctionProperty, mitk::TemporoSpatialStringProperty, mitk::StringProperty, mitk::SmartPointerProperty, mitk::LookupTableProperty, mitk::LevelWindowProperty, mitk::GenericProperty< T >, mitk::GenericProperty< Point4D >, mitk::GenericProperty< double >, mitk::GenericProperty< IntLookupTable >, mitk::GenericProperty< float >, mitk::GenericProperty< Point3I >, mitk::GenericProperty< int >, mitk::GenericProperty< unsigned int >, mitk::GenericProperty< FloatLookupTable >, mitk::GenericProperty< unsigned short >, mitk::GenericProperty< Vector3D >, mitk::GenericProperty< Point2D >, mitk::GenericProperty< BoolLookupTable >, mitk::GenericProperty< Point3D >, mitk::GenericProperty< StringLookupTable >, mitk::GenericProperty< bool >, mitk::EnumerationProperty, mitk::ColorProperty, mitk::ClippingProperty, and mitk::AnnotationProperty.
| mitk::BaseProperty::mitkClassMacroItkParent | ( | BaseProperty | , |
| itk::Object | |||
| ) |
| BaseProperty& mitk::BaseProperty::operator= | ( | const BaseProperty & | property | ) |
Assigns property to this BaseProperty instance.
Subclasses must implement Assign(const BaseProperty&) and call the superclass Assign method for proper handling of polymorphic assignments. The assignment operator of the subclass should be disabled and the baseclass operator should be made visible using "using" statements.
| bool mitk::BaseProperty::operator== | ( | const BaseProperty & | property | ) | const |
Subclasses must implement IsEqual(const BaseProperty&) to support comparison.
operator== which is used by PropertyList to check whether a property has been changed.
|
pure virtual |
Serialize property value(s) to JSON.
Rely on exceptions for error handling when implementing serialization.
Implemented in mitk::IsoDoseLevelVectorProperty, mitk::IsoDoseLevelSetProperty, mitk::WeakPointerProperty, mitk::VectorProperty< DATATYPE >, mitk::TransferFunctionProperty, mitk::TemporoSpatialStringProperty, mitk::StringProperty, mitk::SmartPointerProperty, mitk::StringLookupTableProperty, mitk::IntLookupTableProperty, mitk::BoolLookupTableProperty, mitk::FloatLookupTableProperty, mitk::Point3iProperty, mitk::Point4dProperty, mitk::Point3dProperty, mitk::Point2dProperty, mitk::Vector3DProperty, mitk::DoubleProperty, mitk::FloatProperty, mitk::UShortProperty, mitk::UIntProperty, mitk::IntProperty, mitk::BoolProperty, mitk::LookupTableProperty, mitk::LevelWindowProperty, mitk::GroupTagProperty, mitk::EnumerationProperty, mitk::ColorProperty, mitk::ClippingProperty, mitk::AnnotationProperty, mitk::GenericProperty< T >, mitk::GenericProperty< Point4D >, mitk::GenericProperty< double >, mitk::GenericProperty< IntLookupTable >, mitk::GenericProperty< float >, mitk::GenericProperty< Point3I >, mitk::GenericProperty< int >, mitk::GenericProperty< unsigned int >, mitk::GenericProperty< FloatLookupTable >, mitk::GenericProperty< unsigned short >, mitk::GenericProperty< Vector3D >, mitk::GenericProperty< Point2D >, mitk::GenericProperty< BoolLookupTable >, mitk::GenericProperty< Point3D >, mitk::GenericProperty< StringLookupTable >, and mitk::GenericProperty< bool >.
|
static |
Default return value if a property which can not be returned as string.
Definition at line 86 of file mitkBaseProperty.h.