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 =========================================================================*/
35 #ifndef vtkMultiBlockVolumeMapper_h
36 #define vtkMultiBlockVolumeMapper_h
37 
38 #include <vector> // For DataBlocks
39 
40 #include "vtkTimeStamp.h" // For BlockLoadingTime
41 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
42 #include "vtkVolumeMapper.h"
43 
44 
45 class vtkDataObjectTree;
46 class vtkDataSet;
47 class vtkImageData;
50 
51 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockVolumeMapper :
52  public vtkVolumeMapper
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
64  double* GetBounds() override;
66 
67  void SelectScalarArray(int arrayNum) override;
68  void SelectScalarArray(char const* arrayName) override;
69  void SetScalarMode(int ScalarMode) override;
70  void SetArrayAccessMode(int accessMode) override;
71 
78  void Render(vtkRenderer* ren, vtkVolume* vol) override;
79 
84  void ReleaseGraphicsResources(vtkWindow* window) override;
86 
88 
91  void SetVectorMode(int mode);
92  vtkGetMacro(VectorMode, int);
93  void SetVectorComponent(int component);
94  vtkGetMacro(VectorComponent, int);
96 
98 
102  void SetBlendMode(int mode) override;
104 
106 
110  void SetCropping(vtkTypeBool mode) override;
111 
115  void SetCroppingRegionPlanes(double arg1, double arg2, double arg3,
116  double arg4, double arg5, double arg6) override;
117  void SetCroppingRegionPlanes(double *planes) override;
118 
122  void SetCroppingRegionFlags(int mode) override;
124 
125 protected:
127  ~vtkMultiBlockVolumeMapper() override;
128 
136  int FillInputPortInformation(int port, vtkInformation* info) override;
137 
138 private:
144  void LoadDataSet(vtkRenderer* ren, vtkVolume* vol);
145 
154  void CreateMappers(vtkDataObjectTree* input, vtkRenderer* ren, vtkVolume* vol);
155 
156  vtkDataObjectTree* GetDataObjectTreeInput();
157 
161  void ComputeBounds();
162 
166  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
167 
168  void ClearMappers();
169 
173  vtkSmartVolumeMapper* CreateMapper();
174 
176  void operator=(const vtkMultiBlockVolumeMapper&) = delete;
177 
179 
180  typedef std::vector<vtkSmartVolumeMapper*> MapperVec;
181  MapperVec Mappers;
182  vtkSmartVolumeMapper* FallBackMapper;
183 
184  vtkTimeStamp BlockLoadingTime;
185  vtkTimeStamp BoundsComputeTime;
186 
187  int VectorMode;
188  int VectorComponent;
189 };
190 #endif
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:50
Abstract class for a volume mapper.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
Adaptive volume mapper.
virtual void SetCroppingRegionFlags(int)
Set the flags for the cropping regions.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
record modification and/or execution time
Definition: vtkTimeStamp.h:35
virtual void SetBlendMode(int)
Set/Get the blend mode.
abstract specification for renderers
Definition: vtkRenderer.h:63
virtual void SetScalarMode(int)
Control how the mapper works with scalar point data and cell attribute data.
Mapper to render volumes defined as vtkMultiBlockDataSet.
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...
virtual void SetArrayAccessMode(int)
Control how the mapper works with scalar point data and cell attribute data.
int vtkTypeBool
Definition: vtkABI.h:69
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
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...
virtual void SetCropping(vtkTypeBool)
Turn On/Off orthogonal cropping.
a simple class to control print indentation
Definition: vtkIndent.h:39
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Composite dataset that organizes datasets into blocks.
static vtkAlgorithm * New()
virtual void SelectScalarArray(int arrayNum)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which scalar array t...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.