|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Property for storing a text annotation with a 3D position. More...
#include <mitkAnnotationProperty.h>


Public Types | |
| typedef std::string | ValueType |
| The type of the label value stored by this property. More... | |
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 |
| Get the annotation label text. More... | |
| virtual void | SetLabel (const char *_arg) |
| Set the annotation label text. More... | |
| const Point3D & | GetPosition () const |
| Get the 3D position of the annotation. More... | |
| void | SetPosition (const Point3D &position) |
| Set the 3D position of the annotation. More... | |
| std::string | GetValueAsString () const override |
| Return the annotation as a human-readable string. More... | |
| bool | ToJSON (nlohmann::json &j) const override |
| Serialize the annotation to JSON. More... | |
| bool | FromJSON (const nlohmann::json &j) override |
| Deserialize the annotation from JSON. More... | |
| virtual BaseProperty & | operator= (const BaseProperty &other) |
| 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 | |
| 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) | |
| mitkCloneMacro (AnnotationProperty) | |
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 for properties that cannot be converted to a string. More... | |
Property for storing a text annotation with a 3D position.
Combines a text label string with a 3D point position, allowing annotations to be placed at specific locations in world coordinates.
Definition at line 34 of file mitkAnnotationProperty.h.
| typedef std::string mitk::AnnotationProperty::ValueType |
The type of the label value stored by this property.
Definition at line 40 of file mitkAnnotationProperty.h.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| Pointer mitk::AnnotationProperty::Clone | ( | ) | const |
|
overridevirtual |
Deserialize the annotation from JSON.
Reads "Label" and "Position" fields from the JSON object.
| [in] | j | The JSON object containing annotation data. |
true. Implements mitk::BaseProperty.
|
virtual |
Get the annotation label text.
| const Point3D& mitk::AnnotationProperty::GetPosition | ( | ) | const |
Get the 3D position of the annotation.
|
overridevirtual |
Return the annotation as a human-readable string.
Returns the label text followed by the 3D position coordinates.
Reimplemented from mitk::BaseProperty.
| mitk::AnnotationProperty::mitkClassMacro | ( | AnnotationProperty | , |
| BaseProperty | |||
| ) |
|
protected |
| mitk::AnnotationProperty::mitkNewMacro2Param | ( | AnnotationProperty | , |
| const char * | , | ||
| const Point3D & | |||
| ) |
| mitk::AnnotationProperty::mitkNewMacro2Param | ( | AnnotationProperty | , |
| const std::string & | , | ||
| const Point3D & | |||
| ) |
| mitk::AnnotationProperty::mitkNewMacro4Param | ( | AnnotationProperty | , |
| const char * | , | ||
| ScalarType | , | ||
| ScalarType | , | ||
| ScalarType | |||
| ) |
| mitk::AnnotationProperty::mitkNewMacro4Param | ( | AnnotationProperty | , |
| const std::string & | , | ||
| ScalarType | , | ||
| ScalarType | , | ||
| ScalarType | |||
| ) |
|
static |
|
inlinevirtual |
Definition at line 107 of file mitkAnnotationProperty.h.
| 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.
| [in] | property | The property whose value should be assigned to this instance. |
|
virtual |
Set the annotation label text.
| [in] | _arg | The new label string. |
| void mitk::AnnotationProperty::SetPosition | ( | const Point3D & | position | ) |
Set the 3D position of the annotation.
Marks the property as modified if the new position differs from the current one.
| [in] | position | The new 3D position. |
|
overridevirtual |
Serialize the annotation to JSON.
Serializes both the label and position as a JSON object with "Label" and "Position" fields.
| [out] | j | The JSON object to write the value into. |
true. Implements mitk::BaseProperty.
|
protected |
Definition at line 111 of file mitkAnnotationProperty.h.
|
protected |
Definition at line 112 of file mitkAnnotationProperty.h.