VTK
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 "vtkRenderingCoreModule.h" // For export macro
31 #include "vtkAbstractMapper3D.h"
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 );
43 
45 
51 
53 
57  virtual double *GetBounds();
58  virtual void GetBounds(double bounds[6])
59  { this->vtkAbstractMapper3D::GetBounds(bounds); };
61 
63 
74  vtkSetMacro(ScalarMode,int);
75  vtkGetMacro(ScalarMode,int);
77  this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT);};
79  this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA);};
81  this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA);};
83  this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);};
85  this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);};
87 
89 
95  virtual void SelectScalarArray(int arrayNum);
96  virtual void SelectScalarArray(const char* arrayName);
98 
102  virtual char* GetArrayName() { return this->ArrayName; }
103  virtual int GetArrayId() { return this->ArrayId; }
104  virtual int GetArrayAccessMode() { return this->ArrayAccessMode; }
105 
109  const char *GetScalarModeAsString();
110 
112 
115  virtual float GetGradientMagnitudeScale() {return 1.0f;};
116  virtual float GetGradientMagnitudeBias() {return 0.0f;};
117  virtual float GetGradientMagnitudeScale(int) {return 1.0f;};
118  virtual float GetGradientMagnitudeBias(int) {return 0.0f;};
120 
121 
127  virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
128 
136 
137 protected:
140 
141  // see algorithm for more info
143 
145  char *ArrayName;
146  int ArrayId;
148 
149 private:
150  vtkAbstractVolumeMapper(const vtkAbstractVolumeMapper&) VTK_DELETE_FUNCTION;
151  void operator=(const vtkAbstractVolumeMapper&) VTK_DELETE_FUNCTION;
152 };
153 
154 
155 #endif
156 
157 
vtkAbstractVolumeMapper::GetArrayName
virtual char * GetArrayName()
Get the array name or number and component to use for rendering.
Definition: vtkAbstractVolumeMapper.h:102
VTK_SCALAR_MODE_DEFAULT
#define VTK_SCALAR_MODE_DEFAULT
Definition: vtkAbstractMapper.h:37
VTK_SCALAR_MODE_USE_CELL_FIELD_DATA
#define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA
Definition: vtkAbstractMapper.h:41
VTK_SCALAR_MODE_USE_POINT_DATA
#define VTK_SCALAR_MODE_USE_POINT_DATA
Definition: vtkAbstractMapper.h:38
vtkAbstractVolumeMapper::ScalarMode
int ScalarMode
Definition: vtkAbstractVolumeMapper.h:144
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:51
VTK_SCALAR_MODE_USE_POINT_FIELD_DATA
#define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA
Definition: vtkAbstractMapper.h:40
vtkAbstractMapper3D::GetBounds
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkAbstractVolumeMapper::GetScalarModeAsString
const char * GetScalarModeAsString()
Return the method for obtaining scalar data.
vtkAbstractVolumeMapper::vtkAbstractVolumeMapper
vtkAbstractVolumeMapper()
vtkAbstractVolumeMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkAbstractVolumeMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkAbstractVolumeMapper.h:135
vtkAbstractVolumeMapper::GetBounds
virtual void GetBounds(double bounds[6])
Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkAbstractVolumeMapper.h:58
vtkAbstractVolumeMapper::GetArrayId
virtual int GetArrayId()
Definition: vtkAbstractVolumeMapper.h:103
vtkAbstractVolumeMapper::GetArrayAccessMode
virtual int GetArrayAccessMode()
Definition: vtkAbstractVolumeMapper.h:104
vtkAbstractVolumeMapper::GetGradientMagnitudeScale
virtual float GetGradientMagnitudeScale()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
Definition: vtkAbstractVolumeMapper.h:115
vtkAbstractMapper3D.h
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkAbstractVolumeMapper::ArrayName
char * ArrayName
Definition: vtkAbstractVolumeMapper.h:145
VTK_SCALAR_MODE_USE_CELL_DATA
#define VTK_SCALAR_MODE_USE_CELL_DATA
Definition: vtkAbstractMapper.h:39
vtkAbstractVolumeMapper::ArrayAccessMode
int ArrayAccessMode
Definition: vtkAbstractVolumeMapper.h:147
vtkAbstractVolumeMapper::SelectScalarArray
virtual void SelectScalarArray(const char *arrayName)
vtkAbstractVolumeMapper::SetScalarModeToUseCellData
void SetScalarModeToUseCellData()
Definition: vtkAbstractVolumeMapper.h:80
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkAbstractVolumeMapper::SetScalarModeToDefault
void SetScalarModeToDefault()
Definition: vtkAbstractVolumeMapper.h:76
vtkAbstractVolumeMapper::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkAbstractVolumeMapper::ArrayId
int ArrayId
Definition: vtkAbstractVolumeMapper.h:146
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkAbstractVolumeMapper::GetBounds
virtual double * GetBounds()
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkAbstractMapper3D
abstract class specifies interface to map 3D data
Definition: vtkAbstractMapper3D.h:46
vtkAbstractVolumeMapper::SetScalarModeToUseCellFieldData
void SetScalarModeToUseCellFieldData()
Definition: vtkAbstractVolumeMapper.h:84
vtkAbstractVolumeMapper
Abstract class for a volume mapper.
Definition: vtkAbstractVolumeMapper.h:39
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkAbstractVolumeMapper::SelectScalarArray
virtual void SelectScalarArray(int arrayNum)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which scalar array t...
vtkAbstractVolumeMapper::SetScalarModeToUsePointData
void SetScalarModeToUsePointData()
Definition: vtkAbstractVolumeMapper.h:78
vtkAbstractVolumeMapper::GetDataSetInput
vtkDataSet * GetDataSetInput()
Set/Get the input data.
vtkAbstractVolumeMapper::GetGradientMagnitudeScale
virtual float GetGradientMagnitudeScale(int)
Definition: vtkAbstractVolumeMapper.h:117
vtkAbstractVolumeMapper::SetScalarModeToUsePointFieldData
void SetScalarModeToUsePointFieldData()
Definition: vtkAbstractVolumeMapper.h:82
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkAbstractVolumeMapper::~vtkAbstractVolumeMapper
~vtkAbstractVolumeMapper()
vtkAbstractVolumeMapper::GetGradientMagnitudeBias
virtual float GetGradientMagnitudeBias()
Definition: vtkAbstractVolumeMapper.h:116
vtkAbstractVolumeMapper::GetDataObjectInput
vtkDataObject * GetDataObjectInput()
vtkAbstractVolumeMapper::GetGradientMagnitudeBias
virtual float GetGradientMagnitudeBias(int)
Definition: vtkAbstractVolumeMapper.h:118
vtkAbstractVolumeMapper::Render
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...