VTK  9.2.6
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 =========================================================================*/
35 #ifndef vtkImageMapToColors_h
36 #define vtkImageMapToColors_h
37 
38 #include "vtkImagingCoreModule.h" // For export macro
40 
41 class vtkScalarsToColors;
42 
43 class VTKIMAGINGCORE_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm
44 {
45 public:
46  static vtkImageMapToColors* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
54  virtual void SetLookupTable(vtkScalarsToColors*);
55  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
57 
59 
62  vtkSetMacro(OutputFormat, int);
63  vtkGetMacro(OutputFormat, int);
64  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
65  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
66  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
67  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
69 
71 
74  vtkSetMacro(ActiveComponent, int);
75  vtkGetMacro(ActiveComponent, int);
77 
79 
83  vtkSetMacro(PassAlphaToOutput, vtkTypeBool);
84  vtkBooleanMacro(PassAlphaToOutput, vtkTypeBool);
85  vtkGetMacro(PassAlphaToOutput, vtkTypeBool);
87 
91  vtkMTimeType GetMTime() override;
92 
94 
98  vtkSetVector4Macro(NaNColor, unsigned char);
99  vtkGetVector4Macro(NaNColor, unsigned char);
101 
102 protected:
104  ~vtkImageMapToColors() override;
105 
107 
108  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
109  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
110  int outExt[6], int id) override;
111 
112  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
113  vtkInformationVector* outputVector) override;
114 
117 
120 
122 
123  unsigned char NaNColor[4];
124 
125 private:
126  vtkImageMapToColors(const vtkImageMapToColors&) = delete;
127  void operator=(const vtkImageMapToColors&) = delete;
128 };
129 
130 #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:287
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:69
Superclass for mapping scalar values to colors.
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetOutputFormatToRGBA()
Set the output format, the default is RGBA.
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
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
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, 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.
void SetOutputFormatToRGB()
Set the output format, the default is RGBA.
#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.