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
mitkLabel.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 __mitkLabel_H_
18 #define __mitkLabel_H_
19 
20 #include "MitkMultilabelExports.h"
21 #include <mitkColorProperty.h>
22 #include <mitkPropertyList.h>
23 #include <mitkVector.h>
24 
25 class TiXmlDocument;
26 class TiXmlElement;
27 
28 namespace mitk
29 {
30  //##
31  //##Documentation
32  //## @brief A data structure describing a label.
33  //## @ingroup Data
34  //##
36  {
37  public:
39 
40  itkNewMacro(Self);
41 
42  typedef unsigned short PixelType;
43 
45  static const PixelType MAX_LABEL_VALUE;
46 
47  void SetLocked(bool locked);
48  bool GetLocked() const;
49 
50  void SetVisible(bool visible);
51  bool GetVisible() const;
52 
53  void SetOpacity(float opacity);
54  float GetOpacity() const;
55 
56  void SetName(const std::string &name);
57  std::string GetName() const;
58 
59  void SetCenterOfMassIndex(const mitk::Point3D &center);
60  mitk::Point3D GetCenterOfMassIndex() const;
61 
62  void SetCenterOfMassCoordinates(const mitk::Point3D &center);
63  mitk::Point3D GetCenterOfMassCoordinates() const;
64 
65  void SetColor(const mitk::Color &);
66  const mitk::Color &GetColor() const;
67 
68  void SetValue(PixelType pixelValue);
69  PixelType GetValue() const;
70 
71  void SetLayer(unsigned int layer);
72  unsigned int GetLayer() const;
73 
74  void SetProperty(const std::string &propertyKey, BaseProperty *property);
75 
76  using itk::Object::Modified;
77  void Modified() { Superclass::Modified(); }
78  Label();
79  virtual ~Label();
80 
81  protected:
82  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
83 
84  Label(const Label &other);
85 
86  private:
87  virtual itk::LightObject::Pointer InternalClone() const override;
88  };
89 
104  MITKMULTILABEL_EXPORT bool Equal(const mitk::Label &leftHandSide,
105  const mitk::Label &rightHandSide,
106  ScalarType eps,
107  bool verbose);
108 
109 } // namespace mitk
110 
111 #endif // __mitkLabel_H_
itk::SmartPointer< Self > Pointer
double ScalarType
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:35
Key-value list holding instances of BaseProperty.
#define MITKMULTILABEL_EXPORT
void Modified()
Definition: mitkLabel.h:77
Abstract base class for properties.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
static const PixelType MAX_LABEL_VALUE
The maximum value a label can get: Since the value is of type unsigned short MAX_LABEL_VALUE = 65535...
Definition: mitkLabel.h:45
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
MITKCORE_EXPORT const ScalarType eps
static std::string GetName(std::string fileName, std::string suffix)
unsigned short PixelType
Definition: mitkLabel.h:40