Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkAnnotationProperty.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkAnnotationProperty_h
14 #define mitkAnnotationProperty_h
15 
16 #include "mitkBaseProperty.h"
17 #include "mitkNumericTypes.h"
18 #include <MitkCoreExports.h>
19 
20 #include <itkConfigure.h>
21 
22 #include <string>
23 
24 namespace mitk
25 {
31  {
32  public:
34 
35  typedef std::string ValueType;
36 
37  itkFactorylessNewMacro(Self);
38 
39  itkCloneMacro(Self)
40  mitkNewMacro2Param(AnnotationProperty, const char *, const Point3D &);
41  mitkNewMacro2Param(AnnotationProperty, const std::string &, const Point3D &);
44 
45  itkGetStringMacro(Label);
46  itkSetStringMacro(Label);
47 
48  const Point3D &GetPosition() const;
49  void SetPosition(const Point3D &position);
50 
51  std::string GetValueAsString() const override;
52  virtual BaseProperty &operator=(const BaseProperty &other) { return Superclass::operator=(other); }
53  using BaseProperty::operator=;
54 
55  protected:
56  std::string m_Label;
58 
60  AnnotationProperty(const char *label, const Point3D &position);
61  AnnotationProperty(const std::string &label, const Point3D &position);
62  AnnotationProperty(const char *label, ScalarType x, ScalarType y, ScalarType z);
63  AnnotationProperty(const std::string &label, ScalarType x, ScalarType y, ScalarType z);
64 
66 
67  private:
68  // purposely not implemented
69  AnnotationProperty &operator=(const AnnotationProperty &);
70 
71  itk::LightObject::Pointer InternalClone() const override;
72 
73  bool IsEqual(const BaseProperty &property) const override;
74  bool Assign(const BaseProperty &property) override;
75  };
76 
77 } // namespace mitk
78 
79 #endif
mitk::BaseProperty
Abstract base class for properties.
Definition: mitkBaseProperty.h:35
mitkNewMacro2Param
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:81
mitk::AnnotationProperty::ValueType
std::string ValueType
Definition: mitkAnnotationProperty.h:35
mitk::AnnotationProperty::operator=
virtual BaseProperty & operator=(const BaseProperty &other)
Definition: mitkAnnotationProperty.h:52
mitk::AnnotationProperty::m_Label
std::string m_Label
Definition: mitkAnnotationProperty.h:56
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::Label
A data structure describing a label.
Definition: mitkLabel.h:28
MitkCoreExports.h
mitk::Point< ScalarType, 3 >
mitkNumericTypes.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitkNewMacro4Param
#define mitkNewMacro4Param(classname, typea, typeb, typec, typed)
Definition: mitkCommon.h:107
mitk::AnnotationProperty
Property for annotations.
Definition: mitkAnnotationProperty.h:30
mitkBaseProperty.h
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20
mitk::AnnotationProperty::m_Position
Point3D m_Position
Definition: mitkAnnotationProperty.h:57