VTK  9.0.20200930
vtkAbstractVolumeMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractVolumeMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
27 #ifndef vtkAbstractVolumeMapper_h
28 #define vtkAbstractVolumeMapper_h
29 
30 #include "vtkAbstractMapper3D.h"
31 #include "vtkRenderingCoreModule.h" // For export macro
32 
33 class vtkRenderer;
34 class vtkVolume;
35 class vtkWindow;
36 class vtkDataSet;
37 
38 class VTKRENDERINGCORE_EXPORT vtkAbstractVolumeMapper : public vtkAbstractMapper3D
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  virtual vtkDataSet* GetDataSetInput();
49  virtual vtkDataObject* GetDataObjectInput();
51 
53 
57  double* GetBounds() VTK_SIZEHINT(6) override;
58  void GetBounds(double bounds[6]) override { this->vtkAbstractMapper3D::GetBounds(bounds); }
60 
62 
73  vtkSetMacro(ScalarMode, int);
74  vtkGetMacro(ScalarMode, int);
75  vtkSetMacro(ArrayAccessMode, int);
76  void SetScalarModeToDefault() { this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT); }
80  {
81  this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);
82  }
84  {
85  this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);
86  }
88 
90 
96  virtual void SelectScalarArray(int arrayNum);
97  virtual void SelectScalarArray(const char* arrayName);
99 
103  virtual char* GetArrayName() { return this->ArrayName; }
104  virtual int GetArrayId() { return this->ArrayId; }
105  virtual int GetArrayAccessMode() { return this->ArrayAccessMode; }
106 
110  const char* GetScalarModeAsString();
111 
113 
116  virtual float GetGradientMagnitudeScale() { return 1.0f; }
117  virtual float GetGradientMagnitudeBias() { return 0.0f; }
118  virtual float GetGradientMagnitudeScale(int) { return 1.0f; }
119  virtual float GetGradientMagnitudeBias(int) { return 0.0f; }
121 
127  virtual void Render(vtkRenderer* ren, vtkVolume* vol) = 0;
128 
136 
137 protected:
139  ~vtkAbstractVolumeMapper() override;
140 
141  // see algorithm for more info
142  int FillInputPortInformation(int port, vtkInformation* info) override;
143 
145  char* ArrayName;
146  int ArrayId;
148 
149 private:
151  void operator=(const vtkAbstractVolumeMapper&) = delete;
152 };
153 
154 #endif
vtkAbstractVolumeMapper::GetArrayName
virtual char * GetArrayName()
Get the array name or number and component to use for rendering.
Definition: vtkAbstractVolumeMapper.h:103
VTK_SCALAR_MODE_DEFAULT
#define VTK_SCALAR_MODE_DEFAULT
Definition: vtkAbstractMapper.h:34
VTK_SCALAR_MODE_USE_CELL_FIELD_DATA
#define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA
Definition: vtkAbstractMapper.h:38
VTK_SCALAR_MODE_USE_POINT_DATA
#define VTK_SCALAR_MODE_USE_POINT_DATA
Definition: vtkAbstractMapper.h:35
vtkAbstractVolumeMapper::ScalarMode
int ScalarMode
Definition: vtkAbstractVolumeMapper.h:144
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:44
VTK_SCALAR_MODE_USE_POINT_FIELD_DATA
#define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA
Definition: vtkAbstractMapper.h:37
vtkAbstractMapper3D::GetBounds
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkAbstractVolumeMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkAbstractVolumeMapper.h:135
vtkAbstractVolumeMapper::GetArrayId
virtual int GetArrayId()
Definition: vtkAbstractVolumeMapper.h:104
vtkAbstractVolumeMapper::GetArrayAccessMode
virtual int GetArrayAccessMode()
Definition: vtkAbstractVolumeMapper.h:105
vtkAbstractVolumeMapper::GetGradientMagnitudeScale
virtual float GetGradientMagnitudeScale()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
Definition: vtkAbstractVolumeMapper.h:116
vtkAbstractMapper3D.h
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkX3D::port
Definition: vtkX3D.h:453
vtkAbstractMapper3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractVolumeMapper::ArrayName
char * ArrayName
Definition: vtkAbstractVolumeMapper.h:145
VTK_SCALAR_MODE_USE_CELL_DATA
#define VTK_SCALAR_MODE_USE_CELL_DATA
Definition: vtkAbstractMapper.h:36
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:45
vtkAbstractVolumeMapper::ArrayAccessMode
int ArrayAccessMode
Definition: vtkAbstractVolumeMapper.h:147
vtkAbstractVolumeMapper::SetScalarModeToUseCellData
void SetScalarModeToUseCellData()
Definition: vtkAbstractVolumeMapper.h:78
vtkBlockSortHelper::GetBounds
void GetBounds(T a, double bds[6])
Definition: vtkBlockSortHelper.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkAbstractVolumeMapper::SetScalarModeToDefault
void SetScalarModeToDefault()
Definition: vtkAbstractVolumeMapper.h:76
vtkAbstractVolumeMapper::ArrayId
int ArrayId
Definition: vtkAbstractVolumeMapper.h:146
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
Definition: vtkX3D.h:382
vtkAbstractMapper3D
abstract class specifies interface to map 3D data
Definition: vtkAbstractMapper3D.h:42
vtkAbstractVolumeMapper::SetScalarModeToUseCellFieldData
void SetScalarModeToUseCellFieldData()
Definition: vtkAbstractVolumeMapper.h:83
vtkAbstractVolumeMapper
Abstract class for a volume mapper.
Definition: vtkAbstractVolumeMapper.h:38
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkAbstractVolumeMapper::SetScalarModeToUsePointData
void SetScalarModeToUsePointData()
Definition: vtkAbstractVolumeMapper.h:77
vtkAbstractVolumeMapper::GetGradientMagnitudeScale
virtual float GetGradientMagnitudeScale(int)
Definition: vtkAbstractVolumeMapper.h:118
vtkAbstractVolumeMapper::SetScalarModeToUsePointFieldData
void SetScalarModeToUsePointFieldData()
Definition: vtkAbstractVolumeMapper.h:79
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkAbstractVolumeMapper::GetGradientMagnitudeBias
virtual float GetGradientMagnitudeBias()
Definition: vtkAbstractVolumeMapper.h:117
vtkAbstractVolumeMapper::GetGradientMagnitudeBias
virtual float GetGradientMagnitudeBias(int)
Definition: vtkAbstractVolumeMapper.h:119