13 #ifndef mitkBaseProperty_h
14 #define mitkBaseProperty_h
17 #include <itkObjectFactory.h>
20 #include <nlohmann/json_fwd.hpp>
149 virtual bool IsEqual(
const BaseProperty &property)
const = 0;
Abstract base class for properties.
virtual bool ToJSON(nlohmann::json &j) const =0
Serialize property value(s) to JSON.
mitkClassMacroItkParent(BaseProperty, itk::Object)
BaseProperty & operator=(const BaseProperty &property)
Assign a property value to this instance.
virtual bool FromJSON(const nlohmann::json &j)=0
Deserialize property value(s) from JSON.
BaseProperty(const BaseProperty &other)
static const std::string VALUE_CANNOT_BE_CONVERTED_TO_STRING
Default return value for properties that cannot be converted to a string.
bool operator==(const BaseProperty &property) const
Compare two properties for equality.
virtual std::string GetValueAsString() const
Return the property value as a human-readable string.
bool AssignProperty(const BaseProperty &property)
Assign a property value to this instance and report success.
Find image slices visible on a given plane.
MITKCORE_EXPORT BaseProperty::Pointer ConvertPropertyFromSelfContainedJson(const nlohmann::json &json)
Deserialize a property from self contained JSON representation.
MITKCORE_EXPORT nlohmann::json ConvertPropertyToSelfContainedJson(const BaseProperty *property)
Serialize a property to self contained JSON.