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 =========================================================================*/
29 #ifndef vtkImageMapToColors_h
30 #define vtkImageMapToColors_h
31 
32 
33 #include "vtkImagingCoreModule.h" // For export macro
35 
36 class vtkScalarsToColors;
37 
38 class VTKIMAGINGCORE_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm
39 {
40 public:
41  static vtkImageMapToColors *New();
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
46 
49  virtual void SetLookupTable(vtkScalarsToColors*);
50  vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
52 
54 
57  vtkSetMacro(OutputFormat,int);
58  vtkGetMacro(OutputFormat,int);
59  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; };
60  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; };
61  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; };
62  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; };
64 
66 
69  vtkSetMacro(ActiveComponent,int);
70  vtkGetMacro(ActiveComponent,int);
72 
74 
78  vtkSetMacro(PassAlphaToOutput,int);
79  vtkBooleanMacro(PassAlphaToOutput,int);
80  vtkGetMacro(PassAlphaToOutput,int);
82 
86  vtkMTimeType GetMTime() VTK_OVERRIDE;
87 
89 
93  vtkSetVector4Macro(NaNColor, unsigned char);
94  vtkGetVector4Macro(NaNColor, unsigned char);
96 
97 protected:
99  ~vtkImageMapToColors() VTK_OVERRIDE;
100 
101  int RequestInformation(vtkInformation *,
103  vtkInformationVector *) VTK_OVERRIDE;
104 
105  void ThreadedRequestData(vtkInformation *request,
106  vtkInformationVector **inputVector,
107  vtkInformationVector *outputVector,
108  vtkImageData ***inData, vtkImageData **outData,
109  int extent[6], int id) VTK_OVERRIDE;
110 
111  int RequestData(vtkInformation *request,
112  vtkInformationVector **inputVector,
113  vtkInformationVector *outputVector) VTK_OVERRIDE;
114 
115  vtkScalarsToColors *LookupTable;
116  int OutputFormat;
117 
118  int ActiveComponent;
119  int PassAlphaToOutput;
120 
121  int DataWasPassed;
122 
123  unsigned char NaNColor[4];
124 private:
125  vtkImageMapToColors(const vtkImageMapToColors&) VTK_DELETE_FUNCTION;
126  void operator=(const vtkImageMapToColors&) VTK_DELETE_FUNCTION;
127 };
128 
129 #endif
130 
131 
132 
133 
134 
135 
136 
#define VTK_LUMINANCE_ALPHA
void SetOutputFormatToLuminance()
Set the output format, the default is RGBA.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
void SetOutputFormatToLuminanceAlpha()
Set the output format, the default is RGBA.
#define VTK_LUMINANCE
Superclass for mapping scalar values to colors.
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetOutputFormatToRGBA()
Set the output format, the default is RGBA.
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
map the input image through a lookup table
void SetOutputFormatToRGB()
Set the output format, the default is RGBA.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
#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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.