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 =========================================================================*/
27 #ifndef vtkVolumeMapper_h
28 #define vtkVolumeMapper_h
29 
30 #include "vtkRenderingVolumeModule.h" // For export macro
32 
33 class vtkRenderer;
34 class vtkVolume;
35 class vtkImageData;
36 
37 #define VTK_CROP_SUBVOLUME 0x0002000
38 #define VTK_CROP_FENCE 0x2ebfeba
39 #define VTK_CROP_INVERTED_FENCE 0x5140145
40 #define VTK_CROP_CROSS 0x0417410
41 #define VTK_CROP_INVERTED_CROSS 0x7be8bef
42 
43 class vtkWindow;
44 
46 {
47 public:
49  void PrintSelf( ostream& os, vtkIndent indent );
50 
52 
53  virtual void SetInputData( vtkImageData * );
54  virtual void SetInputData( vtkDataSet * );
55  vtkImageData *GetInput();
57 
59 
65  vtkSetMacro( BlendMode, int );
67  { this->SetBlendMode( vtkVolumeMapper::COMPOSITE_BLEND ); }
69  { this->SetBlendMode( vtkVolumeMapper::MAXIMUM_INTENSITY_BLEND ); }
71  { this->SetBlendMode( vtkVolumeMapper::MINIMUM_INTENSITY_BLEND ); }
73  { this->SetBlendMode( vtkVolumeMapper::ADDITIVE_BLEND ); }
74  vtkGetMacro( BlendMode, int );
76 
78 
80  vtkSetClampMacro(Cropping,int,0,1);
81  vtkGetMacro(Cropping,int);
82  vtkBooleanMacro(Cropping,int);
84 
86 
89  vtkSetVector6Macro( CroppingRegionPlanes, double );
90  vtkGetVectorMacro( CroppingRegionPlanes, double, 6 );
92 
94 
96  vtkGetVectorMacro( VoxelCroppingRegionPlanes, double, 6 );
98 
100 
109  vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
110  vtkGetMacro( CroppingRegionFlags, int );
112  {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
114  {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
116  {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
118  {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
120  {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
122 
123 //BTX
124 
127  virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
128 
134 
135  enum
136  {
140  ADDITIVE_BLEND
141  };
142 //ETX
143 
144 protected:
145  vtkVolumeMapper();
146  ~vtkVolumeMapper();
147 
149 
150  // Cropping variables, and a method for converting the world
151  // coordinate cropping region planes to voxel coordinates
152  int Cropping;
153  double CroppingRegionPlanes[6];
154  double VoxelCroppingRegionPlanes[6];
156  void ConvertCroppingRegionPlanesToVoxels();
157 
158  virtual int FillInputPortInformation(int, vtkInformation*);
159 
160 private:
161  vtkVolumeMapper(const vtkVolumeMapper&); // Not implemented.
162  void operator=(const vtkVolumeMapper&); // Not implemented.
163 };
164 
165 
166 #endif
167 
168 
void SetBlendModeToAdditive()
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
Abstract class for a volume mapper.
#define VTK_CROP_CROSS
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
#define VTKRENDERINGVOLUME_EXPORT
void SetCroppingRegionFlagsToCross()
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:63
void PrintSelf(ostream &os, vtkIndent indent)
void SetCroppingRegionFlagsToSubVolume()
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
void SetCroppingRegionFlagsToInvertedFence()
#define VTK_CROP_INVERTED_CROSS
void SetBlendModeToComposite()
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
void SetCroppingRegionFlagsToFence()
#define VTK_CROP_SUBVOLUME
void SetCroppingRegionFlagsToInvertedCross()
virtual int FillInputPortInformation(int port, vtkInformation *info)
void SetBlendModeToMinimumIntensity()
virtual void ReleaseGraphicsResources(vtkWindow *)
#define VTK_CROP_FENCE
void SetBlendModeToMaximumIntensity()
#define VTK_CROP_INVERTED_FENCE