VTK  9.3.20240419
vtkImageResliceToColors.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
22 #ifndef vtkImageResliceToColors_h
23 #define vtkImageResliceToColors_h
24 
25 #include "vtkImageReslice.h"
26 #include "vtkImagingCoreModule.h" // For export macro
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkScalarsToColors;
30 
31 class VTKIMAGINGCORE_EXPORT vtkImageResliceToColors : public vtkImageReslice
32 {
33 public:
36 
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
47  virtual void SetLookupTable(vtkScalarsToColors* table);
48  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
50 
52 
55  vtkSetClampMacro(OutputFormat, int, VTK_LUMINANCE, VTK_RGBA);
56  vtkGetMacro(OutputFormat, int);
57  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
58  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
59  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
60  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
62 
68  void SetBypass(int bypass);
69  void BypassOn() { this->SetBypass(1); }
70  void BypassOff() { this->SetBypass(0); }
71  int GetBypass() { return this->Bypass; }
72 
77  vtkMTimeType GetMTime() override;
78 
79 protected:
82 
86  int Bypass;
87 
88  int ConvertScalarInfo(int& scalarType, int& numComponents) override;
89 
90  void ConvertScalars(void* inPtr, void* outPtr, int inputType, int inputNumComponents, int count,
91  int idX, int idY, int idZ, int threadId) override;
92 
93 private:
95  void operator=(const vtkImageResliceToColors&) = delete;
96 };
97 
98 VTK_ABI_NAMESPACE_END
99 #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:108
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:270