VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkFixedPointVolumeRayCastMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFixedPointVolumeRayCastMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
69 #ifndef __vtkFixedPointVolumeRayCastMapper_h
70 #define __vtkFixedPointVolumeRayCastMapper_h
71 
72 #include "vtkRenderingVolumeModule.h" // For export macro
73 #include "vtkVolumeMapper.h"
74 
75 #define VTKKW_FP_SHIFT 15
76 #define VTKKW_FPMM_SHIFT 17
77 #define VTKKW_FP_MASK 0x7fff
78 #define VTKKW_FP_SCALE 32767.0
79 
80 class vtkMatrix4x4;
81 class vtkMultiThreader;
82 class vtkPlaneCollection;
83 class vtkRenderer;
84 class vtkTimerLog;
85 class vtkVolume;
86 class vtkTransform;
87 class vtkRenderWindow;
101 class vtkDataArray;
102 
103 //BTX
104 // Forward declaration needed for use by friend declaration below.
107 //ETX
108 
110 {
111 public:
114  void PrintSelf( ostream& os, vtkIndent indent );
115 
117 
120  vtkSetMacro( SampleDistance, float );
121  vtkGetMacro( SampleDistance, float );
123 
125 
131  vtkSetMacro( InteractiveSampleDistance, float );
132  vtkGetMacro( InteractiveSampleDistance, float );
134 
136 
141  vtkSetClampMacro( ImageSampleDistance, float, 0.1f, 100.0f );
142  vtkGetMacro( ImageSampleDistance, float );
144 
146 
148  vtkSetClampMacro( MinimumImageSampleDistance, float, 0.1f, 100.0f );
149  vtkGetMacro( MinimumImageSampleDistance, float );
151 
153 
155  vtkSetClampMacro( MaximumImageSampleDistance, float, 0.1f, 100.0f );
156  vtkGetMacro( MaximumImageSampleDistance, float );
158 
160 
167  vtkSetClampMacro( AutoAdjustSampleDistances, int, 0, 1 );
168  vtkGetMacro( AutoAdjustSampleDistances, int );
169  vtkBooleanMacro( AutoAdjustSampleDistances, int );
171 
173 
180  vtkSetClampMacro( LockSampleDistanceToInputSpacing, int, 0, 1 );
181  vtkGetMacro( LockSampleDistanceToInputSpacing, int );
182  vtkBooleanMacro( LockSampleDistanceToInputSpacing, int );
184 
186 
189  void SetNumberOfThreads( int num );
190  int GetNumberOfThreads();
192 
194 
196  vtkSetClampMacro( IntermixIntersectingGeometry, int, 0, 1 );
197  vtkGetMacro( IntermixIntersectingGeometry, int );
198  vtkBooleanMacro( IntermixIntersectingGeometry, int );
200 
202 
208  float ComputeRequiredImageSampleDistance( float desiredTime,
209  vtkRenderer *ren );
210  float ComputeRequiredImageSampleDistance( float desiredTime,
211  vtkRenderer *ren,
212  vtkVolume *vol );
214 
215 //BTX
218  void Render( vtkRenderer *, vtkVolume * );
219 
220  unsigned int ToFixedPointPosition( float val );
221  void ToFixedPointPosition( float in[3], unsigned int out[3] );
222  unsigned int ToFixedPointDirection( float dir );
223  void ToFixedPointDirection( float in[3], unsigned int out[3] );
224  void FixedPointIncrement( unsigned int position[3], unsigned int increment[3] );
225  void GetFloatTripleFromPointer( float v[3], float *ptr );
226  void GetUIntTripleFromPointer( unsigned int v[3], unsigned int *ptr );
227  void ShiftVectorDown( unsigned int in[3], unsigned int out[3] );
228  int CheckMinMaxVolumeFlag( unsigned int pos[3], int c );
229  int CheckMIPMinMaxVolumeFlag( unsigned int pos[3], int c, unsigned short maxIdx, int flip );
230 
231  void LookupColorUC( unsigned short *colorTable,
232  unsigned short *scalarOpacityTable,
233  unsigned short index,
234  unsigned char color[4] );
235  void LookupDependentColorUC( unsigned short *colorTable,
236  unsigned short *scalarOpacityTable,
237  unsigned short index[4],
238  int components,
239  unsigned char color[4] );
240  void LookupAndCombineIndependentColorsUC(
241  unsigned short *colorTable[4],
242  unsigned short *scalarOpacityTable[4],
243  unsigned short index[4],
244  float weights[4],
245  int components,
246  unsigned char color[4] );
247  int CheckIfCropped( unsigned int pos[3] );
248 
249 //ETX
250 
251  vtkGetObjectMacro( RenderWindow, vtkRenderWindow );
252  vtkGetObjectMacro( MIPHelper, vtkFixedPointVolumeRayCastMIPHelper );
253  vtkGetObjectMacro( CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper );
254  vtkGetObjectMacro( CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper );
255  vtkGetObjectMacro( CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper );
256  vtkGetObjectMacro( CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper );
257  vtkGetVectorMacro( TableShift, float, 4 );
258  vtkGetVectorMacro( TableScale, float, 4 );
259  vtkGetMacro( ShadingRequired, int );
260  vtkGetMacro( GradientOpacityRequired, int );
261 
262  vtkGetObjectMacro( CurrentScalars, vtkDataArray );
263  vtkGetObjectMacro( PreviousScalars, vtkDataArray );
264 
265 
266  int *GetRowBounds() {return this->RowBounds;}
267  unsigned short *GetColorTable(int c) {return this->ColorTable[c];}
268  unsigned short *GetScalarOpacityTable(int c) {return this->ScalarOpacityTable[c];}
269  unsigned short *GetGradientOpacityTable(int c) {return this->GradientOpacityTable[c];}
270  vtkVolume *GetVolume() {return this->Volume;}
271  unsigned short **GetGradientNormal() {return this->GradientNormal;}
272  unsigned char **GetGradientMagnitude() {return this->GradientMagnitude;}
273  unsigned short *GetDiffuseShadingTable(int c) {return this->DiffuseShadingTable[c];}
274  unsigned short *GetSpecularShadingTable(int c) {return this->SpecularShadingTable[c];}
275 
276  void ComputeRayInfo( int x, int y,
277  unsigned int pos[3],
278  unsigned int dir[3],
279  unsigned int *numSteps );
280 
281  void InitializeRayInfo( vtkVolume *vol );
282 
283  int ShouldUseNearestNeighborInterpolation( vtkVolume *vol );
284 
286 
289  void SetRayCastImage( vtkFixedPointRayCastImage * );
290  vtkGetObjectMacro( RayCastImage, vtkFixedPointRayCastImage );
292 
293  int PerImageInitialization( vtkRenderer *, vtkVolume *, int,
294  double *, double *, int * );
295  void PerVolumeInitialization( vtkRenderer *, vtkVolume * );
296  void PerSubVolumeInitialization( vtkRenderer *, vtkVolume *, int );
297  void RenderSubVolume();
298  void DisplayRenderedImage( vtkRenderer *, vtkVolume * );
299  void AbortRender();
300 
301  void CreateCanonicalView( vtkVolume *volume,
303  int blend_mode,
304  double viewDirection[3],
305  double viewUp[3] );
306 
308 
313  vtkVolume *vol )
314  { return this->RetrieveRenderTime( ren, vol ); }
316  { return this->RetrieveRenderTime( ren ); }
318 
319 
321 
327  vtkSetMacro( FinalColorWindow, float );
328  vtkGetMacro( FinalColorWindow, float );
329  vtkSetMacro( FinalColorLevel, float );
330  vtkGetMacro( FinalColorLevel, float );
332 
333 
334  // Here to be used by the mapper to tell the helper
335  // to flip the MIP comparison in order to support
336  // minimum intensity blending
337  vtkGetMacro( FlipMIPComparison, int );
338 
339 protected:
342 
343  // The helper class that displays the image
345 
346  // The distance between sample points along the ray
349 
350  // The distance between rays in the image
356 
357  // Saved values used to restore
360 
361  // Internal method for computing matrices needed during
362  // ray casting
363  void ComputeMatrices( double volumeOrigin[3],
364  double volumeSpacing[3],
365  int volumeExtent[6],
366  vtkRenderer *ren,
367  vtkVolume *vol );
368 
369  int ComputeRowBounds( vtkRenderer *ren,
370  int imageFlag, int rowBoundsFlag,
371  int volumeExtent[6]);
372 
373  void CaptureZBuffer( vtkRenderer *ren );
374 
377 
379 
386 
388 
392 
393  // This object encapsulated the image and all related information
395 
396  int *RowBounds;
398 
404 
405  void StoreRenderTime( vtkRenderer *ren, vtkVolume *vol, float t );
406  float RetrieveRenderTime( vtkRenderer *ren, vtkVolume *vol );
407  float RetrieveRenderTime( vtkRenderer *ren );
408 
410 
412 
413  vtkColorTransferFunction *SavedRGBFunction[4];
414  vtkPiecewiseFunction *SavedGrayFunction[4];
415  vtkPiecewiseFunction *SavedScalarOpacityFunction[4];
416  vtkPiecewiseFunction *SavedGradientOpacityFunction[4];
417  int SavedColorChannels[4];
418  float SavedScalarOpacityDistance[4];
422 
425 
427 
428 
429  unsigned short ColorTable[4][32768*3];
430  unsigned short ScalarOpacityTable[4][32768];
431  unsigned short GradientOpacityTable[4][256];
432  int TableSize[4];
433  float TableScale[4];
434  float TableShift[4];
435 
436  float GradientMagnitudeScale[4];
437  float GradientMagnitudeShift[4];
438 
439  unsigned short **GradientNormal;
440  unsigned char **GradientMagnitude;
441  unsigned short *ContiguousGradientNormal;
443 
445 
447 
449 
451 
452  unsigned short DiffuseShadingTable [4][65536*3];
453  unsigned short SpecularShadingTable[4][65536*3];
454 
457 
460 
463 
464  int ClipRayAgainstVolume( float rayStart[3],
465  float rayEnd[3],
466  float rayDirection[3],
467  double bounds[6] );
468 
469  int UpdateColorTable( vtkVolume *vol );
470  int UpdateGradients( vtkVolume *vol );
471  int UpdateShadingTable( vtkRenderer *ren,
472  vtkVolume *vol );
473  void UpdateCroppingRegions();
474 
475  void ComputeGradients( vtkVolume *vol );
476 
477  int ClipRayAgainstClippingPlanes( float rayStart[3],
478  float rayEnd[3],
479  int numClippingPlanes,
480  float *clippingPlanes );
481 
482  unsigned int FixedPointCroppingRegionPlanes[6];
483  unsigned int CroppingRegionMask[27];
484 
485  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
486  // are indexing into the ImageInUse image. This must be converted to
487  // the zbuffer image coordinates. Nearest neighbor value is returned.
488  float GetZBufferValue( int x, int y );
489 
495 
496  // Some variables used for ray computation
497  float ViewToVoxelsArray[16];
498  float WorldToVoxelsArray[16];
499  float VoxelsToWorldArray[16];
500 
501  double CroppingBounds[6];
502 
505 
506  double SavedSpacing[3];
507 
508 
509  // Min Max structure used to do space leaping
510  unsigned short *MinMaxVolume;
511  int MinMaxVolumeSize[4];
515 
516  void UpdateMinMaxVolume( vtkVolume *vol );
517  void FillInMaxGradientMagnitudes( int fullDim[3],
518  int smallDim[3] );
519 
522 
524 
525  void ApplyFinalColorWindowLevel();
526 
527 private:
529  void operator=(const vtkFixedPointVolumeRayCastMapper&); // Not implemented.
530 
531  bool ThreadWarning;
532 };
533 
534 
536 {
537  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
538 }
539 
540 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition( float in[3], unsigned int out[3] )
541 {
542  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
543  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
544  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
545 }
546 
548 {
549  return ((dir<0.0)?
550  (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5)):
551  (0x80000000+static_cast<unsigned int>(dir*VTKKW_FP_SCALE + 0.5)));
552 }
553 
554 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection( float in[3], unsigned int out[3] )
555 {
556  out[0] = ((in[0]<0.0)?
557  (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5)):
558  (0x80000000+
559  static_cast<unsigned int>(in[0]*VTKKW_FP_SCALE + 0.5)));
560  out[1] = ((in[1]<0.0)?
561  (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5)):
562  (0x80000000+
563  static_cast<unsigned int>(in[1]*VTKKW_FP_SCALE + 0.5)));
564  out[2] = ((in[2]<0.0)?
565  (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5)):
566  (0x80000000+
567  static_cast<unsigned int>(in[2]*VTKKW_FP_SCALE + 0.5)));
568 }
569 
570 inline void vtkFixedPointVolumeRayCastMapper::FixedPointIncrement( unsigned int position[3], unsigned int increment[3] )
571 {
572  if ( increment[0]&0x80000000 )
573  {
574  position[0] += (increment[0]&0x7fffffff);
575  }
576  else
577  {
578  position[0] -= increment[0];
579  }
580  if ( increment[1]&0x80000000 )
581  {
582  position[1] += (increment[1]&0x7fffffff);
583  }
584  else
585  {
586  position[1] -= increment[1];
587  }
588  if ( increment[2]&0x80000000 )
589  {
590  position[2] += (increment[2]&0x7fffffff);
591  }
592  else
593  {
594  position[2] -= increment[2];
595  }
596 }
597 
598 
600 {
601  v[0] = *(ptr);
602  v[1] = *(ptr+1);
603  v[2] = *(ptr+2);
604 }
605 
606 inline void vtkFixedPointVolumeRayCastMapper::GetUIntTripleFromPointer( unsigned int v[3], unsigned int *ptr )
607 {
608  v[0] = *(ptr);
609  v[1] = *(ptr+1);
610  v[2] = *(ptr+2);
611 }
612 
614  unsigned int out[3] )
615 {
616  out[0] = in[0] >> VTKKW_FP_SHIFT;
617  out[1] = in[1] >> VTKKW_FP_SHIFT;
618  out[2] = in[2] >> VTKKW_FP_SHIFT;
619 }
620 
621 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag( unsigned int mmpos[3], int c )
622 {
623  vtkIdType offset =
624  static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
625  ( mmpos[2]*static_cast<vtkIdType>(
626  this->MinMaxVolumeSize[0]*this->MinMaxVolumeSize[1]) +
627  mmpos[1]*static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) +
628  mmpos[0] ) + static_cast<vtkIdType>(c);
629 
630  return ((*(this->MinMaxVolume + 3*offset + 2))&0x00ff);
631 }
632 
633 inline int vtkFixedPointVolumeRayCastMapper::CheckMIPMinMaxVolumeFlag( unsigned int mmpos[3], int c,
634  unsigned short maxIdx, int flip )
635 {
636  vtkIdType offset =
637  static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
638  ( mmpos[2]*static_cast<vtkIdType>(
639  this->MinMaxVolumeSize[0]*this->MinMaxVolumeSize[1]) +
640  mmpos[1]*static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) +
641  mmpos[0] ) + static_cast<vtkIdType>(c);
642 
643  if ( (*(this->MinMaxVolume + 3*offset + 2)&0x00ff) )
644  {
645  if (flip)
646  {
647  return ( *(this->MinMaxVolume + 3*offset) < maxIdx );
648  }
649  else
650  {
651  return ( *(this->MinMaxVolume + 3*offset + 1) > maxIdx );
652  }
653  }
654  else
655  {
656  return 0;
657  }
658 }
659 
660 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC( unsigned short *colorTable,
661  unsigned short *scalarOpacityTable,
662  unsigned short index,
663  unsigned char color[4] )
664 {
665  unsigned short alpha = scalarOpacityTable[index];
666  color[0] = static_cast<unsigned char>
667  ((colorTable[3*index ]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
668  color[1] = static_cast<unsigned char>
669  ((colorTable[3*index+1]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
670  color[2] = static_cast<unsigned char>
671  ((colorTable[3*index+2]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
672  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
673 }
674 
675 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC( unsigned short *colorTable,
676  unsigned short *scalarOpacityTable,
677  unsigned short index[4],
678  int components,
679  unsigned char color[4] )
680 {
681  unsigned short alpha;
682  switch ( components )
683  {
684  case 2:
685  alpha = scalarOpacityTable[index[1]];
686  color[0] = static_cast<unsigned char>
687  ((colorTable[3*index[0] ]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
688  color[1] = static_cast<unsigned char>
689  ((colorTable[3*index[0]+1]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
690  color[2] = static_cast<unsigned char>
691  ((colorTable[3*index[0]+2]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
692  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
693  break;
694  case 4:
695  alpha = scalarOpacityTable[index[3]];
696  color[0] = static_cast<unsigned char>((index[0]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
697  color[1] = static_cast<unsigned char>((index[1]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
698  color[2] = static_cast<unsigned char>((index[2]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
699  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
700  break;
701  }
702 }
703 
704 
706  unsigned short *scalarOpacityTable[4],
707  unsigned short index[4],
708  float weights[4],
709  int components,
710  unsigned char color[4] )
711 {
712  unsigned int tmp[4] = {0,0,0,0};
713 
714  for ( int i = 0; i < components; i++ )
715  {
716  unsigned short alpha = static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]])*weights[i]);
717  tmp[0] += static_cast<unsigned char>(((colorTable[i][3*index[i] ])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
718  tmp[1] += static_cast<unsigned char>(((colorTable[i][3*index[i]+1])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
719  tmp[2] += static_cast<unsigned char>(((colorTable[i][3*index[i]+2])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
720  tmp[3] += static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
721  }
722 
723  color[0] = static_cast<unsigned char>((tmp[0]>255)?(255):(tmp[0]));
724  color[1] = static_cast<unsigned char>((tmp[1]>255)?(255):(tmp[1]));
725  color[2] = static_cast<unsigned char>((tmp[2]>255)?(255):(tmp[2]));
726  color[3] = static_cast<unsigned char>((tmp[3]>255)?(255):(tmp[3]));
727 
728 }
729 
730 inline int vtkFixedPointVolumeRayCastMapper::CheckIfCropped( unsigned int pos[3] )
731 {
732  int idx;
733 
734  if ( pos[2] < this->FixedPointCroppingRegionPlanes[4] )
735  {
736  idx = 0;
737  }
738  else if ( pos[2] > this->FixedPointCroppingRegionPlanes[5] )
739  {
740  idx = 18;
741  }
742  else
743  {
744  idx = 9;
745  }
746 
747  if ( pos[1] >= this->FixedPointCroppingRegionPlanes[2] )
748  {
749  if ( pos[1] > this->FixedPointCroppingRegionPlanes[3] )
750  {
751  idx += 6;
752  }
753  else
754  {
755  idx += 3;
756  }
757  }
758 
759  if ( pos[0] >= this->FixedPointCroppingRegionPlanes[0] )
760  {
761  if ( pos[0] > this->FixedPointCroppingRegionPlanes[1] )
762  {
763  idx += 2;
764  }
765  else
766  {
767  idx += 1;
768  }
769  }
770 
771  return !(static_cast<unsigned int>(this->CroppingRegionFlags)
772  &this->CroppingRegionMask[idx]);
773 }
774 
775 #endif
void ShiftVectorDown(unsigned int in[3], unsigned int out[3])
vtkFixedPointVolumeRayCastMIPHelper * MIPHelper
GLclampf f
Definition: vtkgl.h:14181
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
vtkFixedPointVolumeRayCastCompositeShadeHelper * CompositeShadeHelper
vtkVolumeRayCastSpaceLeapingImageFilter * SpaceLeapFilter
Abstract class for a volume mapper.
encode a direction into a one or two byte value
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
A helper that generates composite images for the volume ray cast mapper.
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: vtkgl.h:11341
const GLdouble * v
Definition: vtkgl.h:11595
void FixedPointIncrement(unsigned int position[3], unsigned int increment[3])
GLuint index
Definition: vtkgl.h:11983
Use finite differences to estimate gradient.
Defines a 1D piecewise function.
void PrintSelf(ostream &os, vtkIndent indent)
GLintptr offset
Definition: vtkgl.h:11844
#define VTKRENDERINGVOLUME_EXPORT
VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void *arg)
A class for performing multithreaded execution.
record modification and/or execution time
Definition: vtkTimeStamp.h:34
maintain a list of planes
GLenum GLenum GLuint components
Definition: vtkgl.h:16909
VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void *arg)
abstract specification for renderers
Definition: vtkRenderer.h:63
void GetUIntTripleFromPointer(unsigned int v[3], unsigned int *ptr)
GLuint in
Definition: vtkgl.h:16905
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
int vtkIdType
Definition: vtkType.h:268
GLdouble GLdouble t
Definition: vtkgl.h:11602
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
A helper that generates MIP images for the volume ray cast mapper.
GLuint GLuint num
Definition: vtkgl.h:16907
helper class that draws the image to the screen
#define VTKKW_FP_SCALE
Timer support and logging.
Definition: vtkTimerLog.h:81
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkFixedPointVolumeRayCastCompositeGOHelper * CompositeGOHelper
const GLbyte * weights
Definition: vtkgl.h:12766
a simple class to control print indentation
Definition: vtkIndent.h:38
float GetEstimatedRenderTime(vtkRenderer *ren, vtkVolume *vol)
const GLubyte * c
Definition: vtkgl.h:15720
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
void LookupDependentColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index[4], int components, unsigned char color[4])
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
VTKRENDERINGOPENGL_EXPORT PFNGLCOLORTABLEPROC ColorTable
Compute shading tables for encoded normals.
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip)
vtkWeakPointer< vtkRenderWindow > RenderWindow
A helper that generates composite images for the volume ray cast mapper.
A helper that generates composite images for the volume ray cast mapper.
Defines a transfer function for mapping a property to an RGB color value.
create a window for renderers to draw into
vtkFixedPointVolumeRayCastCompositeHelper * CompositeHelper
A helper that generates composite images for the volume ray cast mapper.
#define VTK_THREAD_RETURN_TYPE
void LookupAndCombineIndependentColorsUC(unsigned short *colorTable[4], unsigned short *scalarOpacityTable[4], unsigned short index[4], float weights[4], int components, unsigned char color[4])
int CheckMinMaxVolumeFlag(unsigned int pos[3], int c)
GLuint color
Definition: vtkgl.h:12351
void LookupColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index, unsigned char color[4])
vtkFixedPointVolumeRayCastCompositeGOShadeHelper * CompositeGOShadeHelper
static vtkAlgorithm * New()
vtkRayCastImageDisplayHelper * ImageDisplayHelper
GLclampf GLclampf GLclampf alpha
Definition: vtkgl.h:11313
#define VTKKW_FP_SHIFT
vtkFiniteDifferenceGradientEstimator * GradientEstimator
GLuint GLfloat * val
Definition: vtkgl.h:13789
void GetFloatTripleFromPointer(float v[3], float *ptr)
helper class for a ray cast image