VTK  9.7.20260915
vtkLookupTableManager.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
26
27#ifndef vtkLookupTableManager_h
28#define vtkLookupTableManager_h
29
30#include "vtkObject.h"
31#include "vtkViewsScivisModule.h" // For export macro
32
33VTK_ABI_NAMESPACE_BEGIN
34class vtkLookupTable;
36
37class VTKVIEWSSCIVIS_EXPORT vtkLookupTableManager : public vtkObject
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
50
57 vtkScalarsToColors* GetLookupTable(const char* arrayName);
58
63 bool HasLookupTable(const char* arrayName);
64
69 void SetLookupTable(const char* arrayName, vtkScalarsToColors* lut);
70
75 void RemoveLookupTable(const char* arrayName);
76
81
83
88 const char* GetLookupTableName(int index);
90
92
101 vtkSetMacro(DefaultColorScheme, int);
102 vtkGetMacro(DefaultColorScheme, int);
104
106
110 vtkSetMacro(NumberOfTableValues, int);
111 vtkGetMacro(NumberOfTableValues, int);
113
114protected:
117
123
124private:
126 void operator=(const vtkLookupTableManager&) = delete;
127
128 class vtkInternals;
129 vtkInternals* Internals;
130
131 int DefaultColorScheme;
132 int NumberOfTableValues;
133};
134
135VTK_ABI_NAMESPACE_END
136#endif
a simple class to control print indentation
Definition vtkIndent.h:108
void SetLookupTable(const char *arrayName, vtkScalarsToColors *lut)
Use lut for arrayName in place of whatever table the array had.
void RemoveLookupTable(const char *arrayName)
Forget the lookup table of arrayName.
void BuildDefaultLookupTable(vtkLookupTable *lut)
Fill lut with NumberOfTableValues entries interpolated across the colors of DefaultColorScheme.
void RemoveAllLookupTables()
Forget every lookup table.
static vtkLookupTableManager * New()
~vtkLookupTableManager() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType GetMTime() override
The tables handed out here stay reachable and mutable by their users, so the modified time reported i...
bool HasLookupTable(const char *arrayName)
Whether arrayName already has a lookup table.
const char * GetLookupTableName(int index)
The tables currently held, in name order.
vtkScalarsToColors * GetLookupTable(const char *arrayName)
Get the lookup table for arrayName, creating one from DefaultColorScheme if this is the first time th...
int GetNumberOfLookupTables()
The tables currently held, in name order.
map scalar values into colors via a lookup table
Superclass for mapping scalar values to colors.
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318