VTK  9.0.20200709
vtkMultiBlockVolumeMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMultiBlockVolumeMapper.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 =========================================================================*/
35 #ifndef vtkMultiBlockVolumeMapper_h
36 #define vtkMultiBlockVolumeMapper_h
37 
38 #include <vector> // For DataBlocks
39 
40 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
41 #include "vtkVolumeMapper.h"
42 
43 class vtkDataObjectTree;
44 class vtkDataSet;
45 class vtkImageData;
47 class vtkRenderWindow;
49 
50 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockVolumeMapper : public vtkVolumeMapper
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
58 
62  double* GetBounds() override;
64 
65  void SelectScalarArray(int arrayNum) override;
66  void SelectScalarArray(char const* arrayName) override;
67  void SetScalarMode(int ScalarMode) override;
68  void SetArrayAccessMode(int accessMode) override;
69 
76  void Render(vtkRenderer* ren, vtkVolume* vol) override;
77 
82  void ReleaseGraphicsResources(vtkWindow* window) override;
84 
86 
89  void SetVectorMode(int mode);
90  vtkGetMacro(VectorMode, int);
91  void SetVectorComponent(int component);
92  vtkGetMacro(VectorComponent, int);
94 
96 
100  void SetBlendMode(int mode) override;
102 
104 
108  void SetCropping(vtkTypeBool mode) override;
109 
114  double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) override;
115  void SetCroppingRegionPlanes(const double* planes) override;
116 
120  void SetCroppingRegionFlags(int mode) override;
122 
124 
128  void SetRequestedRenderMode(int);
130 
131 protected:
133  ~vtkMultiBlockVolumeMapper() override;
134 
142  int FillInputPortInformation(int port, vtkInformation* info) override;
143 
146 
147 private:
153  void LoadDataSet(vtkRenderer* ren, vtkVolume* vol);
154 
163  void CreateMappers(vtkDataObjectTree* input, vtkRenderer* ren, vtkVolume* vol);
164 
165  vtkDataObjectTree* GetDataObjectTreeInput();
166 
170  void ComputeBounds();
171 
175  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
176 
177  void ClearMappers();
178 
182  vtkSmartVolumeMapper* CreateMapper();
183 
185  void operator=(const vtkMultiBlockVolumeMapper&) = delete;
186 
188 
189  typedef std::vector<vtkSmartVolumeMapper*> MapperVec;
190  MapperVec Mappers;
191  vtkSmartVolumeMapper* FallBackMapper;
192 
193  vtkMTimeType BlockLoadingTime;
194  vtkMTimeType BoundsComputeTime;
195 
196  int VectorMode;
197  int VectorComponent;
198  int RequestedRenderMode;
199 };
200 #endif
vtkVolumeMapper::SetCropping
virtual void SetCropping(vtkTypeBool)
Turn On/Off orthogonal cropping.
vtkVolumeMapper
Abstract class for a volume mapper.
Definition: vtkVolumeMapper.h:44
vtkVolumeMapper::SetCroppingRegionFlags
virtual void SetCroppingRegionFlags(int)
Set the flags for the cropping regions.
vtkDataObjectTree
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
Definition: vtkDataObjectTree.h:46
vtkX3D::component
Definition: vtkX3D.h:181
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:44
vtkVolumeMapper::SetCroppingRegionPlanes
virtual void SetCroppingRegionPlanes(double, double, double, double, double, double)
Set/Get the Cropping Region Planes ( xmin, xmax, ymin, ymax, zmin, zmax ) These planes are defined in...
vtkAbstractVolumeMapper::SetArrayAccessMode
virtual void SetArrayAccessMode(int)
vtkMultiBlockVolumeMapper
Mapper to render volumes defined as vtkMultiBlockDataSet.
Definition: vtkMultiBlockVolumeMapper.h:50
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:45
vtkAbstractVolumeMapper::SetScalarMode
virtual void SetScalarMode(int)
Control how the mapper works with scalar point data and cell attribute data.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkVolumeMapper::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkX3D::port
Definition: vtkX3D.h:453
vtkVolumeMapper::Render
void Render(vtkRenderer *ren, vtkVolume *vol) override=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkVolumeMapper::SetBlendMode
virtual void SetBlendMode(int)
Set/Get the blend mode.
vtkVolumeMapper.h
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
vtkSmartVolumeMapper
Adaptive volume mapper.
Definition: vtkSmartVolumeMapper.h:90
vtkMultiBlockVolumeMapper::DebugWin
vtkRenderWindow * DebugWin
Definition: vtkMultiBlockVolumeMapper.h:144
vtkVolumeMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkVolumeMapper.h:205
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
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkMultiBlockVolumeMapper::DebugRen
vtkRenderer * DebugRen
Definition: vtkMultiBlockVolumeMapper.h:145
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkAbstractVolumeMapper::SelectScalarArray
virtual void SelectScalarArray(int arrayNum)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which scalar array t...
vtkAbstractVolumeMapper::GetBounds
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkVolumeMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::mode
Definition: vtkX3D.h:253
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:94
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:285