VTK  9.2.6
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 =========================================================================*/
31 #ifndef vtkScalarsToTextureFilter_h
32 #define vtkScalarsToTextureFilter_h
33 
34 #include "vtkFiltersTextureModule.h" // For export macro
35 #include "vtkPolyDataAlgorithm.h"
36 #include "vtkSmartPointer.h" // For smart pointer
37 
38 class vtkImageData;
39 class vtkPolyData;
40 class vtkScalarsToColors;
41 
42 class VTKFILTERSTEXTURE_EXPORT vtkScalarsToTextureFilter : public vtkPolyDataAlgorithm
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
56  void SetTransferFunction(vtkScalarsToColors* stc);
57  vtkScalarsToColors* GetTransferFunction();
59 
61 
65  vtkGetMacro(UseTransferFunction, bool);
66  vtkSetMacro(UseTransferFunction, bool);
67  vtkBooleanMacro(UseTransferFunction, bool);
69 
71 
75  vtkSetVector2Macro(TextureDimensions, int);
76  vtkGetVector2Macro(TextureDimensions, int);
78 
79 protected:
81  ~vtkScalarsToTextureFilter() override = default;
82 
84  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
85  vtkInformationVector* outputVector) override;
86  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
87  vtkInformationVector* outputVector) override;
88 
89 private:
90  void operator=(const vtkScalarsToTextureFilter&) = delete;
92 
93  vtkSmartPointer<vtkScalarsToColors> TransferFunction;
94  int TextureDimensions[2];
95  bool UseTransferFunction = true;
96 };
97 #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:90
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:53
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.