VTK: Filters/Texture/vtkScalarsToTextureFilter.h Source File

| VTK 9.3.1

vtkScalarsToTextureFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkScalarsToTextureFilter_h
20 #define vtkScalarsToTextureFilter_h
21
22 #include "vtkFiltersTextureModule.h" // For export macro
23 #include "vtkPolyDataAlgorithm.h"
24 #include "vtkSmartPointer.h" // For smart pointer
25
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkImageData;
28 class vtkPolyData;
29 class vtkScalarsToColors;
30
31 class VTKFILTERSTEXTURE_EXPORT vtkScalarsToTextureFilter : public vtkPolyDataAlgorithm
32 {
33 public:
34 static vtkScalarsToTextureFilter* New();
35 vtkTypeMacro(vtkScalarsToTextureFilter, vtkPolyDataAlgorithm);
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
45 void SetTransferFunction(vtkScalarsToColors* stc);
46 vtkScalarsToColors* GetTransferFunction();
48
50
54 vtkGetMacro(UseTransferFunction, bool);
55 vtkSetMacro(UseTransferFunction, bool);
56 vtkBooleanMacro(UseTransferFunction, bool);
58
60
64 vtkSetVector2Macro(TextureDimensions, int);
65 vtkGetVector2Macro(TextureDimensions, int);
67
68 protected:
69 vtkScalarsToTextureFilter();
70 ~vtkScalarsToTextureFilter() override = default;
71
72 int FillOutputPortInformation(int port, vtkInformation* info) override;
73 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
74 vtkInformationVector* outputVector) override;
75 int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
76 vtkInformationVector* outputVector) override;
77
78 private:
79 void operator=(const vtkScalarsToTextureFilter&) = delete;
80 vtkScalarsToTextureFilter(const vtkScalarsToTextureFilter&) = delete;
81
82 vtkSmartPointer<vtkScalarsToColors> TransferFunction;
83 int TextureDimensions[2];
84 bool UseTransferFunction = true;
85 };
86 VTK_ABI_NAMESPACE_END
87 #endif
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:65
vtkScalarsToTextureFilter
generate texture coordinates and a texture image based on a scalar field
Definition: vtkScalarsToTextureFilter.h:32
vtkScalarsToTextureFilter::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkScalarsToTextureFilter::vtkScalarsToTextureFilter
vtkScalarsToTextureFilter()
vtkScalarsToTextureFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkScalarsToTextureFilter::SetTransferFunction
void SetTransferFunction(vtkScalarsToColors *stc)
Set/Get a color transfer function.
vtkScalarsToTextureFilter::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkScalarsToTextureFilter::~vtkScalarsToTextureFilter
~vtkScalarsToTextureFilter() override=default
vtkScalarsToTextureFilter::New
static vtkScalarsToTextureFilter * New()
vtkScalarsToTextureFilter::GetTransferFunction
vtkScalarsToColors * GetTransferFunction()
Set/Get a color transfer function.
vtkScalarsToTextureFilter::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtkSmartPointer< vtkScalarsToColors >
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkPolyDataAlgorithm.h
vtkSmartPointer.h