VTK  9.0.20200709
vtkScalarsToTextureFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkScalarsToTextureFilter.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 =========================================================================*/
28 #ifndef vtkScalarsToTextureFilter_h
29 #define vtkScalarsToTextureFilter_h
30 
31 #include "vtkFiltersTextureModule.h" // For export macro
32 #include "vtkPolyDataAlgorithm.h"
33 #include "vtkSmartPointer.h" // For smart pointer
34 
35 class vtkImageData;
36 class vtkPolyData;
37 class vtkScalarsToColors;
38 
39 class VTKFILTERSTEXTURE_EXPORT vtkScalarsToTextureFilter : public vtkPolyDataAlgorithm
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
53  void SetTransferFunction(vtkScalarsToColors* stc);
54  vtkScalarsToColors* GetTransferFunction();
56 
58 
62  vtkGetMacro(UseTransferFunction, bool);
63  vtkSetMacro(UseTransferFunction, bool);
64  vtkBooleanMacro(UseTransferFunction, bool);
66 
68 
72  vtkSetVector2Macro(TextureDimensions, int);
73  vtkGetVector2Macro(TextureDimensions, int);
75 
76 protected:
78  ~vtkScalarsToTextureFilter() override = default;
79 
81  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
82  vtkInformationVector* outputVector) override;
83  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
84  vtkInformationVector* outputVector) override;
85 
86 private:
87  void operator=(const vtkScalarsToTextureFilter&) = delete;
89 
90  vtkSmartPointer<vtkScalarsToColors> TransferFunction;
91  int TextureDimensions[2];
92  bool UseTransferFunction = true;
93 };
94 #endif
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkSmartPointer< vtkScalarsToColors >
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:453
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSmartPointer.h
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:59
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
Definition: vtkX3D.h:382
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkScalarsToTextureFilter
generate texture coordinates and a texture image based on a scalar field
Definition: vtkScalarsToTextureFilter.h:39
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41