Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKANNOTATIONPROPERTY_H_HEADER_INCLUDED
18 #define MITKANNOTATIONPROPERTY_H_HEADER_INCLUDED
19 
20 #include "mitkBaseProperty.h"
21 #include "mitkNumericTypes.h"
22 #include <MitkCoreExports.h>
23 
24 #include <itkConfigure.h>
25 
26 #include <string>
27 
28 namespace mitk
29 {
35  {
36  public:
38 
39  typedef std::string ValueType;
40 
41  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
43  mitkNewMacro2Param(AnnotationProperty, const std::string &, const Point3D &);
44  mitkNewMacro4Param(AnnotationProperty, const char *, ScalarType, ScalarType, ScalarType);
45  mitkNewMacro4Param(AnnotationProperty, const std::string &, ScalarType, ScalarType, ScalarType);
46 
47  itkGetStringMacro(Label);
48  itkSetStringMacro(Label);
49 
50  const Point3D &GetPosition() const;
51  void SetPosition(const Point3D &position);
52 
53  virtual std::string GetValueAsString() const override;
54  virtual BaseProperty &operator=(const BaseProperty &other) { return Superclass::operator=(other); }
55  using BaseProperty::operator=;
56 
57  protected:
58  std::string m_Label;
60 
62  AnnotationProperty(const char *label, const Point3D &position);
63  AnnotationProperty(const std::string &label, const Point3D &position);
64  AnnotationProperty(const char *label, ScalarType x, ScalarType y, ScalarType z);
65  AnnotationProperty(const std::string &label, ScalarType x, ScalarType y, ScalarType z);
66 
68 
69  private:
70  // purposely not implemented
71  AnnotationProperty &operator=(const AnnotationProperty &);
72 
73  itk::LightObject::Pointer InternalClone() const override;
74 
75  virtual bool IsEqual(const BaseProperty &property) const override;
76  virtual bool Assign(const BaseProperty &property) override;
77  };
78 
79 } // namespace mitk
80 
81 #endif /* MITKANNOTATIONPROPERTY_H_HEADER_INCLUDED */
itk::SmartPointer< Self > Pointer
#define MITKCORE_EXPORT
double ScalarType
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:35
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:89
#define mitkNewMacro4Param(classname, typea, typeb, typec, typed)
Definition: mitkCommon.h:115
Abstract base class for properties.
Property for annotations.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44