VTK  9.0.1
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;
48 
49 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockVolumeMapper : public vtkVolumeMapper
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
61  double* GetBounds() override;
63 
64  void SelectScalarArray(int arrayNum) override;
65  void SelectScalarArray(char const* arrayName) override;
66  void SetScalarMode(int ScalarMode) override;
67  void SetArrayAccessMode(int accessMode) override;
68 
75  void Render(vtkRenderer* ren, vtkVolume* vol) override;
76 
81  void ReleaseGraphicsResources(vtkWindow* window) override;
83 
85 
88  void SetVectorMode(int mode);
89  vtkGetMacro(VectorMode, int);
90  void SetVectorComponent(int component);
91  vtkGetMacro(VectorComponent, int);
93 
95 
99  void SetBlendMode(int mode) override;
101 
103 
107  void SetCropping(vtkTypeBool mode) override;
108 
113  double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) override;
114  void SetCroppingRegionPlanes(const double* planes) override;
115 
119  void SetCroppingRegionFlags(int mode) override;
121 
123 
127  void SetRequestedRenderMode(int);
129 
130 protected:
132  ~vtkMultiBlockVolumeMapper() override;
133 
141  int FillInputPortInformation(int port, vtkInformation* info) override;
142 
143 private:
149  void LoadDataSet(vtkRenderer* ren, vtkVolume* vol);
150 
159  void CreateMappers(vtkDataObjectTree* input, vtkRenderer* ren, vtkVolume* vol);
160 
161  vtkDataObjectTree* GetDataObjectTreeInput();
162 
166  void ComputeBounds();
167 
171  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
172 
173  void ClearMappers();
174 
178  vtkSmartVolumeMapper* CreateMapper();
179 
181  void operator=(const vtkMultiBlockVolumeMapper&) = delete;
182 
184 
185  typedef std::vector<vtkSmartVolumeMapper*> MapperVec;
186  MapperVec Mappers;
187  vtkSmartVolumeMapper* FallBackMapper;
188 
189  vtkMTimeType BlockLoadingTime;
190  vtkMTimeType BoundsComputeTime;
191 
192  int VectorMode;
193  int VectorComponent;
194  int RequestedRenderMode;
195 };
196 #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.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
virtual void SetCroppingRegionFlags(int)
Set the flags for the cropping regions.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
virtual void SetBlendMode(int)
Set/Get the blend mode.
abstract specification for renderers
Definition: vtkRenderer.h:67
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: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:41
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.