VTK  9.2.5
vtkImageResliceToColors.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageResliceToColors.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 =========================================================================*/
34 #ifndef vtkImageResliceToColors_h
35 #define vtkImageResliceToColors_h
36 
37 #include "vtkImageReslice.h"
38 #include "vtkImagingCoreModule.h" // For export macro
39 
40 class vtkScalarsToColors;
41 
42 class VTKIMAGINGCORE_EXPORT vtkImageResliceToColors : public vtkImageReslice
43 {
44 public:
47 
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
58  virtual void SetLookupTable(vtkScalarsToColors* table);
59  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
61 
63 
66  vtkSetClampMacro(OutputFormat, int, VTK_LUMINANCE, VTK_RGBA);
67  vtkGetMacro(OutputFormat, int);
68  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
69  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
70  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
71  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
73 
79  void SetBypass(int bypass);
80  void BypassOn() { this->SetBypass(1); }
81  void BypassOff() { this->SetBypass(0); }
82  int GetBypass() { return this->Bypass; }
83 
88  vtkMTimeType GetMTime() override;
89 
90 protected:
93 
97  int Bypass;
98 
99  int ConvertScalarInfo(int& scalarType, int& numComponents) override;
100 
101  void ConvertScalars(void* inPtr, void* outPtr, int inputType, int inputNumComponents, int count,
102  int idX, int idY, int idZ, int threadId) override;
103 
104 private:
106  void operator=(const vtkImageResliceToColors&) = delete;
107 };
108 
109 #endif
Reslice and produce color scalars.
vtkScalarsToColors * DefaultLookupTable
vtkMTimeType GetMTime() override
When determining the modified time of the filter, this checks the modified time of the transform and ...
void SetOutputFormatToRGB()
Set the output format, the default is RGBA.
int ConvertScalarInfo(int &scalarType, int &numComponents) override
This should be overridden by derived classes that operate on the interpolated data before it is place...
void SetBypass(int bypass)
Bypass the color mapping operation and output the scalar values directly.
vtkScalarsToColors * LookupTable
virtual void SetLookupTable(vtkScalarsToColors *table)
Set a lookup table to apply to the data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOutputFormatToLuminanceAlpha()
Set the output format, the default is RGBA.
void SetOutputFormatToLuminance()
Set the output format, the default is RGBA.
void SetOutputFormatToRGBA()
Set the output format, the default is RGBA.
void ConvertScalars(void *inPtr, void *outPtr, int inputType, int inputNumComponents, int count, int idX, int idY, int idZ, int threadId) override
This should be overridden by derived classes that operate on the interpolated data before it is place...
~vtkImageResliceToColors() override
static vtkImageResliceToColors * New()
Reslices a volume along a new set of axes.
a simple class to control print indentation
Definition: vtkIndent.h:119
Superclass for mapping scalar values to colors.
#define VTK_LUMINANCE_ALPHA
#define VTK_RGBA
#define VTK_RGB
#define VTK_LUMINANCE
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287