VTK  9.4.20241118
vtkAbstractVolumeMapper.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
15#ifndef vtkAbstractVolumeMapper_h
16#define vtkAbstractVolumeMapper_h
17
18#include "vtkAbstractMapper3D.h"
19#include "vtkRenderingCoreModule.h" // For export macro
20#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21
22VTK_ABI_NAMESPACE_BEGIN
23class vtkRenderer;
24class vtkVolume;
25class vtkWindow;
26class vtkDataSet;
27
28class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkAbstractVolumeMapper : public vtkAbstractMapper3D
29{
30public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
35
41
43
47 double* GetBounds() VTK_SIZEHINT(6) override;
48 void GetBounds(double bounds[6]) override { this->vtkAbstractMapper3D::GetBounds(bounds); }
50
52
63 vtkSetMacro(ScalarMode, int);
64 vtkGetMacro(ScalarMode, int);
65 vtkSetMacro(ArrayAccessMode, int);
66 void SetScalarModeToDefault() { this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT); }
70 {
71 this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);
72 }
74 {
75 this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);
76 }
78
80
86 virtual void SelectScalarArray(int arrayNum);
87 virtual void SelectScalarArray(const char* arrayName);
89
93 virtual char* GetArrayName() { return this->ArrayName; }
94 virtual int GetArrayId() { return this->ArrayId; }
95 virtual int GetArrayAccessMode() { return this->ArrayAccessMode; }
96
101
103
106 virtual float GetGradientMagnitudeScale() { return 1.0f; }
107 virtual float GetGradientMagnitudeBias() { return 0.0f; }
108 virtual float GetGradientMagnitudeScale(int) { return 1.0f; }
109 virtual float GetGradientMagnitudeBias(int) { return 0.0f; }
111
117 virtual void Render(vtkRenderer* ren, vtkVolume* vol) = 0;
118
126
127protected:
130
131 // see algorithm for more info
132 int FillInputPortInformation(int port, vtkInformation* info) override;
133
138
139private:
141 void operator=(const vtkAbstractVolumeMapper&) = delete;
142};
143
144VTK_ABI_NAMESPACE_END
145#endif
abstract class specifies interface to map 3D data
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
Abstract class for a volume mapper.
virtual vtkDataObject * GetDataObjectInput()
Set/Get the input data.
virtual vtkDataSet * GetDataSetInput()
Set/Get the input data.
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual float GetGradientMagnitudeScale()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
const char * GetScalarModeAsString()
Return the method for obtaining scalar data.
~vtkAbstractVolumeMapper() override
virtual float GetGradientMagnitudeBias(int)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetScalarModeToUseCellFieldData()
Control how the mapper works with scalar point data and cell attribute data.
void SetScalarModeToUseCellData()
Control how the mapper works with scalar point data and cell attribute data.
virtual float GetGradientMagnitudeScale(int)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
virtual void SelectScalarArray(const char *arrayName)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which scalar array t...
void SetScalarModeToUsePointData()
Control how the mapper works with scalar point data and cell attribute data.
virtual void SelectScalarArray(int arrayNum)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which scalar array t...
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetScalarModeToDefault()
Control how the mapper works with scalar point data and cell attribute data.
void SetScalarModeToUsePointFieldData()
Control how the mapper works with scalar point data and cell attribute data.
virtual float GetGradientMagnitudeBias()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual char * GetArrayName()
Get the array name or number and component to use for rendering.
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
abstract specification for renderers
represents a volume (data & properties) in a rendered scene
Definition vtkVolume.h:130
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
#define VTK_SCALAR_MODE_DEFAULT
#define VTK_SCALAR_MODE_USE_POINT_DATA
#define VTK_SCALAR_MODE_USE_CELL_DATA
#define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA
#define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO