VTK  9.3.0
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
32 #ifndef vtkImageMapToColors_h
33 #define vtkImageMapToColors_h
34 
35 #include "vtkImagingCoreModule.h" // For export macro
37 
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkScalarsToColors;
40 
41 class VTKIMAGINGCORE_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
53  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
55 
57 
60  vtkSetMacro(OutputFormat, int);
61  vtkGetMacro(OutputFormat, int);
62  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
63  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
64  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
65  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
67 
69 
72  vtkSetMacro(ActiveComponent, int);
73  vtkGetMacro(ActiveComponent, int);
75 
77 
81  vtkSetMacro(PassAlphaToOutput, vtkTypeBool);
82  vtkBooleanMacro(PassAlphaToOutput, vtkTypeBool);
83  vtkGetMacro(PassAlphaToOutput, vtkTypeBool);
85 
89  vtkMTimeType GetMTime() override;
90 
92 
96  vtkSetVector4Macro(NaNColor, unsigned char);
97  vtkGetVector4Macro(NaNColor, unsigned char);
99 
100 protected:
103 
105 
107  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
108  int outExt[6], int id) override;
109 
110  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
111  vtkInformationVector* outputVector) override;
112 
115 
118 
120 
121  unsigned char NaNColor[4];
122 
123 private:
124  vtkImageMapToColors(const vtkImageMapToColors&) = delete;
125  void operator=(const vtkImageMapToColors&) = delete;
126 };
127 
128 VTK_ABI_NAMESPACE_END
129 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
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:38
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:64
#define VTK_LUMINANCE_ALPHA
#define VTK_RGBA
#define VTK_RGB
#define VTK_LUMINANCE
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270