VTK
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 =========================================================================*/
36 #ifndef vtkMultiBlockVolumeMapper_h
37 #define vtkMultiBlockVolumeMapper_h
38 
39 #include <vector> // For DataBlocks
40 
41 #include "vtkTimeStamp.h" // For BlockLoadingTime
42 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
43 #include "vtkVolumeMapper.h"
44 
45 
46 class vtkDataObjectTree;
47 class vtkDataSet;
48 class vtkImageData;
51 
52 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockVolumeMapper :
53  public vtkVolumeMapper
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
59 
61 
65  double* GetBounds() VTK_OVERRIDE;
66  using vtkAbstractVolumeMapper::GetBounds;
67 
68  void SelectScalarArray(int arrayNum) VTK_OVERRIDE;
69  void SelectScalarArray(char const* arrayName) VTK_OVERRIDE;
70  void SetScalarMode(int ScalarMode) VTK_OVERRIDE;
71  void SetArrayAccessMode(int accessMode) VTK_OVERRIDE;
72 
79  void Render(vtkRenderer* ren, vtkVolume* vol) VTK_OVERRIDE;
80 
85  void ReleaseGraphicsResources(vtkWindow* window) VTK_OVERRIDE;
87 
89 
92  void SetVectorMode(int mode);
93  vtkGetMacro(VectorMode, int);
94  void SetVectorComponent(int component);
95  vtkGetMacro(VectorComponent, int);
97 
105  void SetJitteringResolution(int x, int y);
106 
108 
112  void SetBlendMode(int mode) VTK_OVERRIDE;
114 
116 
120  void SetCropping(int mode) VTK_OVERRIDE;
121 
125  void SetCroppingRegionPlanes(double arg1, double arg2, double arg3,
126  double arg4, double arg5, double arg6) VTK_OVERRIDE;
127  void SetCroppingRegionPlanes(double *planes) VTK_OVERRIDE;
128 
132  void SetCroppingRegionFlags(int mode) VTK_OVERRIDE;
134 
135 protected:
138 
146  int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
147 
148 private:
154  void LoadDataSet(vtkRenderer* ren, vtkVolume* vol);
155 
164  void CreateMappers(vtkDataObjectTree* input, vtkRenderer* ren, vtkVolume* vol);
165 
166  void ApplyJitteringResolution(vtkSmartVolumeMapper* mapper);
167 
168  vtkDataObjectTree* GetDataObjectTreeInput();
169 
173  void ComputeBounds();
174 
178  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
179 
180  void ClearMappers();
181 
185  vtkSmartVolumeMapper* CreateMapper();
186 
187  vtkMultiBlockVolumeMapper(const vtkMultiBlockVolumeMapper&) VTK_DELETE_FUNCTION;
188  void operator=(const vtkMultiBlockVolumeMapper&) VTK_DELETE_FUNCTION;
189 
191 
192  typedef std::vector<vtkSmartVolumeMapper*> MapperVec;
193  MapperVec Mappers;
194  vtkSmartVolumeMapper* FallBackMapper;
195 
196  vtkTimeStamp BlockLoadingTime;
197  vtkTimeStamp BoundsComputeTime;
198 
199  int JitteringSizeX;
200  int JitteringSizeY;
201 
202  int VectorMode;
203  int VectorComponent;
204 };
205 #endif
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:44
Abstract class for a volume mapper.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
Adaptive volume mapper.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
record modification and/or execution time
Definition: vtkTimeStamp.h:32
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:57
Mapper to render volumes defined as vtkMultiBlockDataSet.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
Composite dataset that organizes datasets into blocks.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.