00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkVolumeMapper_h
00028 #define __vtkVolumeMapper_h
00029
00030 #include "vtkAbstractVolumeMapper.h"
00031
00032 class vtkRenderer;
00033 class vtkVolume;
00034 class vtkImageData;
00035
00036 #define VTK_CROP_SUBVOLUME 0x0002000
00037 #define VTK_CROP_FENCE 0x2ebfeba
00038 #define VTK_CROP_INVERTED_FENCE 0x5140145
00039 #define VTK_CROP_CROSS 0x0417410
00040 #define VTK_CROP_INVERTED_CROSS 0x7be8bef
00041
00042 class vtkWindow;
00043
00044 class VTK_VOLUMERENDERING_EXPORT vtkVolumeMapper : public vtkAbstractVolumeMapper
00045 {
00046 public:
00047 vtkTypeMacro(vtkVolumeMapper,vtkAbstractVolumeMapper);
00048 void PrintSelf( ostream& os, vtkIndent indent );
00049
00051
00052 virtual void SetInput( vtkImageData * );
00053 virtual void SetInput( vtkDataSet * );
00054 vtkImageData *GetInput();
00056
00058
00064 vtkSetMacro( BlendMode, int );
00065 void SetBlendModeToComposite()
00066 { this->SetBlendMode( vtkVolumeMapper::COMPOSITE_BLEND ); }
00067 void SetBlendModeToMaximumIntensity()
00068 { this->SetBlendMode( vtkVolumeMapper::MAXIMUM_INTENSITY_BLEND ); }
00069 void SetBlendModeToMinimumIntensity()
00070 { this->SetBlendMode( vtkVolumeMapper::MINIMUM_INTENSITY_BLEND ); }
00071 void SetBlendModeToAdditive()
00072 { this->SetBlendMode( vtkVolumeMapper::ADDITIVE_BLEND ); }
00073 vtkGetMacro( BlendMode, int );
00075
00077
00079 vtkSetClampMacro(Cropping,int,0,1);
00080 vtkGetMacro(Cropping,int);
00081 vtkBooleanMacro(Cropping,int);
00083
00085
00088 vtkSetVector6Macro( CroppingRegionPlanes, double );
00089 vtkGetVectorMacro( CroppingRegionPlanes, double, 6 );
00091
00093
00095 vtkGetVectorMacro( VoxelCroppingRegionPlanes, double, 6 );
00097
00099
00108 vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
00109 vtkGetMacro( CroppingRegionFlags, int );
00110 void SetCroppingRegionFlagsToSubVolume()
00111 {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
00112 void SetCroppingRegionFlagsToFence()
00113 {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
00114 void SetCroppingRegionFlagsToInvertedFence()
00115 {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
00116 void SetCroppingRegionFlagsToCross()
00117 {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
00118 void SetCroppingRegionFlagsToInvertedCross()
00119 {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
00121
00122
00123
00126 virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
00127
00132 virtual void ReleaseGraphicsResources(vtkWindow *) {};
00133
00134 enum
00135 {
00136 COMPOSITE_BLEND,
00137 MAXIMUM_INTENSITY_BLEND,
00138 MINIMUM_INTENSITY_BLEND,
00139 ADDITIVE_BLEND
00140 };
00141
00142
00143 protected:
00144 vtkVolumeMapper();
00145 ~vtkVolumeMapper();
00146
00147 int BlendMode;
00148
00149
00150
00151 int Cropping;
00152 double CroppingRegionPlanes[6];
00153 double VoxelCroppingRegionPlanes[6];
00154 int CroppingRegionFlags;
00155 void ConvertCroppingRegionPlanesToVoxels();
00156
00157 virtual int FillInputPortInformation(int, vtkInformation*);
00158
00159 private:
00160 vtkVolumeMapper(const vtkVolumeMapper&);
00161 void operator=(const vtkVolumeMapper&);
00162 };
00163
00164
00165 #endif
00166
00167