NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkVtkLookupTableUtils.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkVtkLookupTableUtils_h
16 #define niftkVtkLookupTableUtils_h
17 
18 #include "niftkCoreExports.h"
19 
20 #include <vector>
21 
22 #include <QColor>
23 
29 class vtkLookupTable;
30 
31 namespace niftk
32 {
36 typedef std::pair<int, std::string> LabelType;
37 typedef std::vector<LabelType> LabelsListType;
38 typedef std::vector<QColor> ColorListType;
39 
43 NIFTKCORE_EXPORT vtkLookupTable* ChangeColor(vtkLookupTable* lut, int value, const QColor& newColor);
44 
48 NIFTKCORE_EXPORT vtkLookupTable* SwapColors(vtkLookupTable* lut, int value1, int value2);
49 
54 NIFTKCORE_EXPORT vtkLookupTable* ResizeLookupTable(vtkLookupTable* lut, double newMaximum);
55 
56 NIFTKCORE_EXPORT vtkLookupTable* CreateEmptyLookupTable(const QColor& lowColor = QColor(0, 0, 0, 0), const QColor& highColor = QColor(0, 0, 0, 0));
57 
58 }
59 
60 #endif
std::vector< LabelType > LabelsListType
Definition: niftkVtkLookupTableUtils.h:37
std::pair< int, std::string > LabelType
Definition: niftkVtkLookupTableUtils.h:36
vtkLookupTable * SwapColors(vtkLookupTable *lut, int value1, int value2)
Swap colors in the LookupTable at the given indices.
Definition: niftkVtkLookupTableUtils.cxx:38
vtkLookupTable * CreateEmptyLookupTable(const QColor &lowColor, const QColor &highColor)
Definition: niftkVtkLookupTableUtils.cxx:132
GLsizei const GLfloat * value
Definition: glew.h:1833
vtkLookupTable * ChangeColor(vtkLookupTable *lut, int value, const QColor &newColor)
Replace the color in the LookupTable at the given index.
Definition: niftkVtkLookupTableUtils.cxx:25
std::vector< QColor > ColorListType
Definition: niftkVtkLookupTableUtils.h:38
vtkLookupTable * ResizeLookupTable(vtkLookupTable *lut, double newMaximum)
Resize the LookupTable while retaining all of the previously set values. Newly added values are assig...
Definition: niftkVtkLookupTableUtils.cxx:92
Definition: niftkExceptionObject.h:21