VTK  9.1.0
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=========================================================================*/
31#ifndef vtkImageResliceToColors_h
32#define vtkImageResliceToColors_h
33
34#include "vtkImageReslice.h"
35#include "vtkImagingCoreModule.h" // For export macro
36
38
39class VTKIMAGINGCORE_EXPORT vtkImageResliceToColors : public vtkImageReslice
40{
41public:
44
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
55 virtual void SetLookupTable(vtkScalarsToColors* table);
56 vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
58
60
63 vtkSetClampMacro(OutputFormat, int, VTK_LUMINANCE, VTK_RGBA);
64 vtkGetMacro(OutputFormat, int);
65 void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }
66 void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }
68 void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }
70
76 void SetBypass(int bypass);
77 void BypassOn() { this->SetBypass(1); }
78 void BypassOff() { this->SetBypass(0); }
79 int GetBypass() { return this->Bypass; }
80
86
87protected:
90
94 int Bypass;
95
96 int ConvertScalarInfo(int& scalarType, int& numComponents) override;
97
98 void ConvertScalars(void* inPtr, void* outPtr, int inputType, int inputNumComponents, int count,
99 int idX, int idY, int idZ, int threadId) override;
100
101private:
103 void operator=(const vtkImageResliceToColors&) = delete;
104};
105
106#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.
static vtkImageResliceToColors * New()
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
Reslices a volume along a new set of axes.
a simple class to control print indentation
Definition: vtkIndent.h:113
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