VTK
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,
82  vtkInformationVector** inputVector,
83  vtkInformationVector* outputVector) override;
85  vtkInformationVector** inputVector,
86  vtkInformationVector* outputVector) override;
87 
88 private:
89  void operator=(const vtkScalarsToTextureFilter&) = delete;
91 
92  vtkSmartPointer<vtkScalarsToColors> TransferFunction;
93  int TextureDimensions[2];
94  bool UseTransferFunction = true;
95 };
96 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
static vtkPolyDataAlgorithm * New()
Superclass for mapping scalar values to colors.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
generate texture coordinates and a texture image based on a scalar field
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.