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