Medical Imaging Interaction Toolkit  2022.10.99-184f3f8c
Medical Imaging Interaction Toolkit
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 (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 mitkLabel_h
14 #define mitkLabel_h
15 
16 #include "MitkMultilabelExports.h"
17 #include <mitkColorProperty.h>
18 #include <mitkPropertyList.h>
19 #include <mitkVector.h>
20 
21 namespace mitk
22 {
23  //##
24  //##Documentation
25  //## @brief A data structure describing a label.
26  //## @ingroup Data
27  //##
29  {
30  public:
32 
33  itkNewMacro(Self);
34 
35  typedef unsigned short PixelType;
36 
38  static const PixelType MAX_LABEL_VALUE;
39 
40  void SetLocked(bool locked);
41  bool GetLocked() const;
42 
43  void SetVisible(bool visible);
44  bool GetVisible() const;
45 
46  void SetOpacity(float opacity);
47  float GetOpacity() const;
48 
49  void SetName(const std::string &name);
50  std::string GetName() const;
51 
52  void SetCenterOfMassIndex(const mitk::Point3D &center);
53  mitk::Point3D GetCenterOfMassIndex() const;
54 
55  void SetCenterOfMassCoordinates(const mitk::Point3D &center);
56  mitk::Point3D GetCenterOfMassCoordinates() const;
57 
58  void SetColor(const mitk::Color &);
59  const mitk::Color &GetColor() const;
60 
61  void SetValue(PixelType pixelValue);
62  PixelType GetValue() const;
63 
64  void SetLayer(unsigned int layer);
65  unsigned int GetLayer() const;
66 
67  void SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName = "", bool fallBackOnDefaultContext = false) override;
68 
69  using itk::Object::Modified;
70  void Modified() { Superclass::Modified(); }
71  Label();
72  ~Label() override;
73 
74  protected:
75  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
76 
77  Label(const Label &other);
78 
79  private:
80  itk::LightObject::Pointer InternalClone() const override;
81  };
82 
97  MITKMULTILABEL_EXPORT bool Equal(const mitk::Label &leftHandSide,
98  const mitk::Label &rightHandSide,
100  bool verbose);
101 
102 } // namespace mitk
103 
104 #endif
mitk::eps
const MITKCORE_EXPORT ScalarType eps
MITKMULTILABEL_EXPORT
#define MITKMULTILABEL_EXPORT
Definition: MitkMultilabelExports.h:15
mitk::BaseProperty
Abstract base class for properties.
Definition: mitkBaseProperty.h:35
mitk::Color
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
Definition: mitkColorProperty.h:35
mitk::Equal
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.
mitk::Label::PixelType
unsigned short PixelType
Definition: mitkLabel.h:33
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::Label::MAX_LABEL_VALUE
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:38
mitk::Label
A data structure describing a label.
Definition: mitkLabel.h:28
mitk::Point< ScalarType, 3 >
mitkPropertyList.h
mitk::Label::Modified
void Modified()
Definition: mitkLabel.h:70
mitk::PropertyList
Key-value list holding instances of BaseProperty.
Definition: mitkPropertyList.h:64
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitkColorProperty.h
mitkVector.h
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20
MitkMultilabelExports.h