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 
144 class vtkScalarsToColors;
145 
146 class VTKIMAGINGCORE_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm
147 {
148 public:
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; }
169  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
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 
194  vtkMTimeType GetMTime() override;
195 
197 
201  vtkSetVector4Macro(NaNColor, unsigned char);
202  vtkGetVector4Macro(NaNColor, unsigned char);
204 
205 protected:
208 
210 
212  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
213  int outExt[6], int id) override;
214 
215  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
216  vtkInformationVector* outputVector) override;
217 
220 
223 
225 
226  unsigned char NaNColor[4];
227 
228 private:
229  vtkImageMapToColors(const vtkImageMapToColors&) = delete;
230  void operator=(const vtkImageMapToColors&) = delete;
231 };
232 
233 #endif
vtkImageMapToColors::vtkImageMapToColors
vtkImageMapToColors()
vtkImageMapToColors::SetOutputFormatToLuminance
void SetOutputFormatToLuminance()
Set the output format, the default is RGBA.
Definition: vtkImageMapToColors.h:170
vtkImageMapToColors::PassAlphaToOutput
vtkTypeBool PassAlphaToOutput
Definition: vtkImageMapToColors.h:222
vtkImageMapToColors::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkImageMapToColors::New
static vtkImageMapToColors * New()
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:39
vtkImageMapToColors
map the input image through a lookup table
Definition: vtkImageMapToColors.h:147
vtkThreadedImageAlgorithm.h
vtkImageMapToColors::LookupTable
vtkScalarsToColors * LookupTable
Definition: vtkImageMapToColors.h:218
vtkImageMapToColors::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
VTK_LUMINANCE
#define VTK_LUMINANCE
Definition: vtkSystemIncludes.h:84
vtkImageMapToColors::DataWasPassed
int DataWasPassed
Definition: vtkImageMapToColors.h:224
vtkImageMapToColors::ActiveComponent
int ActiveComponent
Definition: vtkImageMapToColors.h:221
vtkImageMapToColors::GetMTime
vtkMTimeType GetMTime() override
We need to check the modified time of the lookup table too.
vtkImageMapToColors::OutputFormat
int OutputFormat
Definition: vtkImageMapToColors.h:219
vtkImageMapToColors::SetOutputFormatToRGB
void SetOutputFormatToRGB()
Set the output format, the default is RGBA.
Definition: vtkImageMapToColors.h:168
VTK_RGB
#define VTK_RGB
Definition: vtkSystemIncludes.h:86
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkImageMapToColors::~vtkImageMapToColors
~vtkImageMapToColors() override
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:109
vtkImageMapToColors::ThreadedRequestData
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,...
vtkImageMapToColors::SetLookupTable
virtual void SetLookupTable(vtkScalarsToColors *)
Set the lookup table.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
VTK_LUMINANCE_ALPHA
#define VTK_LUMINANCE_ALPHA
Definition: vtkSystemIncludes.h:85
vtkImageMapToColors::SetOutputFormatToLuminanceAlpha
void SetOutputFormatToLuminanceAlpha()
Set the output format, the default is RGBA.
Definition: vtkImageMapToColors.h:169
VTK_RGBA
#define VTK_RGBA
Definition: vtkSystemIncludes.h:87
vtkImageMapToColors::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
vtkImageMapToColors::SetOutputFormatToRGBA
void SetOutputFormatToRGBA()
Set the output format, the default is RGBA.
Definition: vtkImageMapToColors.h:167