VTK
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 
35 #include "vtkImagingCoreModule.h" // For export macro
36 #include "vtkImageReslice.h"
37 
38 class vtkScalarsToColors;
39 
40 class VTKIMAGINGCORE_EXPORT vtkImageResliceToColors : public vtkImageReslice
41 {
42 public:
43  static vtkImageResliceToColors *New();
45 
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 
49 
56  virtual void SetLookupTable(vtkScalarsToColors *table);
57  vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
59 
61 
64  vtkSetClampMacro(OutputFormat,int,VTK_LUMINANCE,VTK_RGBA);
65  vtkGetMacro(OutputFormat,int);
67  this->OutputFormat = VTK_RGBA; };
69  this->OutputFormat = VTK_RGB; };
71  this->OutputFormat = VTK_LUMINANCE_ALPHA; };
73  this->OutputFormat = VTK_LUMINANCE; };
75 
81  void SetBypass(int bypass);
82  void BypassOn() { this->SetBypass(1); }
83  void BypassOff() { this->SetBypass(0); }
84  int GetBypass() { return this->Bypass; }
85 
90  vtkMTimeType GetMTime() VTK_OVERRIDE;
91 
92 protected:
94  ~vtkImageResliceToColors() VTK_OVERRIDE;
95 
96  vtkScalarsToColors *LookupTable;
97  vtkScalarsToColors *DefaultLookupTable;
98  int OutputFormat;
99  int Bypass;
100 
101  int ConvertScalarInfo(int &scalarType, int &numComponents) VTK_OVERRIDE;
102 
103  void ConvertScalars(void *inPtr, void *outPtr, int inputType,
104  int inputNumComponents, int count,
105  int idX, int idY, int idZ, int threadId) VTK_OVERRIDE;
106 
107 private:
108  vtkImageResliceToColors(const vtkImageResliceToColors&) VTK_DELETE_FUNCTION;
109  void operator=(const vtkImageResliceToColors&) VTK_DELETE_FUNCTION;
110 };
111 
112 #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:300
void SetOutputFormatToRGB()
Set the output format, the default is RGBA.
static vtkImageReslice * New()
#define VTK_LUMINANCE
Superclass for mapping scalar values to colors.
a simple class to control print indentation
Definition: vtkIndent.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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