Medical Imaging Interaction Toolkit  2018.4.99-ae21cdc4
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_HEADER_INCLUDED
14 #define MITKANNOTATIONPROPERTY_H_HEADER_INCLUDED
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)
41  mitkNewMacro2Param(AnnotationProperty, const std::string &, const Point3D &);
42  mitkNewMacro4Param(AnnotationProperty, const char *, ScalarType, ScalarType, ScalarType);
43  mitkNewMacro4Param(AnnotationProperty, const std::string &, ScalarType, ScalarType, ScalarType);
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 /* MITKANNOTATIONPROPERTY_H_HEADER_INCLUDED */
#define MITKCORE_EXPORT
double ScalarType
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:31
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:85
#define mitkNewMacro4Param(classname, typea, typeb, typec, typed)
Definition: mitkCommon.h:111
Abstract base class for properties.
Property for annotations.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40