VTK  9.1.0
vtkImageMapToColors.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageMapToColors.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
138#ifndef vtkImageMapToColors_h
139#define vtkImageMapToColors_h
140
141#include "vtkImagingCoreModule.h" // For export macro
143
145
146class VTKIMAGINGCORE_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm
147{
148public:
151 void PrintSelf(ostream& os, vtkIndent indent) override;
152
154
158 vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
160
162
165 vtkSetMacro(OutputFormat, int);
166 vtkGetMacro(OutputFormat, int);
167 void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
168 void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
170 void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
172
174
177 vtkSetMacro(ActiveComponent, int);
178 vtkGetMacro(ActiveComponent, int);
180
182
186 vtkSetMacro(PassAlphaToOutput, vtkTypeBool);
187 vtkBooleanMacro(PassAlphaToOutput, vtkTypeBool);
188 vtkGetMacro(PassAlphaToOutput, vtkTypeBool);
190
195
197
201 vtkSetVector4Macro(NaNColor, unsigned char);
202 vtkGetVector4Macro(NaNColor, unsigned char);
204
205protected:
208
210
212 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
213 int outExt[6], int id) override;
214
216 vtkInformationVector* outputVector) override;
217
220
223
225
226 unsigned char NaNColor[4];
227
228private:
230 void operator=(const vtkImageMapToColors&) = delete;
231};
232
233#endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
map the input image through a lookup table
void SetOutputFormatToLuminance()
Set the output format, the default is RGBA.
vtkScalarsToColors * LookupTable
~vtkImageMapToColors() override
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkMTimeType GetMTime() override
We need to check the modified time of the lookup table too.
void SetOutputFormatToRGB()
Set the output format, the default is RGBA.
static vtkImageMapToColors * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetLookupTable(vtkScalarsToColors *)
Set the lookup table.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetOutputFormatToRGBA()
Set the output format, the default is RGBA.
void SetOutputFormatToLuminanceAlpha()
Set the output format, the default is RGBA.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for mapping scalar values to colors.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_LUMINANCE_ALPHA
#define VTK_RGBA
#define VTK_RGB
#define VTK_LUMINANCE
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287