VTK  9.7.1
vtkImageMapToColors.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
23 #ifndef vtkImageMapToColors_h
24 #define vtkImageMapToColors_h
25 
26 #include "vtkImagingCoreModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkScalarsToColors;
31 
33 {
34 public:
35  static vtkImageMapToColors* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
43  virtual void SetLookupTable(vtkScalarsToColors*);
44  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
46 
48 
51  vtkSetMacro(OutputFormat, int);
52  vtkGetMacro(OutputFormat, int);
53  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
54  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
55  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
56  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
58 
60 
63  vtkSetMacro(ActiveComponent, int);
64  vtkGetMacro(ActiveComponent, int);
66 
68 
72  vtkSetMacro(PassAlphaToOutput, vtkTypeBool);
73  vtkBooleanMacro(PassAlphaToOutput, vtkTypeBool);
74  vtkGetMacro(PassAlphaToOutput, vtkTypeBool);
76 
80  vtkMTimeType GetMTime() override;
81 
83 
87  vtkSetVector4Macro(NaNColor, unsigned char);
88  vtkGetVector4Macro(NaNColor, unsigned char);
90 
91 protected:
93  ~vtkImageMapToColors() override;
94 
96 
97  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
98  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
99  VTK_FUTURE_CONST int outExt[6], int id) override;
100 
101  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
102  vtkInformationVector* outputVector) override;
103 
106 
109 
111 
112  unsigned char NaNColor[4];
113 
114 private:
115  vtkImageMapToColors(const vtkImageMapToColors&) = delete;
116  void operator=(const vtkImageMapToColors&) = delete;
117 };
118 
119 VTK_ABI_NAMESPACE_END
120 #endif
#define VTK_LUMINANCE_ALPHA
void SetOutputFormatToLuminance()
Set the output format, the default is RGBA.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
void SetOutputFormatToLuminanceAlpha()
Set the output format, the default is RGBA.
vtkScalarsToColors * LookupTable
#define VTK_LUMINANCE
int vtkTypeBool
Definition: vtkABI.h:64
Superclass for mapping scalar values to colors.
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetOutputFormatToRGBA()
Set the output format, the default is RGBA.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
virtual vtkMTimeType GetMTime()
Return this object's modified time.
map the input image through a lookup table
void SetOutputFormatToRGB()
Set the output format, the default is RGBA.
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, VTK_FUTURE_CONST int extent[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up, multiple threads will be spawned, and each thread will call this method.
#define VTK_RGBA
#define VTK_RGB
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_MARSHALAUTO