VTK  9.7.1
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 #include "vtkWrappingHints.h"
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkDataArray;
31 class vtkScalarsToColors;
32 
33 class VTKIMAGINGCORE_EXPORT VTK_MARSHALAUTO vtkImageResliceToColors : public vtkImageReslice
34 {
35 public:
36  static vtkImageResliceToColors* New();
38 
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
50  virtual void SetLookupTable(vtkScalarsToColors* table);
51  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
53 
55 
58  vtkSetClampMacro(OutputFormat, int, VTK_LUMINANCE, VTK_RGBA);
59  vtkGetMacro(OutputFormat, int);
60  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
61  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
62  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
63  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
65 
71  void SetBypass(vtkTypeBool bypass);
72  void BypassOn() { this->SetBypass(1); }
73  void BypassOff() { this->SetBypass(0); }
74  int GetBypass() { return this->Bypass; }
75 
80  vtkMTimeType GetMTime() override;
81 
82 protected:
84  ~vtkImageResliceToColors() override;
85 
90 
91  int ConvertScalarInfo(int& scalarType, int& numComponents) override;
92 
94  void ConvertScalars(
95  vtkDataArray* input, void* outPtr, int count, int idX, int idY, int idZ, int threadId) override;
96 
97 private:
99  void operator=(const vtkImageResliceToColors&) = delete;
100 };
101 
102 VTK_ABI_NAMESPACE_END
103 #endif
vtkMTimeType GetMTime() override
When determining the modified time of the filter, this check the modified time of the transform and m...
#define VTK_LUMINANCE_ALPHA
Reslice and produce color scalars.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
virtual void ConvertScalars(vtkDataArray *input, void *outPtr, int count, int idX, int idY, int idZ, int threadId)
This should be overridden by derived classes that operate on the interpolated data before it is place...
void SetOutputFormatToRGB()
Set the output format, the default is RGBA.
static vtkImageReslice * New()
#define VTK_LUMINANCE
int vtkTypeBool
Definition: vtkABI.h:64
Superclass for mapping scalar values to colors.
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
vtkScalarsToColors * LookupTable
void SetOutputFormatToRGBA()
Set the output format, the default is RGBA.
Reslices a volume along a new set of axes.
void SetOutputFormatToLuminance()
Set the output format, the default is RGBA.
#define VTK_RGBA
void SetOutputFormatToLuminanceAlpha()
Set the output format, the default is RGBA.
#define VTK_RGB
#define VTK_MARSHALAUTO
vtkScalarsToColors * DefaultLookupTable
virtual int ConvertScalarInfo(int &scalarType, int &numComponents)
This should be overridden by derived classes that operate on the interpolated data before it is place...