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 #include "vtkToolkits.h"
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_RENDERING_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
00112
00113 vtkSetClampMacro( BlendMode, int,
00114 VTK_BLEND_MODE_COMPOSITE, VTK_BLEND_MODE_MIN_INTENSITY );
00115 vtkGetMacro(BlendMode,int);
00116 void SetBlendModeToComposite()
00117 {this->SetBlendMode(VTK_BLEND_MODE_COMPOSITE);};
00118 void SetBlendModeToMaximumIntensity()
00119 {this->SetBlendMode(VTK_BLEND_MODE_MAX_INTENSITY);};
00120 void SetBlendModeToMinimumIntensity()
00121 {this->SetBlendMode(VTK_BLEND_MODE_MIN_INTENSITY);};
00122 const char *GetBlendModeAsString(void);
00124
00126
00127 vtkSetVector6Macro( SubVolume, int );
00128 vtkGetVectorMacro( SubVolume, int, 6 );
00130
00132
00133 vtkSetClampMacro( Cursor, int, 0, 1 );
00134 vtkGetMacro( Cursor, int );
00135 vtkBooleanMacro( Cursor, int );
00137
00139
00140 vtkSetClampMacro( CursorType, int,
00141 VTK_CURSOR_TYPE_CROSSHAIR, VTK_CURSOR_TYPE_PLANE );
00142 vtkGetMacro( CursorType, int );
00143 void SetCursorTypeToCrossHair()
00144 { this->SetCursorType( VTK_CURSOR_TYPE_CROSSHAIR ); };
00145 void SetCursorTypeToPlane()
00146 { this->SetCursorType( VTK_CURSOR_TYPE_PLANE ); };
00147 const char *GetCursorTypeAsString( void );
00149
00151
00152 vtkSetVector3Macro( CursorPosition, double );
00153 vtkGetVectorMacro( CursorPosition, double, 3 );
00155
00157
00158 vtkSetVector3Macro( CursorXAxisColor, double );
00159 vtkGetVectorMacro( CursorXAxisColor, double, 3 );
00160 vtkSetVector3Macro( CursorYAxisColor, double );
00161 vtkGetVectorMacro( CursorYAxisColor, double, 3 );
00162 vtkSetVector3Macro( CursorZAxisColor, double );
00163 vtkGetVectorMacro( CursorZAxisColor, double, 3 );
00165
00167
00168 vtkSetClampMacro( SuperSampling, int, 0, 1 );
00169 vtkGetMacro( SuperSampling, int );
00170 vtkBooleanMacro( SuperSampling, int );
00172
00174
00175 void SetSuperSamplingFactor( double x, double y, double z );
00176 void SetSuperSamplingFactor( double f[3] )
00177 { this->SetSuperSamplingFactor( f[0], f[1], f[2] ); };
00178 vtkGetVectorMacro( SuperSamplingFactor, double, 3 );
00180
00182
00183 vtkSetClampMacro( CutPlane, int, 0, 1 );
00184 vtkGetMacro( CutPlane, int );
00185 vtkBooleanMacro( CutPlane, int );
00187
00189
00190 vtkSetVector4Macro( CutPlaneEquation, double );
00191 vtkGetVectorMacro( CutPlaneEquation, double, 4 );
00193
00195
00196 vtkSetClampMacro( CutPlaneThickness, double, 0.0, 9.99e10 );
00197 vtkGetMacro( CutPlaneThickness, double );
00199
00201
00202 vtkSetClampMacro( CutPlaneFallOffDistance, int, 0, 16 );
00203 vtkGetMacro( CutPlaneFallOffDistance, int );
00205
00207
00208 vtkSetClampMacro( GradientOpacityModulation, int, 0, 1 );
00209 vtkGetMacro( GradientOpacityModulation, int );
00210 vtkBooleanMacro( GradientOpacityModulation, int );
00212
00214
00215 vtkSetClampMacro( GradientDiffuseModulation, int, 0, 1 );
00216 vtkGetMacro( GradientDiffuseModulation, int );
00217 vtkBooleanMacro( GradientDiffuseModulation, int );
00219
00221
00222 vtkSetClampMacro( GradientSpecularModulation, int, 0, 1 );
00223 vtkGetMacro( GradientSpecularModulation, int );
00224 vtkBooleanMacro( GradientSpecularModulation, int );
00226
00228
00229 vtkGetMacro( NoHardware, int );
00230 vtkGetMacro( WrongVLIVersion, int );
00232
00234
00235 vtkGetMacro( NumberOfBoards, int );
00236 vtkGetMacro( MajorBoardVersion, int );
00237 vtkGetMacro( MinorBoardVersion, int );
00238 virtual int GetAvailableBoardMemory() { return 0; }
00239 virtual void GetLockSizesForBoardMemory( unsigned int vtkNotUsed(type),
00240 unsigned int * vtkNotUsed(xSize),
00241 unsigned int * vtkNotUsed(ySize),
00242 unsigned int * vtkNotUsed(zSize)) {};
00244
00246
00248 vtkSetClampMacro(IntermixIntersectingGeometry, int, 0, 1);
00249 vtkGetMacro(IntermixIntersectingGeometry, int);
00250 vtkBooleanMacro(IntermixIntersectingGeometry, int);
00252
00253 protected:
00254 vtkVolumeProMapper();
00255 ~vtkVolumeProMapper();
00256
00257 int StatusOK();
00258
00259
00260 VLIContext *Context;
00261
00262
00263
00264 VLIVolume *Volume;
00265 vtkImageData *VolumeInput;
00266 vtkTimeStamp *VolumeBuildTime;
00267
00268
00269 int VolumeDataType;
00270
00271
00272
00273 VLILookupTable *LookupTable;
00274
00275
00276 int BlendMode;
00277
00278
00279
00280 VLILight **Lights;
00281 int NumberOfLights;
00282
00283
00284 int SubVolume[6];
00285
00286
00287 int Cursor;
00288 int CursorType;
00289 double CursorPosition[3];
00290 double CursorXAxisColor[3];
00291 double CursorYAxisColor[3];
00292 double CursorZAxisColor[3];
00293
00294
00295 int CutPlane;
00296 VLICutPlane *Cut;
00297 double CutPlaneEquation[4];
00298 double CutPlaneThickness;
00299 int CutPlaneFallOffDistance;
00300
00301
00302 int SuperSampling;
00303 double SuperSamplingFactor[3];
00304
00305
00306 int GradientOpacityModulation;
00307 int GradientDiffuseModulation;
00308 int GradientSpecularModulation;
00309
00310
00311 int NumberOfBoards;
00312 int MajorBoardVersion;
00313 int MinorBoardVersion;
00314 int GradientTableSize;
00315
00316
00317 int NoHardware;
00318 int WrongVLIVersion;
00319 int DisplayedMessage;
00320
00321
00322 int IntermixIntersectingGeometry;
00323
00324 private:
00325 vtkVolumeProMapper(const vtkVolumeProMapper&);
00326 void operator=(const vtkVolumeProMapper&);
00327 };
00328
00330 inline const char *vtkVolumeProMapper::GetBlendModeAsString()
00331 {
00332 switch ( this->BlendMode )
00333 {
00334 case VTK_BLEND_MODE_COMPOSITE:
00335 return "Composite";
00336 case VTK_BLEND_MODE_MAX_INTENSITY:
00337 return "Maximum Intensity";
00338 case VTK_BLEND_MODE_MIN_INTENSITY:
00339 return "Minimum Intensity";
00340 default:
00341 return "Unknown Blend Mode";
00342 }
00343 }
00344
00346 inline const char *vtkVolumeProMapper::GetCursorTypeAsString()
00347 {
00348 switch ( this->CursorType )
00349 {
00350 case VTK_CURSOR_TYPE_CROSSHAIR:
00351 return "Crosshair";
00352 case VTK_CURSOR_TYPE_PLANE:
00353 return "Plane";
00354 default:
00355 return "Unknown Cursor Type";
00356 }
00357 }
00358
00359 #endif
00360