VTK
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 
39 #include "vtkImagingCoreModule.h" // For export macro
41 
42 class vtkScalarsToColors;
43 
44 class VTKIMAGINGCORE_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm
45 {
46 public:
47  static vtkImageMapToColors *New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
55  virtual void SetLookupTable(vtkScalarsToColors*);
56  vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
58 
60 
63  vtkSetMacro(OutputFormat,int);
64  vtkGetMacro(OutputFormat,int);
65  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; };
66  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; };
67  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; };
68  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; };
70 
72 
75  vtkSetMacro(ActiveComponent,int);
76  vtkGetMacro(ActiveComponent,int);
78 
80 
84  vtkSetMacro(PassAlphaToOutput,vtkTypeBool);
85  vtkBooleanMacro(PassAlphaToOutput,vtkTypeBool);
86  vtkGetMacro(PassAlphaToOutput,vtkTypeBool);
88 
92  vtkMTimeType GetMTime() override;
93 
95 
99  vtkSetVector4Macro(NaNColor, unsigned char);
100  vtkGetVector4Macro(NaNColor, unsigned char);
102 
103 protected:
105  ~vtkImageMapToColors() override;
106 
109  vtkInformationVector *) override;
110 
111  void ThreadedRequestData(vtkInformation *request,
112  vtkInformationVector **inputVector,
113  vtkInformationVector *outputVector,
114  vtkImageData ***inData, vtkImageData **outData,
115  int extent[6], int id) override;
116 
117  int RequestData(vtkInformation *request,
118  vtkInformationVector **inputVector,
119  vtkInformationVector *outputVector) override;
120 
123 
126 
128 
129  unsigned char NaNColor[4];
130 private:
131  vtkImageMapToColors(const vtkImageMapToColors&) = delete;
132  void operator=(const vtkImageMapToColors&) = delete;
133 };
134 
135 #endif
136 
137 
138 
139 
140 
141 
142 
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:68
vtkImageMapToColors::PassAlphaToOutput
vtkTypeBool PassAlphaToOutput
Definition: vtkImageMapToColors.h:125
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:43
vtkImageMapToColors
map the input image through a lookup table
Definition: vtkImageMapToColors.h:44
vtkThreadedImageAlgorithm.h
vtkImageMapToColors::LookupTable
vtkScalarsToColors * LookupTable
Definition: vtkImageMapToColors.h:121
VTK_LUMINANCE
#define VTK_LUMINANCE
Definition: vtkSystemIncludes.h:97
vtkImageMapToColors::DataWasPassed
int DataWasPassed
Definition: vtkImageMapToColors.h:127
vtkImageMapToColors::ActiveComponent
int ActiveComponent
Definition: vtkImageMapToColors.h:124
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:122
vtkImageMapToColors::SetOutputFormatToRGB
void SetOutputFormatToRGB()
Definition: vtkImageMapToColors.h:66
VTK_RGB
#define VTK_RGB
Definition: vtkSystemIncludes.h:99
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:66
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkAlgorithm::New
static vtkAlgorithm * New()
VTK_LUMINANCE_ALPHA
#define VTK_LUMINANCE_ALPHA
Definition: vtkSystemIncludes.h:98
vtkImageMapToColors::SetOutputFormatToLuminanceAlpha
void SetOutputFormatToLuminanceAlpha()
Definition: vtkImageMapToColors.h:67
VTK_RGBA
#define VTK_RGBA
Definition: vtkSystemIncludes.h:100
vtkX3D::extent
Definition: vtkX3D.h:345
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:302
vtkImageMapToColors::SetOutputFormatToRGBA
void SetOutputFormatToRGBA()
Definition: vtkImageMapToColors.h:65