VTK  9.2.6
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 "vtkNew.h" // for ivar
41 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
42 #include "vtkVolumeMapper.h"
43 
44 class vtkDataObjectTree;
45 class vtkDataSet;
46 class vtkImageData;
47 class vtkMatrix4x4;
49 class vtkRenderWindow;
51 
52 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockVolumeMapper : 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 SetComputeNormalFromOpacity(bool val) override;
112 
114 
117  void SetGlobalIlluminationReach(float val);
118  vtkGetMacro(GlobalIlluminationReach, float);
120 
122 
125  void SetVolumetricScatteringBlending(float val);
126  vtkGetMacro(VolumetricScatteringBlending, float);
128 
130 
134  void SetCropping(vtkTypeBool mode) override;
135 
140  double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) override;
141  void SetCroppingRegionPlanes(const double* planes) override;
142 
146  void SetCroppingRegionFlags(int mode) override;
148 
150 
154  void SetRequestedRenderMode(int);
156 
158 
161  void SetTransfer2DYAxisArray(const char* a);
163 
164 protected:
166  ~vtkMultiBlockVolumeMapper() override;
167 
175  int FillInputPortInformation(int port, vtkInformation* info) override;
176 
179 
181 
182 private:
188  void LoadDataSet(vtkRenderer* ren, vtkVolume* vol);
189 
198  void CreateMappers(vtkDataObjectTree* input, vtkRenderer* ren, vtkVolume* vol);
199 
200  vtkDataObjectTree* GetDataObjectTreeInput();
201 
205  void ComputeBounds();
206 
210  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
211 
212  void ClearMappers();
213 
217  vtkSmartVolumeMapper* CreateMapper();
218 
220  void operator=(const vtkMultiBlockVolumeMapper&) = delete;
221 
223 
224  typedef std::vector<vtkSmartVolumeMapper*> MapperVec;
225  MapperVec Mappers;
226  vtkSmartVolumeMapper* FallBackMapper;
227 
228  vtkMTimeType BlockLoadingTime;
229  vtkMTimeType BoundsComputeTime;
230 
231  int VectorMode;
232  int VectorComponent;
233  int RequestedRenderMode;
234 
238  float GlobalIlluminationReach = 0.0;
239 
243  float VolumetricScatteringBlending = 0.0;
244 
245  char* Transfer2DYAxisArray;
246 };
247 #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.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
virtual void SetCroppingRegionFlags(int)
Set the flags for the cropping regions.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
virtual void SetBlendMode(int)
Set/Get the blend mode.
abstract specification for renderers
Definition: vtkRenderer.h:72
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:38
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:53
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...
create a window for renderers to draw into
Composite dataset that organizes datasets into blocks.
vtkNew< vtkMatrix4x4 > TempMatrix4x4
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.
virtual void SetComputeNormalFromOpacity(bool)
If enabled, the volume(s) whose shading is enabled will use the gradient of opacity instead of the sc...