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