VTK  9.3.20240327
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 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkRenderer;
23 class vtkVolume;
24 class vtkWindow;
25 class vtkDataSet;
26 
27 class VTKRENDERINGCORE_EXPORT vtkAbstractVolumeMapper : public vtkAbstractMapper3D
28 {
29 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
40 
42 
46  double* GetBounds() VTK_SIZEHINT(6) override;
47  void GetBounds(double bounds[6]) override { this->vtkAbstractMapper3D::GetBounds(bounds); }
49 
51 
62  vtkSetMacro(ScalarMode, int);
63  vtkGetMacro(ScalarMode, int);
64  vtkSetMacro(ArrayAccessMode, int);
65  void SetScalarModeToDefault() { this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT); }
69  {
70  this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);
71  }
73  {
74  this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);
75  }
77 
79 
85  virtual void SelectScalarArray(int arrayNum);
86  virtual void SelectScalarArray(const char* arrayName);
88 
92  virtual char* GetArrayName() { return this->ArrayName; }
93  virtual int GetArrayId() { return this->ArrayId; }
94  virtual int GetArrayAccessMode() { return this->ArrayAccessMode; }
95 
99  const char* GetScalarModeAsString();
100 
102 
105  virtual float GetGradientMagnitudeScale() { return 1.0f; }
106  virtual float GetGradientMagnitudeBias() { return 0.0f; }
107  virtual float GetGradientMagnitudeScale(int) { return 1.0f; }
108  virtual float GetGradientMagnitudeBias(int) { return 0.0f; }
110 
116  virtual void Render(vtkRenderer* ren, vtkVolume* vol) = 0;
117 
125 
126 protected:
129 
130  // see algorithm for more info
132 
134  char* ArrayName;
135  int ArrayId;
137 
138 private:
140  void operator=(const vtkAbstractVolumeMapper&) = delete;
141 };
142 
143 VTK_ABI_NAMESPACE_END
144 #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:165
a simple class to control print indentation
Definition: vtkIndent.h:108
Store vtkAlgorithm input/output information.
abstract specification for renderers
Definition: vtkRenderer.h:171
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:119
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
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(...)