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
00063 vtkSetMacro( BlendMode, int );
00064 void SetBlendModeToComposite()
00065 { this->SetBlendMode( vtkVolumeMapper::COMPOSITE_BLEND ); }
00066 void SetBlendModeToMaximumIntensity()
00067 { this->SetBlendMode( vtkVolumeMapper::MAXIMUM_INTENSITY_BLEND ); }
00068 void SetBlendModeToMinimumIntensity()
00069 { this->SetBlendMode( vtkVolumeMapper::MINIMUM_INTENSITY_BLEND ); }
00070 vtkGetMacro( BlendMode, int );
00072
00074
00076 vtkSetClampMacro(Cropping,int,0,1);
00077 vtkGetMacro(Cropping,int);
00078 vtkBooleanMacro(Cropping,int);
00080
00082
00085 vtkSetVector6Macro( CroppingRegionPlanes, double );
00086 vtkGetVectorMacro( CroppingRegionPlanes, double, 6 );
00088
00090
00092 vtkGetVectorMacro( VoxelCroppingRegionPlanes, double, 6 );
00094
00096
00105 vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
00106 vtkGetMacro( CroppingRegionFlags, int );
00107 void SetCroppingRegionFlagsToSubVolume()
00108 {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
00109 void SetCroppingRegionFlagsToFence()
00110 {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
00111 void SetCroppingRegionFlagsToInvertedFence()
00112 {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
00113 void SetCroppingRegionFlagsToCross()
00114 {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
00115 void SetCroppingRegionFlagsToInvertedCross()
00116 {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
00118
00119
00120
00123 virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
00124
00129 virtual void ReleaseGraphicsResources(vtkWindow *) {};
00130
00131 enum
00132 {
00133 COMPOSITE_BLEND,
00134 MAXIMUM_INTENSITY_BLEND,
00135 MINIMUM_INTENSITY_BLEND
00136 };
00137
00138
00139 protected:
00140 vtkVolumeMapper();
00141 ~vtkVolumeMapper();
00142
00143 int BlendMode;
00144
00145
00146
00147 int Cropping;
00148 double CroppingRegionPlanes[6];
00149 double VoxelCroppingRegionPlanes[6];
00150 int CroppingRegionFlags;
00151 void ConvertCroppingRegionPlanesToVoxels();
00152
00153 virtual int FillInputPortInformation(int, vtkInformation*);
00154
00155 private:
00156 vtkVolumeMapper(const vtkVolumeMapper&);
00157 void operator=(const vtkVolumeMapper&);
00158 };
00159
00160
00161 #endif
00162
00163