VTK  9.0.1
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 
37 class vtkScalarsToColors;
38 
39 class VTKIMAGINGCORE_EXPORT vtkImageResliceToColors : public vtkImageReslice
40 {
41 public:
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; }
67  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }
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 
85  vtkMTimeType GetMTime() override;
86 
87 protected:
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 
101 private:
103  void operator=(const vtkImageResliceToColors&) = delete;
104 };
105 
106 #endif
vtkImageResliceToColors::ConvertScalarInfo
int ConvertScalarInfo(int &scalarType, int &numComponents) override
This should be overridden by derived classes that operate on the interpolated data before it is place...
vtkImageReslice.h
vtkImageResliceToColors::BypassOn
void BypassOn()
Definition: vtkImageResliceToColors.h:77
vtkImageResliceToColors::SetLookupTable
virtual void SetLookupTable(vtkScalarsToColors *table)
Set a lookup table to apply to the data.
vtkImageResliceToColors::OutputFormat
int OutputFormat
Definition: vtkImageResliceToColors.h:93
vtkImageResliceToColors::SetOutputFormatToRGB
void SetOutputFormatToRGB()
Definition: vtkImageResliceToColors.h:66
vtkImageResliceToColors::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageResliceToColors::Bypass
int Bypass
Definition: vtkImageResliceToColors.h:94
VTK_LUMINANCE
#define VTK_LUMINANCE
Definition: vtkSystemIncludes.h:84
vtkImageResliceToColors::~vtkImageResliceToColors
~vtkImageResliceToColors() override
vtkImageResliceToColors::GetMTime
vtkMTimeType GetMTime() override
When determining the modified time of the filter, this checks the modified time of the transform and ...
VTK_RGB
#define VTK_RGB
Definition: vtkSystemIncludes.h:86
vtkImageResliceToColors::vtkImageResliceToColors
vtkImageResliceToColors()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkImageReslice
Reslices a volume along a new set of axes.
Definition: vtkImageReslice.h:71
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:60
vtkImageResliceToColors::BypassOff
void BypassOff()
Definition: vtkImageResliceToColors.h:78
VTK_LUMINANCE_ALPHA
#define VTK_LUMINANCE_ALPHA
Definition: vtkSystemIncludes.h:85
vtkImageResliceToColors::SetOutputFormatToRGBA
void SetOutputFormatToRGBA()
Definition: vtkImageResliceToColors.h:65
vtkImageResliceToColors::LookupTable
vtkScalarsToColors * LookupTable
Definition: vtkImageResliceToColors.h:91
vtkImageResliceToColors::SetBypass
void SetBypass(int bypass)
Bypass the color mapping operation and output the scalar values directly.
vtkImageResliceToColors::SetOutputFormatToLuminanceAlpha
void SetOutputFormatToLuminanceAlpha()
Definition: vtkImageResliceToColors.h:67
vtkImageResliceToColors
Reslice and produce color scalars.
Definition: vtkImageResliceToColors.h:40
VTK_RGBA
#define VTK_RGBA
Definition: vtkSystemIncludes.h:87
vtkImageResliceToColors::New
static vtkImageResliceToColors * New()
vtkImageResliceToColors::ConvertScalars
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::SetOutputFormatToLuminance
void SetOutputFormatToLuminance()
Definition: vtkImageResliceToColors.h:68
vtkImageResliceToColors::GetBypass
int GetBypass()
Definition: vtkImageResliceToColors.h:79
vtkImageResliceToColors::DefaultLookupTable
vtkScalarsToColors * DefaultLookupTable
Definition: vtkImageResliceToColors.h:92
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293