00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00055 #ifndef __vtkVolumeMapper_h
00056 #define __vtkVolumeMapper_h
00057
00058 #include "vtkAbstractMapper3D.h"
00059 #include "vtkImageData.h"
00060
00061 class vtkRenderer;
00062 class vtkVolume;
00063
00064 #define VTK_RAYCAST_VOLUME_MAPPER 0
00065 #define VTK_FRAMEBUFFER_VOLUME_MAPPER 1
00066 #define VTK_SOFTWAREBUFFER_VOLUME_MAPPER 2
00067
00068 #define VTK_CROP_SUBVOLUME 0x0002000
00069 #define VTK_CROP_FENCE 0x2ebfeba
00070 #define VTK_CROP_INVERTED_FENCE 0x5140145
00071 #define VTK_CROP_CROSS 0x0417410
00072 #define VTK_CROP_INVERTED_CROSS 0x7be8bef
00073
00074 class vtkWindow;
00075
00076 class VTK_EXPORT vtkVolumeMapper : public vtkAbstractMapper3D
00077 {
00078 public:
00079 vtkTypeMacro(vtkVolumeMapper,vtkAbstractMapper3D);
00080 void PrintSelf( ostream& os, vtkIndent index );
00081
00083 virtual void Update();
00084
00086 void SetInput( vtkImageData * );
00087 vtkImageData *GetInput();
00088
00091 vtkSetMacro(Cropping,int);
00092 vtkGetMacro(Cropping,int);
00093 vtkBooleanMacro(Cropping,int);
00094
00097 vtkSetVector6Macro( CroppingRegionPlanes, float );
00098 vtkGetVectorMacro( CroppingRegionPlanes, float, 6 );
00099
00109 vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
00110 vtkGetMacro( CroppingRegionFlags, int );
00111 void SetCroppingRegionFlagsToSubVolume()
00112 {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
00113 void SetCroppingRegionFlagsToFence()
00114 {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
00115 void SetCroppingRegionFlagsToInvertedFence()
00116 {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
00117 void SetCroppingRegionFlagsToCross()
00118 {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
00119 void SetCroppingRegionFlagsToInvertedCross()
00120 {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
00121
00123 void SetRGBTextureInput( vtkImageData *rgbTexture );
00124 virtual vtkImageData *GetRGBTextureInput();
00125
00128 virtual float *GetBounds();
00129 virtual void GetBounds(float bounds[6])
00130 { this->vtkAbstractMapper3D::GetBounds(bounds); };
00131
00132
00133
00135 virtual float GetGradientMagnitudeScale() {return 1.0;};
00136 virtual float GetGradientMagnitudeBias() {return 0.0;};
00137
00138
00141 virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
00142
00147 virtual void ReleaseGraphicsResources(vtkWindow *) {};
00148
00151 virtual float *GetRGBAPixelData() {return NULL;};
00152
00156 virtual int GetMapperType()=0;
00157
00158
00159
00160
00161 protected:
00162 vtkVolumeMapper();
00163 ~vtkVolumeMapper();
00164 vtkVolumeMapper(const vtkVolumeMapper&) {};
00165 void operator=(const vtkVolumeMapper&) {};
00166
00167 int Cropping;
00168 float CroppingRegionPlanes[6];
00169 int CroppingRegionFlags;
00170 vtkTimeStamp BuildTime;
00171 };
00172
00173
00174 #endif
00175
00176