VTK  9.3.20240419
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 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkRenderer;
24 class vtkVolume;
25 class vtkWindow;
26 class vtkDataSet;
27 
28 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkAbstractVolumeMapper : public vtkAbstractMapper3D
29 {
30 public:
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 
100  const char* GetScalarModeAsString();
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 
127 protected:
130 
131  // see algorithm for more info
133 
135  char* ArrayName;
136  int ArrayId;
138 
139 private:
141  void operator=(const vtkAbstractVolumeMapper&) = delete;
142 };
143 
144 VTK_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.
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.
~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.
const char * GetScalarModeAsString()
Return the method for obtaining scalar data.
virtual vtkDataObject * GetDataObjectInput()
Set/Get the input data.
virtual vtkDataSet * GetDataSetInput()
Set/Get the input 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.
virtual char * GetArrayName()
Get the array name or number and component to use for rendering.
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...
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
Definition: vtkRenderer.h:172
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:120
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
void GetBounds(T a, double bds[6])
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
#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