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
00075 #ifndef __vtkVolumeProMapper_h
00076 #define __vtkVolumeProMapper_h
00077
00078 #include "vtkVolumeMapper.h"
00079
00080
00081 class VLIContext;
00082 class VLIVolume;
00083 class VLILookupTable;
00084 class VLILight;
00085 class VLICutPlane;
00086
00087
00088 #define VTK_BLEND_MODE_COMPOSITE 0
00089 #define VTK_BLEND_MODE_MAX_INTENSITY 1
00090 #define VTK_BLEND_MODE_MIN_INTENSITY 2
00091
00092 #define VTK_CURSOR_TYPE_CROSSHAIR 0
00093 #define VTK_CURSOR_TYPE_PLANE 1
00094
00095 #define VTK_VOLUME_8BIT 0
00096 #define VTK_VOLUME_12BIT_UPPER 1
00097 #define VTK_VOLUME_12BIT_LOWER 2
00098
00099 class VTK_EXPORT vtkVolumeProMapper : public vtkVolumeMapper
00100 {
00101 public:
00102 vtkTypeMacro(vtkVolumeProMapper,vtkVolumeMapper);
00103 void PrintSelf( ostream& os, vtkIndent index );
00104
00106 static vtkVolumeProMapper *New();
00107
00109 virtual void Render( vtkRenderer *, vtkVolume * ) {}
00110
00113 int GetMapperType() { return VTK_FRAMEBUFFER_VOLUME_MAPPER; };
00114
00116 vtkSetClampMacro( BlendMode, int,
00117 VTK_BLEND_MODE_COMPOSITE, VTK_BLEND_MODE_MIN_INTENSITY );
00118 vtkGetMacro(BlendMode,int);
00119 void SetBlendModeToComposite()
00120 {this->SetBlendMode(VTK_BLEND_MODE_COMPOSITE);};
00121 void SetBlendModeToMaximumIntensity()
00122 {this->SetBlendMode(VTK_BLEND_MODE_MAX_INTENSITY);};
00123 void SetBlendModeToMinimumIntensity()
00124 {this->SetBlendMode(VTK_BLEND_MODE_MIN_INTENSITY);};
00125 const char *GetBlendModeAsString(void);
00126
00128 vtkSetVector6Macro( SubVolume, int );
00129 vtkGetVectorMacro( SubVolume, int, 6 );
00130
00132 vtkSetClampMacro( Cursor, int, 0, 1 );
00133 vtkGetMacro( Cursor, int );
00134 vtkBooleanMacro( Cursor, int );
00135
00137 vtkSetClampMacro( CursorType, int,
00138 VTK_CURSOR_TYPE_CROSSHAIR, VTK_CURSOR_TYPE_PLANE );
00139 vtkGetMacro( CursorType, int );
00140 void SetCursorTypeToCrossHair()
00141 { this->SetCursorType( VTK_CURSOR_TYPE_CROSSHAIR ); };
00142 void SetCursorTypeToPlane()
00143 { this->SetCursorType( VTK_CURSOR_TYPE_PLANE ); };
00144 const char *GetCursorTypeAsString( void );
00145
00147 vtkSetVector3Macro( CursorPosition, double );
00148 vtkGetVectorMacro( CursorPosition, double, 3 );
00149
00151 vtkSetVector3Macro( CursorXAxisColor, double );
00152 vtkGetVectorMacro( CursorXAxisColor, double, 3 );
00153 vtkSetVector3Macro( CursorYAxisColor, double );
00154 vtkGetVectorMacro( CursorYAxisColor, double, 3 );
00155 vtkSetVector3Macro( CursorZAxisColor, double );
00156 vtkGetVectorMacro( CursorZAxisColor, double, 3 );
00157
00159 vtkSetClampMacro( SuperSampling, int, 0, 1 );
00160 vtkGetMacro( SuperSampling, int );
00161 vtkBooleanMacro( SuperSampling, int );
00162
00164 void SetSuperSamplingFactor( double x, double y, double z );
00165 void SetSuperSamplingFactor( double f[3] )
00166 { this->SetSuperSamplingFactor( f[0], f[1], f[2] ); };
00167 vtkGetVectorMacro( SuperSamplingFactor, double, 3 );
00168
00170 vtkSetClampMacro( CutPlane, int, 0, 1 );
00171 vtkGetMacro( CutPlane, int );
00172 vtkBooleanMacro( CutPlane, int );
00173
00175 vtkSetVector4Macro( CutPlaneEquation, double );
00176 vtkGetVectorMacro( CutPlaneEquation, double, 4 );
00177
00179 vtkSetClampMacro( CutPlaneThickness, double, 0.0, 9.99e10 );
00180 vtkGetMacro( CutPlaneThickness, double );
00181
00183 vtkSetClampMacro( CutPlaneFallOffDistance, int, 0, 16 );
00184 vtkGetMacro( CutPlaneFallOffDistance, int );
00185
00187 vtkSetClampMacro( GradientOpacityModulation, int, 0, 1 );
00188 vtkGetMacro( GradientOpacityModulation, int );
00189 vtkBooleanMacro( GradientOpacityModulation, int );
00190
00192 vtkSetClampMacro( GradientDiffuseModulation, int, 0, 1 );
00193 vtkGetMacro( GradientDiffuseModulation, int );
00194 vtkBooleanMacro( GradientDiffuseModulation, int );
00195
00197 vtkSetClampMacro( GradientSpecularModulation, int, 0, 1 );
00198 vtkGetMacro( GradientSpecularModulation, int );
00199 vtkBooleanMacro( GradientSpecularModulation, int );
00200
00202 vtkGetMacro( NoHardware, int );
00203 vtkGetMacro( WrongVLIVersion, int );
00204
00206 vtkGetMacro( NumberOfBoards, int );
00207 vtkGetMacro( MajorBoardVersion, int );
00208 vtkGetMacro( MinorBoardVersion, int );
00209 virtual int GetAvailableBoardMemory() { return 0; }
00210 virtual void GetLockSizesForBoardMemory( unsigned int vtkNotUsed(type),
00211 unsigned int * vtkNotUsed(xSize),
00212 unsigned int * vtkNotUsed(ySize),
00213 unsigned int * vtkNotUsed(zSize)) {};
00214
00215 protected:
00216 vtkVolumeProMapper();
00217 ~vtkVolumeProMapper();
00218 vtkVolumeProMapper(const vtkVolumeProMapper&) {};
00219 void operator=(const vtkVolumeProMapper&) {};
00220
00221 int StatusOK();
00222
00223
00224 VLIContext *Context;
00225
00226
00227
00228 VLIVolume *Volume;
00229 vtkImageData *VolumeInput;
00230 vtkTimeStamp *VolumeBuildTime;
00231
00232
00233 int VolumeDataType;
00234
00235
00236
00237 VLILookupTable *LookupTable;
00238
00239
00240 int BlendMode;
00241
00242
00243
00244 VLILight **Lights;
00245 int NumberOfLights;
00246
00247
00248 int SubVolume[6];
00249
00250
00251 int Cursor;
00252 int CursorType;
00253 double CursorPosition[3];
00254 double CursorXAxisColor[3];
00255 double CursorYAxisColor[3];
00256 double CursorZAxisColor[3];
00257
00258
00259 int CutPlane;
00260 VLICutPlane *Cut;
00261 double CutPlaneEquation[4];
00262 double CutPlaneThickness;
00263 int CutPlaneFallOffDistance;
00264
00265
00266 int SuperSampling;
00267 double SuperSamplingFactor[3];
00268
00269
00270 int GradientOpacityModulation;
00271 int GradientDiffuseModulation;
00272 int GradientSpecularModulation;
00273
00274
00275 int NumberOfBoards;
00276 int MajorBoardVersion;
00277 int MinorBoardVersion;
00278 int GradientTableSize;
00279
00280
00281 int NoHardware;
00282 int WrongVLIVersion;
00283 int DisplayedMessage;
00284
00285 };
00286
00288 inline const char *vtkVolumeProMapper::GetBlendModeAsString()
00289 {
00290 switch ( this->BlendMode )
00291 {
00292 case VTK_BLEND_MODE_COMPOSITE:
00293 return "Composite";
00294 case VTK_BLEND_MODE_MAX_INTENSITY:
00295 return "Maximum Intensity";
00296 case VTK_BLEND_MODE_MIN_INTENSITY:
00297 return "Minimum Intensity";
00298 default:
00299 return "Unknown Blend Mode";
00300 }
00301 }
00302
00304 inline const char *vtkVolumeProMapper::GetCursorTypeAsString()
00305 {
00306 switch ( this->CursorType )
00307 {
00308 case VTK_CURSOR_TYPE_CROSSHAIR:
00309 return "Crosshair";
00310 case VTK_CURSOR_TYPE_PLANE:
00311 return "Plane";
00312 default:
00313 return "Unknown Cursor Type";
00314 }
00315 }
00316
00317 #endif
00318