VTK  9.7.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 #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 
38  virtual vtkDataSet* GetDataSetInput();
39  virtual vtkDataObject* GetDataObjectInput();
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 
91 
94  virtual char* GetArrayName() { return this->ArrayName; }
95  vtkSetStringMacro(ArrayName);
96  virtual int GetArrayId() { return this->ArrayId; }
97  vtkSetMacro(ArrayId, int);
98  virtual int GetArrayAccessMode() { return this->ArrayAccessMode; }
100 
104  const char* GetScalarModeAsString();
105 
107 
110  virtual float GetGradientMagnitudeScale() { return 1.0f; }
111  virtual float GetGradientMagnitudeBias() { return 0.0f; }
112  virtual float GetGradientMagnitudeScale(int) { return 1.0f; }
113  virtual float GetGradientMagnitudeBias(int) { return 0.0f; }
115 
121  virtual void Render(vtkRenderer* ren, vtkVolume* vol) = 0;
122 
130 
131 protected:
133  ~vtkAbstractVolumeMapper() override;
134 
135  // see algorithm for more info
136  int FillInputPortInformation(int port, vtkInformation* info) override;
137 
139  char* ArrayName;
140  int ArrayId;
142 
143 private:
145  void operator=(const vtkAbstractVolumeMapper&) = delete;
146 };
147 
148 VTK_ABI_NAMESPACE_END
149 #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:40
void GetBounds(T a, double bds[6])
virtual char * GetArrayName()
Get/Set 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:56
virtual int GetArrayId()
Get/Set the array name or number and component to use for rendering.
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:63
void SetScalarModeToUseCellData()
Control how the mapper works with scalar point data and cell attribute data.
virtual int GetArrayAccessMode()
Get/Set the array name or number and component to use for rendering.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
#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_MARSHALAUTO
#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:55
#define VTK_SCALAR_MODE_DEFAULT
virtual float GetGradientMagnitudeBias()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.