Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkLabeledImageLookupTable.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 mitkLabeledImageLookupTable_h
14 #define mitkLabeledImageLookupTable_h
15 
17 #include <mitkLevelWindow.h>
18 #include <mitkLookupTable.h>
19 #include <iostream>
20 #include <string>
21 
22 namespace mitk
23 {
38  {
39  public:
44 
48  itkFactorylessNewMacro(Self);
49  itkCloneMacro(Self);
50 
55  typedef unsigned char LabelType;
56 
63 
73  virtual void SetColorForLabel(
74  const LabelType &label, const double &r, const double &g, const double &b, const double a = 1.0);
75 
82  virtual double *GetColorForLabel(const LabelType &label);
83 
92  mitk::LevelWindow GetLevelWindow() { return m_LevelWindow; }
93  protected:
98 
100 
105 
110  virtual void GenerateRandomColor(double &r, double &g, double &b);
115  virtual double GenerateRandomNumber();
116 
118 
120  };
121 }
122 
123 #endif
#define MITKDATATYPESEXT_EXPORT
Lookup table for 2D rendering of labeled (segmented) images.
mitk::LevelWindow GetLevelWindow()
Get the LevelWindow settings required for correct 2D color mapping.
mitkCloneMacro(LabeledImageLookupTable)
virtual double * GetColorForLabel(const LabelType &label)
Get the RGBA color assigned to a given label.
virtual void GenerateRandomColor(double &r, double &g, double &b)
LabeledImageLookupTable & operator=(const LookupTable &other) override
Assignment from a generic LookupTable.
mitkClassMacro(LabeledImageLookupTable, LookupTable)
virtual void SetColorForLabel(const LabelType &label, const double &r, const double &g, const double &b, const double a=1.0)
Set the RGBA color for a given label.
virtual double GenerateRandomNumber()
LabeledImageLookupTable(const LabeledImageLookupTable &other)
The LevelWindow class Class to store level/window values.
MITK wrapper for a vtkLookupTable.
Find image slices visible on a given plane.