VTK  9.7.20261007
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33
34VTK_ABI_NAMESPACE_BEGIN
35class vtkLookupTable;
37
38class VTKVIEWSSCIVIS_EXPORT VTK_MARSHALAUTO vtkLookupTableManager : public vtkObject
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
51
58 vtkScalarsToColors* GetLookupTable(const char* arrayName);
59
64 bool HasLookupTable(const char* arrayName);
65
70 void SetLookupTable(const char* arrayName, vtkScalarsToColors* lut);
71
76 void RemoveLookupTable(const char* arrayName);
77
82
84
89 const char* GetLookupTableName(int index);
91
93
102 vtkSetMacro(DefaultColorScheme, int);
103 vtkGetMacro(DefaultColorScheme, int);
105
107
111 vtkSetMacro(NumberOfTableValues, int);
112 vtkGetMacro(NumberOfTableValues, int);
114
115protected:
118
124
125private:
127 void operator=(const vtkLookupTableManager&) = delete;
128
129 class vtkInternals;
130 vtkInternals* Internals;
131
132 int DefaultColorScheme;
133 int NumberOfTableValues;
134};
135
136VTK_ABI_NAMESPACE_END
137#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
#define VTK_MARSHALAUTO