VTK
vtkVolumeMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVolumeMapper.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 =========================================================================*/
25 #ifndef vtkVolumeMapper_h
26 #define vtkVolumeMapper_h
27 
28 #include "vtkRenderingVolumeModule.h" // For export macro
30 
31 class vtkRenderer;
32 class vtkVolume;
33 class vtkImageData;
34 
35 #define VTK_CROP_SUBVOLUME 0x0002000
36 #define VTK_CROP_FENCE 0x2ebfeba
37 #define VTK_CROP_INVERTED_FENCE 0x5140145
38 #define VTK_CROP_CROSS 0x0417410
39 #define VTK_CROP_INVERTED_CROSS 0x7be8bef
40 
41 class vtkWindow;
42 
43 class VTKRENDERINGVOLUME_EXPORT vtkVolumeMapper : public vtkAbstractVolumeMapper
44 {
45 public:
47  void PrintSelf( ostream& os, vtkIndent indent ) override;
48 
50 
53  virtual void SetInputData( vtkImageData * );
54  virtual void SetInputData( vtkDataSet * );
55  virtual vtkImageData* GetInput();
56  virtual vtkImageData* GetInput(const int port);
58 
60 
102  vtkSetMacro( BlendMode, int );
104  { this->SetBlendMode( vtkVolumeMapper::COMPOSITE_BLEND ); }
106  { this->SetBlendMode( vtkVolumeMapper::MAXIMUM_INTENSITY_BLEND ); }
108  { this->SetBlendMode( vtkVolumeMapper::MINIMUM_INTENSITY_BLEND ); }
110  { this->SetBlendMode( vtkVolumeMapper::AVERAGE_INTENSITY_BLEND ); }
112  { this->SetBlendMode( vtkVolumeMapper::ADDITIVE_BLEND ); }
114  { this->SetBlendMode( vtkVolumeMapper::ISOSURFACE_BLEND ); }
115  vtkGetMacro( BlendMode, int );
117 
119 
127  vtkSetVector2Macro(AverageIPScalarRange, double);
128  vtkGetVectorMacro(AverageIPScalarRange, double, 2);
130 
132 
136  vtkSetClampMacro(Cropping,vtkTypeBool,0,1);
137  vtkGetMacro(Cropping,vtkTypeBool);
138  vtkBooleanMacro(Cropping,vtkTypeBool);
140 
142 
147  vtkSetVector6Macro( CroppingRegionPlanes, double );
148  vtkGetVectorMacro( CroppingRegionPlanes, double, 6 );
150 
152 
156  vtkGetVectorMacro( VoxelCroppingRegionPlanes, double, 6 );
158 
160 
171  vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
172  vtkGetMacro( CroppingRegionFlags, int );
174  {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
176  {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
178  {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
180  {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
182  {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
184 
190  void Render(vtkRenderer *ren, vtkVolume *vol) override =0;
191 
199 
243  {
249  ISOSURFACE_BLEND
250  };
251 
252 protected:
253  vtkVolumeMapper();
254  ~vtkVolumeMapper() override;
255 
261  double SpacingAdjustedSampleDistance(double inputSpacing[3],
262  int inputExtent[6]);
263 
265 
269  double AverageIPScalarRange[2];
270 
272 
277  double CroppingRegionPlanes[6];
278  double VoxelCroppingRegionPlanes[6];
280  void ConvertCroppingRegionPlanesToVoxels();
282 
283  int FillInputPortInformation(int, vtkInformation*) override;
284 
285 private:
286  vtkVolumeMapper(const vtkVolumeMapper&) = delete;
287  void operator=(const vtkVolumeMapper&) = delete;
288 };
289 
290 
291 #endif
292 
293 
void SetBlendModeToAdditive()
Set/Get the blend mode.
int CroppingRegionFlags
Cropping variables, and a method for converting the world coordinate cropping region planes to voxel ...
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:44
Abstract class for a volume mapper.
#define VTK_CROP_CROSS
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
void SetBlendModeToIsoSurface()
Set/Get the blend mode.
void SetCroppingRegionFlagsToCross()
Set the flags for the cropping regions.
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:57
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:69
void SetCroppingRegionFlagsToSubVolume()
Set the flags for the cropping regions.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
void SetCroppingRegionFlagsToInvertedFence()
Set the flags for the cropping regions.
#define VTK_CROP_INVERTED_CROSS
void SetBlendModeToComposite()
Set/Get the blend mode.
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
void SetCroppingRegionFlagsToFence()
Set the flags for the cropping regions.
BlendModes
Blend modes.
#define VTK_CROP_SUBVOLUME
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
void SetCroppingRegionFlagsToInvertedCross()
Set the flags for the cropping regions.
void SetBlendModeToMinimumIntensity()
Set/Get the blend mode.
void SetBlendModeToAverageIntensity()
Set/Get the blend mode.
vtkTypeBool Cropping
Cropping variables, and a method for converting the world coordinate cropping region planes to voxel ...
#define VTK_CROP_FENCE
void SetBlendModeToMaximumIntensity()
Set/Get the blend mode.
#define VTK_CROP_INVERTED_FENCE