00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00062 #ifndef __vtkVolumeProMapper_h
00063 #define __vtkVolumeProMapper_h
00064
00065 #include "vtkVolumeMapper.h"
00066 #include "vtkToolkits.h"
00067 #include "vtkVersion.h"
00068
00069
00070 #if defined (VTK_HAVE_VP1000) || defined (VTK_FORCE_COMPILE_VP1000)
00071 namespace vli3 {
00072 #endif
00073 class VLIContext;
00074 class VLIVolume;
00075 class VLILookupTable;
00076 class VLILight;
00077 class VLICutPlane;
00078 #if defined (VTK_HAVE_VP1000) || defined (VTK_FORCE_COMPILE_VP1000)
00079 }
00080 using namespace vli3;
00081 #endif
00082
00083
00084 #define VTK_BLEND_MODE_COMPOSITE 0
00085 #define VTK_BLEND_MODE_MAX_INTENSITY 1
00086 #define VTK_BLEND_MODE_MIN_INTENSITY 2
00087
00088 #define VTK_CURSOR_TYPE_CROSSHAIR 0
00089 #define VTK_CURSOR_TYPE_PLANE 1
00090
00091 #define VTK_VOLUME_8BIT 0
00092 #define VTK_VOLUME_12BIT_UPPER 1
00093 #define VTK_VOLUME_12BIT_LOWER 2
00094
00095 #if ((VTK_MAJOR_VERSION == 3)&&(VTK_MINOR_VERSION == 2))
00096 #define VTK_VOLUME_PRO_MAPPER_EXPORT VTK_EXPORT
00097 #else
00098 #define VTK_VOLUME_PRO_MAPPER_EXPORT VTK_RENDERING_EXPORT
00099 #endif
00100
00101
00102 class VTK_VOLUME_PRO_MAPPER_EXPORT vtkVolumeProMapper : public vtkVolumeMapper
00103 {
00104 public:
00105 vtkTypeRevisionMacro(vtkVolumeProMapper,vtkVolumeMapper);
00106 void PrintSelf( ostream& os, vtkIndent indent );
00107
00109 static vtkVolumeProMapper *New();
00110
00112 virtual void Render( vtkRenderer *, vtkVolume * ) {}
00113
00115
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);
00127
00129
00130 vtkSetVector6Macro( SubVolume, int );
00131 vtkGetVectorMacro( SubVolume, int, 6 );
00133
00135
00136 vtkSetClampMacro( Cursor, int, 0, 1 );
00137 vtkGetMacro( Cursor, int );
00138 vtkBooleanMacro( Cursor, int );
00140
00142
00143 vtkSetClampMacro( CursorType, int,
00144 VTK_CURSOR_TYPE_CROSSHAIR, VTK_CURSOR_TYPE_PLANE );
00145 vtkGetMacro( CursorType, int );
00146 void SetCursorTypeToCrossHair()
00147 { this->SetCursorType( VTK_CURSOR_TYPE_CROSSHAIR ); };
00148 void SetCursorTypeToPlane()
00149 { this->SetCursorType( VTK_CURSOR_TYPE_PLANE ); };
00150 const char *GetCursorTypeAsString( void );
00152
00154
00155 vtkSetVector3Macro( CursorPosition, double );
00156 vtkGetVectorMacro( CursorPosition, double, 3 );
00158
00160
00161 vtkSetVector3Macro( CursorXAxisColor, double );
00162 vtkGetVectorMacro( CursorXAxisColor, double, 3 );
00163 vtkSetVector3Macro( CursorYAxisColor, double );
00164 vtkGetVectorMacro( CursorYAxisColor, double, 3 );
00165 vtkSetVector3Macro( CursorZAxisColor, double );
00166 vtkGetVectorMacro( CursorZAxisColor, double, 3 );
00168
00170
00171 vtkSetClampMacro( SuperSampling, int, 0, 1 );
00172 vtkGetMacro( SuperSampling, int );
00173 vtkBooleanMacro( SuperSampling, int );
00175
00177
00178 void SetSuperSamplingFactor( double x, double y, double z );
00179 void SetSuperSamplingFactor( double f[3] )
00180 { this->SetSuperSamplingFactor( f[0], f[1], f[2] ); };
00181 vtkGetVectorMacro( SuperSamplingFactor, double, 3 );
00183
00185
00186 vtkSetClampMacro( CutPlane, int, 0, 1 );
00187 vtkGetMacro( CutPlane, int );
00188 vtkBooleanMacro( CutPlane, int );
00190
00192
00193 vtkSetVector4Macro( CutPlaneEquation, double );
00194 vtkGetVectorMacro( CutPlaneEquation, double, 4 );
00196
00198
00199 vtkSetClampMacro( CutPlaneThickness, double, 0.0, 9.99e10 );
00200 vtkGetMacro( CutPlaneThickness, double );
00202
00204
00205 vtkSetClampMacro( CutPlaneFallOffDistance, int, 0, 16 );
00206 vtkGetMacro( CutPlaneFallOffDistance, int );
00208
00210
00211 vtkSetClampMacro( GradientOpacityModulation, int, 0, 1 );
00212 vtkGetMacro( GradientOpacityModulation, int );
00213 vtkBooleanMacro( GradientOpacityModulation, int );
00215
00217
00218 vtkSetClampMacro( GradientDiffuseModulation, int, 0, 1 );
00219 vtkGetMacro( GradientDiffuseModulation, int );
00220 vtkBooleanMacro( GradientDiffuseModulation, int );
00222
00224
00225 vtkSetClampMacro( GradientSpecularModulation, int, 0, 1 );
00226 vtkGetMacro( GradientSpecularModulation, int );
00227 vtkBooleanMacro( GradientSpecularModulation, int );
00229
00231
00232 vtkGetMacro( NoHardware, int );
00233 vtkGetMacro( WrongVLIVersion, int );
00235
00237
00238 vtkGetMacro( NumberOfBoards, int );
00239 vtkGetMacro( MajorBoardVersion, int );
00240 vtkGetMacro( MinorBoardVersion, int );
00241 virtual int GetAvailableBoardMemory() { return 0; }
00242 virtual void GetLockSizesForBoardMemory( unsigned int vtkNotUsed(type),
00243 unsigned int * vtkNotUsed(xSize),
00244 unsigned int * vtkNotUsed(ySize),
00245 unsigned int * vtkNotUsed(zSize)) {};
00247
00249
00251 vtkSetClampMacro(IntermixIntersectingGeometry, int, 0, 1);
00252 vtkGetMacro(IntermixIntersectingGeometry, int);
00253 vtkBooleanMacro(IntermixIntersectingGeometry, int);
00255
00256 protected:
00257 vtkVolumeProMapper();
00258 ~vtkVolumeProMapper();
00259
00260 int StatusOK();
00261
00262
00263 VLIContext *Context;
00264
00265
00266
00267 VLIVolume *Volume;
00268 vtkImageData *VolumeInput;
00269 vtkTimeStamp *VolumeBuildTime;
00270
00271
00272 int VolumeDataType;
00273
00274
00275
00276 VLILookupTable *LookupTable;
00277
00278
00279 int BlendMode;
00280
00281
00282
00283 VLILight **Lights;
00284 int NumberOfLights;
00285
00286
00287 int SubVolume[6];
00288
00289
00290 int Cursor;
00291 int CursorType;
00292 double CursorPosition[3];
00293 double CursorXAxisColor[3];
00294 double CursorYAxisColor[3];
00295 double CursorZAxisColor[3];
00296
00297
00298 int CutPlane;
00299 VLICutPlane *Cut;
00300 double CutPlaneEquation[4];
00301 double CutPlaneThickness;
00302 int CutPlaneFallOffDistance;
00303
00304
00305 int SuperSampling;
00306 double SuperSamplingFactor[3];
00307
00308
00309 int GradientOpacityModulation;
00310 int GradientDiffuseModulation;
00311 int GradientSpecularModulation;
00312
00313
00314 int NumberOfBoards;
00315 int MajorBoardVersion;
00316 int MinorBoardVersion;
00317 int GradientTableSize;
00318
00319
00320 int NoHardware;
00321 int WrongVLIVersion;
00322 int DisplayedMessage;
00323
00324
00325 int IntermixIntersectingGeometry;
00326
00327
00328 #if ((VTK_MAJOR_VERSION == 3)&&(VTK_MINOR_VERSION == 2))
00329
00330 virtual int GetMapperType() {return VTK_FRAMEBUFFER_VOLUME_MAPPER;};
00331 #endif
00332
00333
00334 private:
00335 vtkVolumeProMapper(const vtkVolumeProMapper&);
00336 void operator=(const vtkVolumeProMapper&);
00337 };
00338
00340 inline const char *vtkVolumeProMapper::GetBlendModeAsString()
00341 {
00342 switch ( this->BlendMode )
00343 {
00344 case VTK_BLEND_MODE_COMPOSITE:
00345 return "Composite";
00346 case VTK_BLEND_MODE_MAX_INTENSITY:
00347 return "Maximum Intensity";
00348 case VTK_BLEND_MODE_MIN_INTENSITY:
00349 return "Minimum Intensity";
00350 default:
00351 return "Unknown Blend Mode";
00352 }
00353 }
00354
00356 inline const char *vtkVolumeProMapper::GetCursorTypeAsString()
00357 {
00358 switch ( this->CursorType )
00359 {
00360 case VTK_CURSOR_TYPE_CROSSHAIR:
00361 return "Crosshair";
00362 case VTK_CURSOR_TYPE_PLANE:
00363 return "Plane";
00364 default:
00365 return "Unknown Cursor Type";
00366 }
00367 }
00368
00369 #endif
00370