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 =========================================================================*/
28 #ifndef vtkVolumeMapper_h
29 #define vtkVolumeMapper_h
30 
31 #include "vtkRenderingVolumeModule.h" // For export macro
33 
34 class vtkRenderer;
35 class vtkVolume;
36 class vtkImageData;
37 
38 #define VTK_CROP_SUBVOLUME 0x0002000
39 #define VTK_CROP_FENCE 0x2ebfeba
40 #define VTK_CROP_INVERTED_FENCE 0x5140145
41 #define VTK_CROP_CROSS 0x0417410
42 #define VTK_CROP_INVERTED_CROSS 0x7be8bef
43 
44 class vtkWindow;
45 
46 class VTKRENDERINGVOLUME_EXPORT vtkVolumeMapper : public vtkAbstractVolumeMapper
47 {
48 public:
50  void PrintSelf( ostream& os, vtkIndent indent ) override;
51 
53 
56  virtual void SetInputData( vtkImageData * );
57  virtual void SetInputData( vtkDataSet * );
58  vtkImageData *GetInput();
60 
62 
99  vtkSetMacro( BlendMode, int );
101  { this->SetBlendMode( vtkVolumeMapper::COMPOSITE_BLEND ); }
103  { this->SetBlendMode( vtkVolumeMapper::MAXIMUM_INTENSITY_BLEND ); }
105  { this->SetBlendMode( vtkVolumeMapper::MINIMUM_INTENSITY_BLEND ); }
107  { this->SetBlendMode( vtkVolumeMapper::AVERAGE_INTENSITY_BLEND ); }
109  { this->SetBlendMode( vtkVolumeMapper::ADDITIVE_BLEND ); }
110  vtkGetMacro( BlendMode, int );
112 
114 
122  vtkSetVector2Macro(AverageIPScalarRange, double);
123  vtkGetVectorMacro(AverageIPScalarRange, double, 2);
125 
127 
131  vtkSetClampMacro(Cropping,int,0,1);
132  vtkGetMacro(Cropping,int);
133  vtkBooleanMacro(Cropping,int);
135 
137 
142  vtkSetVector6Macro( CroppingRegionPlanes, double );
143  vtkGetVectorMacro( CroppingRegionPlanes, double, 6 );
145 
147 
151  vtkGetVectorMacro( VoxelCroppingRegionPlanes, double, 6 );
153 
155 
166  vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
167  vtkGetMacro( CroppingRegionFlags, int );
169  {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
171  {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
173  {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
175  {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
177  {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
179 
185  void Render(vtkRenderer *ren, vtkVolume *vol) override =0;
186 
194 
229  {
234  ADDITIVE_BLEND
235  };
236 
237 protected:
238  vtkVolumeMapper();
239  ~vtkVolumeMapper() override;
240 
246  double SpacingAdjustedSampleDistance(double inputSpacing[3],
247  int inputExtent[6]);
248 
250 
254  double AverageIPScalarRange[2];
255 
257 
261  int Cropping;
262  double CroppingRegionPlanes[6];
263  double VoxelCroppingRegionPlanes[6];
265  void ConvertCroppingRegionPlanesToVoxels();
267 
268  int FillInputPortInformation(int, vtkInformation*) override;
269 
270 private:
271  vtkVolumeMapper(const vtkVolumeMapper&) = delete;
272  void operator=(const vtkVolumeMapper&) = delete;
273 };
274 
275 
276 #endif
277 
278 
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:50
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:62
void SetCroppingRegionFlagsToCross()
Set the flags for the cropping regions.
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:63
int Cropping
Cropping variables, and a method for converting the world coordinate cropping region planes to voxel ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCroppingRegionFlagsToSubVolume()
Set the flags for the cropping regions.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
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:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
void SetCroppingRegionFlagsToFence()
Set the flags for the cropping regions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
#define VTK_CROP_FENCE
void SetBlendModeToMaximumIntensity()
Set/Get the blend mode.
#define VTK_CROP_INVERTED_FENCE