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=========================================================================*/
31#ifndef vtkVolumeMapper_h
32#define vtkVolumeMapper_h
33
34#include "vtkRenderingVolumeModule.h" // For export macro
36
37class vtkRenderer;
38class vtkVolume;
39class vtkImageData;
40
41#define VTK_CROP_SUBVOLUME 0x0002000
42#define VTK_CROP_FENCE 0x2ebfeba
43#define VTK_CROP_INVERTED_FENCE 0x5140145
44#define VTK_CROP_CROSS 0x0417410
45#define VTK_CROP_INVERTED_CROSS 0x7be8bef
46
47class vtkWindow;
48
49class VTKRENDERINGVOLUME_EXPORT vtkVolumeMapper : public vtkAbstractVolumeMapper
50{
51public:
53 void PrintSelf( ostream& os, vtkIndent indent );
54
56
59 virtual void SetInputData( vtkImageData * );
60 virtual void SetInputData( vtkDataSet * );
63
65
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 ); }
113 vtkGetMacro( BlendMode, int );
115
117
125 vtkSetVector2Macro(AverageIPScalarRange, double);
126 vtkGetVectorMacro(AverageIPScalarRange, double, 2);
128
130
134 vtkSetClampMacro(Cropping,int,0,1);
135 vtkGetMacro(Cropping,int);
136 vtkBooleanMacro(Cropping,int);
138
140
145 vtkSetVector6Macro( CroppingRegionPlanes, double );
146 vtkGetVectorMacro( CroppingRegionPlanes, double, 6 );
148
150
154 vtkGetVectorMacro( VoxelCroppingRegionPlanes, double, 6 );
156
158
169 vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
170 vtkGetMacro( CroppingRegionFlags, int );
172 {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
174 {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
176 {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
178 {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
180 {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
182
188 virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
189
197
232 {
237 ADDITIVE_BLEND
238 };
239
240protected:
243
249 double SpacingAdjustedSampleDistance(double inputSpacing[3],
250 int inputExtent[6]);
251
253
257 double AverageIPScalarRange[2];
258
260
265 double CroppingRegionPlanes[6];
266 double VoxelCroppingRegionPlanes[6];
270
272
273private:
274 vtkVolumeMapper(const vtkVolumeMapper&) VTK_DELETE_FUNCTION;
275 void operator=(const vtkVolumeMapper&) VTK_DELETE_FUNCTION;
276};
277
278
279#endif
280
281
Abstract class for a volume mapper.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
abstract specification for renderers
Definition: vtkRenderer.h:64
Abstract class for a volume mapper.
double SpacingAdjustedSampleDistance(double inputSpacing[3], int inputExtent[6])
Compute a sample distance from the data spacing.
void ConvertCroppingRegionPlanesToVoxels()
void SetCroppingRegionFlagsToInvertedFence()
int Cropping
Cropping variables, and a method for converting the world coordinate cropping region planes to voxel ...
virtual void SetInputData(vtkDataSet *)
virtual void SetInputData(vtkImageData *)
Set/Get the input data.
vtkImageData * GetInput()
virtual int FillInputPortInformation(int, vtkInformation *)
Fill the input port information objects for this algorithm.
void SetCroppingRegionFlagsToFence()
void SetCroppingRegionFlagsToInvertedCross()
void SetBlendModeToMinimumIntensity()
void SetBlendModeToAdditive()
void SetBlendModeToMaximumIntensity()
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...
void SetCroppingRegionFlagsToCross()
BlendModes
Blend modes.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SetBlendModeToComposite()
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
void SetCroppingRegionFlagsToSubVolume()
void SetBlendModeToAverageIntensity()
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:51
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_CROP_INVERTED_FENCE
#define VTK_CROP_FENCE
#define VTK_CROP_SUBVOLUME
#define VTK_CROP_INVERTED_CROSS
#define VTK_CROP_CROSS