13 #ifndef mitkSmartPointerProperty_h
14 #define mitkSmartPointerProperty_h
28 #pragma warning(disable : 4522)
38 itkFactorylessNewMacro(Self);
63 using BaseProperty::operator=;
75 itk::LightObject::Pointer InternalClone()
const override;
80 typedef std::map<itk::Object *, unsigned int> ReferenceCountMapType;
81 typedef std::map<itk::Object *, std::string> ReferencesUIDMapType;
82 typedef std::map<SmartPointerProperty *, std::string> ReadInSmartPointersMapType;
83 typedef std::map<std::string, itk::Object *> ReadInTargetsMapType;
86 static ReferenceCountMapType m_ReferenceCount;
87 static ReferencesUIDMapType m_ReferencesUID;
88 static ReadInSmartPointersMapType m_ReadInInstances;
89 static ReadInTargetsMapType m_ReadInTargets;
Abstract base class for properties.
Property containing a smart-pointer.
itk::Object::Pointer m_SmartPointer
static std::string GetReferenceUIDFor(itk::Object *)
itk::Object::Pointer GetSmartPointer() const
bool FromJSON(const nlohmann::json &j) override
Deserialize property value(s) from JSON.
std::string GetValueAsString() const override
mainly for XML output
SmartPointerProperty(const SmartPointerProperty &)
SmartPointerProperty(itk::Object *=nullptr)
bool ToJSON(nlohmann::json &j) const override
Serialize property value(s) to JSON.
void SetSmartPointer(itk::Object *)
ValueType GetValue() const
mitkClassMacro(SmartPointerProperty, BaseProperty)
static void RegisterPointerTarget(itk::Object *, const std::string uid)
void SetValue(const ValueType &)
static unsigned int GetReferenceCountFor(itk::Object *)
Return the number of SmartPointerProperties that reference the object given as parameter.
static void PostProcessXMLReading()
mitkNewMacro1Param(SmartPointerProperty, itk::Object *)
itk::Object::Pointer ValueType
Find image slices visible on a given plane.