Medical Imaging Interaction Toolkit  2023.12.99-63768887
Medical Imaging Interaction Toolkit
mitk::AnnotationProperty Class Reference

Property for annotations. More...

#include <mitkAnnotationProperty.h>

Inheritance diagram for mitk::AnnotationProperty:
Collaboration diagram for mitk::AnnotationProperty:

Public Types

typedef std::string ValueType
 
- Public Types inherited from mitk::BaseProperty
typedef BaseProperty Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

 mitkClassMacro (AnnotationProperty, BaseProperty)
 
Pointer Clone () const
 
 mitkNewMacro2Param (AnnotationProperty, const char *, const Point3D &)
 
 mitkNewMacro2Param (AnnotationProperty, const std::string &, const Point3D &)
 
 mitkNewMacro4Param (AnnotationProperty, const char *, ScalarType, ScalarType, ScalarType)
 
 mitkNewMacro4Param (AnnotationProperty, const std::string &, ScalarType, ScalarType, ScalarType)
 
virtual const char * GetLabel () const
 
virtual void SetLabel (const char *_arg)
 
const Point3DGetPosition () const
 
void SetPosition (const Point3D &position)
 
std::string GetValueAsString () const override
 
bool ToJSON (nlohmann::json &j) const override
 Serialize property value(s) to JSON. More...
 
bool FromJSON (const nlohmann::json &j) override
 Deserialize property value(s) from JSON. More...
 
virtual BasePropertyoperator= (const BaseProperty &other)
 
BasePropertyoperator= (const BaseProperty &property)
 Assigns property to this BaseProperty instance. More...
 
- Public Member Functions inherited from mitk::BaseProperty
virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
bool operator== (const BaseProperty &property) const
 Subclasses must implement IsEqual(const BaseProperty&) to support comparison. More...
 
BasePropertyoperator= (const BaseProperty &property)
 Assigns property to this BaseProperty instance. More...
 
bool AssignProperty (const BaseProperty &property)
 Assigns property to this BaseProperty instance. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::BaseProperty
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 AnnotationProperty ()
 
 AnnotationProperty (const char *label, const Point3D &position)
 
 AnnotationProperty (const std::string &label, const Point3D &position)
 
 AnnotationProperty (const char *label, ScalarType x, ScalarType y, ScalarType z)
 
 AnnotationProperty (const std::string &label, ScalarType x, ScalarType y, ScalarType z)
 
 AnnotationProperty (const AnnotationProperty &other)
 
- Protected Member Functions inherited from mitk::BaseProperty
 BaseProperty ()
 
 BaseProperty (const BaseProperty &other)
 
 ~BaseProperty () override
 

Protected Attributes

std::string m_Label
 
Point3D m_Position
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::BaseProperty
static const std::string VALUE_CANNOT_BE_CONVERTED_TO_STRING
 Default return value if a property which can not be returned as string. More...
 

Detailed Description

Property for annotations.

Definition at line 30 of file mitkAnnotationProperty.h.

Member Typedef Documentation

◆ ValueType

Definition at line 35 of file mitkAnnotationProperty.h.

Constructor & Destructor Documentation

◆ AnnotationProperty() [1/6]

mitk::AnnotationProperty::AnnotationProperty ( )
protected

◆ AnnotationProperty() [2/6]

mitk::AnnotationProperty::AnnotationProperty ( const char *  label,
const Point3D position 
)
protected

◆ AnnotationProperty() [3/6]

mitk::AnnotationProperty::AnnotationProperty ( const std::string &  label,
const Point3D position 
)
protected

◆ AnnotationProperty() [4/6]

mitk::AnnotationProperty::AnnotationProperty ( const char *  label,
ScalarType  x,
ScalarType  y,
ScalarType  z 
)
protected

◆ AnnotationProperty() [5/6]

mitk::AnnotationProperty::AnnotationProperty ( const std::string &  label,
ScalarType  x,
ScalarType  y,
ScalarType  z 
)
protected

◆ AnnotationProperty() [6/6]

mitk::AnnotationProperty::AnnotationProperty ( const AnnotationProperty other)
protected

Member Function Documentation

◆ Clone()

Pointer mitk::AnnotationProperty::Clone ( ) const

◆ FromJSON()

bool mitk::AnnotationProperty::FromJSON ( const nlohmann::json j)
overridevirtual

Deserialize property value(s) from JSON.

Rely on exceptions for error handling when implementing deserialization.

Returns
False if not deserializable by design, true otherwise.

Implements mitk::BaseProperty.

◆ GetLabel()

virtual const char* mitk::AnnotationProperty::GetLabel ( ) const
virtual

◆ GetPosition()

const Point3D& mitk::AnnotationProperty::GetPosition ( ) const

◆ GetValueAsString()

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

Reimplemented from mitk::BaseProperty.

◆ mitkClassMacro()

mitk::AnnotationProperty::mitkClassMacro ( AnnotationProperty  ,
BaseProperty   
)

◆ mitkNewMacro2Param() [1/2]

mitk::AnnotationProperty::mitkNewMacro2Param ( AnnotationProperty  ,
const char *  ,
const Point3D  
)

◆ mitkNewMacro2Param() [2/2]

mitk::AnnotationProperty::mitkNewMacro2Param ( AnnotationProperty  ,
const std::string &  ,
const Point3D  
)

◆ mitkNewMacro4Param() [1/2]

mitk::AnnotationProperty::mitkNewMacro4Param ( AnnotationProperty  ,
const char *  ,
ScalarType  ,
ScalarType  ,
ScalarType   
)

◆ mitkNewMacro4Param() [2/2]

mitk::AnnotationProperty::mitkNewMacro4Param ( AnnotationProperty  ,
const std::string &  ,
ScalarType  ,
ScalarType  ,
ScalarType   
)

◆ New()

static Pointer mitk::AnnotationProperty::New ( )
static

◆ operator=() [1/2]

virtual BaseProperty& mitk::AnnotationProperty::operator= ( const BaseProperty other)
inlinevirtual

Definition at line 56 of file mitkAnnotationProperty.h.

◆ operator=() [2/2]

BaseProperty& mitk::BaseProperty::operator=

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.

◆ SetLabel()

virtual void mitk::AnnotationProperty::SetLabel ( const char *  _arg)
virtual

◆ SetPosition()

void mitk::AnnotationProperty::SetPosition ( const Point3D position)

◆ ToJSON()

bool mitk::AnnotationProperty::ToJSON ( nlohmann::json j) const
overridevirtual

Serialize property value(s) to JSON.

Rely on exceptions for error handling when implementing serialization.

Returns
False if not serializable by design, true otherwise.

Implements mitk::BaseProperty.

Member Data Documentation

◆ m_Label

std::string mitk::AnnotationProperty::m_Label
protected

Definition at line 60 of file mitkAnnotationProperty.h.

◆ m_Position

Point3D mitk::AnnotationProperty::m_Position
protected

Definition at line 61 of file mitkAnnotationProperty.h.


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