VTK  9.3.1
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 
37  virtual vtkDataSet* GetDataSetInput();
38  virtual vtkDataObject* GetDataObjectInput();
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:
128  ~vtkAbstractVolumeMapper() override;
129 
130  // see algorithm for more info
131  int FillInputPortInformation(int port, vtkInformation* info) override;
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
virtual float GetGradientMagnitudeBias(int)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:39
void GetBounds(T a, double bds[6])
virtual char * GetArrayName()
Get the array name or number and component to use for rendering.
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
#define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:61
void SetScalarModeToUseCellData()
Control how the mapper works with scalar point data and cell attribute data.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
#define VTK_SCALAR_MODE_USE_POINT_DATA
virtual float GetGradientMagnitudeScale()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
abstract class specifies interface to map 3D data
#define VTK_SIZEHINT(...)
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
void SetScalarModeToUsePointFieldData()
Control how the mapper works with scalar point data and cell attribute data.
void SetScalarModeToDefault()
Control how the mapper works with scalar point data and cell attribute data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetScalarModeToUsePointData()
Control how the mapper works with scalar point data and cell attribute data.
#define VTK_SCALAR_MODE_USE_CELL_DATA
void SetScalarModeToUseCellFieldData()
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.
general representation of visualization data
Definition: vtkDataObject.h:54
#define VTK_SCALAR_MODE_DEFAULT
virtual float GetGradientMagnitudeBias()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.