VTK  9.0.1
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 =========================================================================*/
29 #ifndef vtkImageMapToColors_h
30 #define vtkImageMapToColors_h
31 
32 #include "vtkImagingCoreModule.h" // For export macro
34 
35 class vtkScalarsToColors;
36 
37 class VTKIMAGINGCORE_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm
38 {
39 public:
40  static vtkImageMapToColors* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  virtual void SetLookupTable(vtkScalarsToColors*);
49  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
51 
53 
56  vtkSetMacro(OutputFormat, int);
57  vtkGetMacro(OutputFormat, int);
58  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
59  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
60  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
61  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
63 
65 
68  vtkSetMacro(ActiveComponent, int);
69  vtkGetMacro(ActiveComponent, int);
71 
73 
77  vtkSetMacro(PassAlphaToOutput, vtkTypeBool);
78  vtkBooleanMacro(PassAlphaToOutput, vtkTypeBool);
79  vtkGetMacro(PassAlphaToOutput, vtkTypeBool);
81 
85  vtkMTimeType GetMTime() override;
86 
88 
92  vtkSetVector4Macro(NaNColor, unsigned char);
93  vtkGetVector4Macro(NaNColor, unsigned char);
95 
96 protected:
98  ~vtkImageMapToColors() override;
99 
101 
102  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
103  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
104  int extent[6], int id) override;
105 
106  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
107  vtkInformationVector* outputVector) override;
108 
111 
114 
116 
117  unsigned char NaNColor[4];
118 
119 private:
120  vtkImageMapToColors(const vtkImageMapToColors&) = delete;
121  void operator=(const vtkImageMapToColors&) = delete;
122 };
123 
124 #endif
vtkThreadedImageAlgorithm::ThreadedRequestData
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,...
vtkImageMapToColors::SetOutputFormatToLuminance
void SetOutputFormatToLuminance()
Definition: vtkImageMapToColors.h:61
vtkImageMapToColors::PassAlphaToOutput
vtkTypeBool PassAlphaToOutput
Definition: vtkImageMapToColors.h:113
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:37
vtkImageMapToColors
map the input image through a lookup table
Definition: vtkImageMapToColors.h:37
vtkThreadedImageAlgorithm.h
vtkImageMapToColors::LookupTable
vtkScalarsToColors * LookupTable
Definition: vtkImageMapToColors.h:109
VTK_LUMINANCE
#define VTK_LUMINANCE
Definition: vtkSystemIncludes.h:84
vtkImageMapToColors::DataWasPassed
int DataWasPassed
Definition: vtkImageMapToColors.h:115
vtkImageMapToColors::ActiveComponent
int ActiveComponent
Definition: vtkImageMapToColors.h:112
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkThreadedImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageMapToColors::OutputFormat
int OutputFormat
Definition: vtkImageMapToColors.h:110
vtkImageMapToColors::SetOutputFormatToRGB
void SetOutputFormatToRGB()
Definition: vtkImageMapToColors.h:59
VTK_RGB
#define VTK_RGB
Definition: vtkSystemIncludes.h:86
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:59
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::New
static vtkAlgorithm * New()
VTK_LUMINANCE_ALPHA
#define VTK_LUMINANCE_ALPHA
Definition: vtkSystemIncludes.h:85
vtkImageMapToColors::SetOutputFormatToLuminanceAlpha
void SetOutputFormatToLuminanceAlpha()
Definition: vtkImageMapToColors.h:60
VTK_RGBA
#define VTK_RGBA
Definition: vtkSystemIncludes.h:87
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkThreadedImageAlgorithm::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkImageMapToColors::SetOutputFormatToRGBA
void SetOutputFormatToRGBA()
Definition: vtkImageMapToColors.h:58