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) override;
59 
61 
65  double* GetBounds() override;
67 
68  void SelectScalarArray(int arrayNum) override;
69  void SelectScalarArray(char const* arrayName) override;
70  void SetScalarMode(int ScalarMode) override;
71  void SetArrayAccessMode(int accessMode) override;
72 
79  void Render(vtkRenderer* ren, vtkVolume* vol) override;
80 
85  void ReleaseGraphicsResources(vtkWindow* window) 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) override;
114 
116 
120  void SetCropping(vtkTypeBool mode) override;
121 
125  void SetCroppingRegionPlanes(double arg1, double arg2, double arg3,
126  double arg4, double arg5, double arg6) override;
127  void SetCroppingRegionPlanes(double *planes) override;
128 
132  void SetCroppingRegionFlags(int mode) override;
134 
135 protected:
137  ~vtkMultiBlockVolumeMapper() override;
138 
146  int FillInputPortInformation(int port, vtkInformation* info) 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 
188  void operator=(const vtkMultiBlockVolumeMapper&) = delete;
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.
virtual void SetCroppingRegionFlags(int)
Set the flags for the cropping regions.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
record modification and/or execution time
Definition: vtkTimeStamp.h:32
virtual void SetBlendMode(int)
Set/Get the blend mode.
abstract specification for renderers
Definition: vtkRenderer.h:57
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:34
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:33
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
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,...
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.