VTK
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 =========================================================================*/
56 #ifndef vtkFixedPointVolumeRayCastMapper_h
57 #define vtkFixedPointVolumeRayCastMapper_h
58 
59 #include "vtkRenderingVolumeModule.h" // For export macro
60 #include "vtkVolumeMapper.h"
61 
62 #define VTKKW_FP_SHIFT 15
63 #define VTKKW_FPMM_SHIFT 17
64 #define VTKKW_FP_MASK 0x7fff
65 #define VTKKW_FP_SCALE 32767.0
66 
67 class vtkMatrix4x4;
68 class vtkMultiThreader;
69 class vtkPlaneCollection;
70 class vtkRenderer;
71 class vtkTimerLog;
72 class vtkVolume;
73 class vtkTransform;
74 class vtkRenderWindow;
88 class vtkDataArray;
89 
90 // Forward declaration needed for use by friend declaration below.
93 
94 class VTKRENDERINGVOLUME_EXPORT vtkFixedPointVolumeRayCastMapper : public vtkVolumeMapper
95 {
96 public:
99  void PrintSelf( ostream& os, vtkIndent indent ) override;
100 
102 
107  vtkSetMacro( SampleDistance, float );
108  vtkGetMacro( SampleDistance, float );
110 
112 
119  vtkSetMacro( InteractiveSampleDistance, float );
120  vtkGetMacro( InteractiveSampleDistance, float );
122 
124 
131  vtkSetClampMacro( ImageSampleDistance, float, 0.1f, 100.0f );
132  vtkGetMacro( ImageSampleDistance, float );
134 
136 
140  vtkSetClampMacro( MinimumImageSampleDistance, float, 0.1f, 100.0f );
141  vtkGetMacro( MinimumImageSampleDistance, float );
143 
145 
149  vtkSetClampMacro( MaximumImageSampleDistance, float, 0.1f, 100.0f );
150  vtkGetMacro( MaximumImageSampleDistance, float );
152 
154 
163  vtkSetClampMacro( AutoAdjustSampleDistances, vtkTypeBool, 0, 1 );
164  vtkGetMacro( AutoAdjustSampleDistances, vtkTypeBool );
165  vtkBooleanMacro( AutoAdjustSampleDistances, vtkTypeBool );
167 
169 
177  vtkSetClampMacro( LockSampleDistanceToInputSpacing, vtkTypeBool, 0, 1 );
178  vtkGetMacro( LockSampleDistanceToInputSpacing, vtkTypeBool );
179  vtkBooleanMacro( LockSampleDistanceToInputSpacing, vtkTypeBool );
181 
183 
188  void SetNumberOfThreads( int num );
189  int GetNumberOfThreads();
191 
193 
197  vtkSetClampMacro( IntermixIntersectingGeometry, vtkTypeBool, 0, 1 );
198  vtkGetMacro( IntermixIntersectingGeometry, vtkTypeBool );
199  vtkBooleanMacro( IntermixIntersectingGeometry, vtkTypeBool );
201 
203 
210  float ComputeRequiredImageSampleDistance( float desiredTime,
211  vtkRenderer *ren );
212  float ComputeRequiredImageSampleDistance( float desiredTime,
213  vtkRenderer *ren,
214  vtkVolume *vol );
216 
221  void Render( vtkRenderer *, vtkVolume * ) override;
222 
223  unsigned int ToFixedPointPosition( float val );
224  void ToFixedPointPosition( float in[3], unsigned int out[3] );
225  unsigned int ToFixedPointDirection( float dir );
226  void ToFixedPointDirection( float in[3], unsigned int out[3] );
227  void FixedPointIncrement( unsigned int position[3], unsigned int increment[3] );
228  void GetFloatTripleFromPointer( float v[3], float *ptr );
229  void GetUIntTripleFromPointer( unsigned int v[3], unsigned int *ptr );
230  void ShiftVectorDown( unsigned int in[3], unsigned int out[3] );
231  int CheckMinMaxVolumeFlag( unsigned int pos[3], int c );
232  int CheckMIPMinMaxVolumeFlag( unsigned int pos[3], int c, unsigned short maxIdx, int flip );
233 
234  void LookupColorUC( unsigned short *colorTable,
235  unsigned short *scalarOpacityTable,
236  unsigned short index,
237  unsigned char color[4] );
238  void LookupDependentColorUC( unsigned short *colorTable,
239  unsigned short *scalarOpacityTable,
240  unsigned short index[4],
241  int components,
242  unsigned char color[4] );
243  void LookupAndCombineIndependentColorsUC(
244  unsigned short *colorTable[4],
245  unsigned short *scalarOpacityTable[4],
246  unsigned short index[4],
247  float weights[4],
248  int components,
249  unsigned char color[4] );
250  int CheckIfCropped( unsigned int pos[3] );
251 
252  vtkGetObjectMacro( RenderWindow, vtkRenderWindow );
253  vtkGetObjectMacro( MIPHelper, vtkFixedPointVolumeRayCastMIPHelper );
254  vtkGetObjectMacro( CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper );
255  vtkGetObjectMacro( CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper );
256  vtkGetObjectMacro( CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper );
257  vtkGetObjectMacro( CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper );
258  vtkGetVectorMacro( TableShift, float, 4 );
259  vtkGetVectorMacro( TableScale, float, 4 );
260  vtkGetMacro( ShadingRequired, int );
261  vtkGetMacro( GradientOpacityRequired, int );
262 
263  vtkGetObjectMacro( CurrentScalars, vtkDataArray );
264  vtkGetObjectMacro( PreviousScalars, vtkDataArray );
265 
266 
267  int *GetRowBounds() {return this->RowBounds;}
268  unsigned short *GetColorTable(int c) {return this->ColorTable[c];}
269  unsigned short *GetScalarOpacityTable(int c) {return this->ScalarOpacityTable[c];}
270  unsigned short *GetGradientOpacityTable(int c) {return this->GradientOpacityTable[c];}
271  vtkVolume *GetVolume() {return this->Volume;}
272  unsigned short **GetGradientNormal() {return this->GradientNormal;}
273  unsigned char **GetGradientMagnitude() {return this->GradientMagnitude;}
274  unsigned short *GetDiffuseShadingTable(int c) {return this->DiffuseShadingTable[c];}
275  unsigned short *GetSpecularShadingTable(int c) {return this->SpecularShadingTable[c];}
276 
277  void ComputeRayInfo( int x, int y,
278  unsigned int pos[3],
279  unsigned int dir[3],
280  unsigned int *numSteps );
281 
282  void InitializeRayInfo( vtkVolume *vol );
283 
284  int ShouldUseNearestNeighborInterpolation( vtkVolume *vol );
285 
287 
292  void SetRayCastImage( vtkFixedPointRayCastImage * );
293  vtkGetObjectMacro( RayCastImage, vtkFixedPointRayCastImage );
295 
296  int PerImageInitialization( vtkRenderer *, vtkVolume *, int,
297  double *, double *, int * );
298  void PerVolumeInitialization( vtkRenderer *, vtkVolume * );
299  void PerSubVolumeInitialization( vtkRenderer *, vtkVolume *, int );
300  void RenderSubVolume();
301  void DisplayRenderedImage( vtkRenderer *, vtkVolume * );
302  void AbortRender();
303 
304  void CreateCanonicalView( vtkVolume *volume,
306  int blend_mode,
307  double viewDirection[3],
308  double viewUp[3] );
309 
317  vtkVolume *vol )
318  { return this->RetrieveRenderTime( ren, vol ); }
320  { return this->RetrieveRenderTime( ren ); }
321 
322 
324 
337  vtkSetMacro( FinalColorWindow, float );
338  vtkGetMacro( FinalColorWindow, float );
339  vtkSetMacro( FinalColorLevel, float );
340  vtkGetMacro( FinalColorLevel, float );
342 
343 
344  // Here to be used by the mapper to tell the helper
345  // to flip the MIP comparison in order to support
346  // minimum intensity blending
347  vtkGetMacro( FlipMIPComparison, int );
348 
355  void ReleaseGraphicsResources(vtkWindow *) override;
356 
357 protected:
360 
361  // The helper class that displays the image
363 
364  // The distance between sample points along the ray
367 
368  // The distance between rays in the image
374 
375  // Saved values used to restore
378 
379  // Internal method for computing matrices needed during
380  // ray casting
381  void ComputeMatrices( double volumeOrigin[3],
382  double volumeSpacing[3],
383  int volumeExtent[6],
384  vtkRenderer *ren,
385  vtkVolume *vol );
386 
387  int ComputeRowBounds( vtkRenderer *ren,
388  int imageFlag, int rowBoundsFlag,
389  int volumeExtent[6]);
390 
391  void CaptureZBuffer( vtkRenderer *ren );
392 
395 
397 
404 
406 
410 
411  // This object encapsulated the image and all related information
413 
414  int *RowBounds;
416 
422 
423  void StoreRenderTime( vtkRenderer *ren, vtkVolume *vol, float t );
424  float RetrieveRenderTime( vtkRenderer *ren, vtkVolume *vol );
425  float RetrieveRenderTime( vtkRenderer *ren );
426 
428 
430 
431  vtkColorTransferFunction *SavedRGBFunction[4];
432  vtkPiecewiseFunction *SavedGrayFunction[4];
433  vtkPiecewiseFunction *SavedScalarOpacityFunction[4];
434  vtkPiecewiseFunction *SavedGradientOpacityFunction[4];
435  int SavedColorChannels[4];
436  float SavedScalarOpacityDistance[4];
440 
443 
445 
446 
447  unsigned short ColorTable[4][32768*3];
448  unsigned short ScalarOpacityTable[4][32768];
449  unsigned short GradientOpacityTable[4][256];
450  int TableSize[4];
451  float TableScale[4];
452  float TableShift[4];
453 
454  float GradientMagnitudeScale[4];
455  float GradientMagnitudeShift[4];
456 
457  unsigned short **GradientNormal;
458  unsigned char **GradientMagnitude;
459  unsigned short *ContiguousGradientNormal;
461 
463 
465 
467 
469 
470  unsigned short DiffuseShadingTable [4][65536*3];
471  unsigned short SpecularShadingTable[4][65536*3];
472 
475 
478 
481 
482  int ClipRayAgainstVolume( float rayStart[3],
483  float rayEnd[3],
484  float rayDirection[3],
485  double bounds[6] );
486 
487  int UpdateColorTable( vtkVolume *vol );
488  int UpdateGradients( vtkVolume *vol );
489  int UpdateShadingTable( vtkRenderer *ren,
490  vtkVolume *vol );
491  void UpdateCroppingRegions();
492 
493  void ComputeGradients( vtkVolume *vol );
494 
495  int ClipRayAgainstClippingPlanes( float rayStart[3],
496  float rayEnd[3],
497  int numClippingPlanes,
498  float *clippingPlanes );
499 
500  unsigned int FixedPointCroppingRegionPlanes[6];
501  unsigned int CroppingRegionMask[27];
502 
503  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
504  // are indexing into the ImageInUse image. This must be converted to
505  // the zbuffer image coordinates. Nearest neighbor value is returned.
506  float GetZBufferValue( int x, int y );
507 
513 
514  // Some variables used for ray computation
515  float ViewToVoxelsArray[16];
516  float WorldToVoxelsArray[16];
517  float VoxelsToWorldArray[16];
518 
519  double CroppingBounds[6];
520 
523 
524  double SavedSpacing[3];
525 
526 
527  // Min Max structure used to do space leaping
528  unsigned short *MinMaxVolume;
529  int MinMaxVolumeSize[4];
533 
534  void UpdateMinMaxVolume( vtkVolume *vol );
535  void FillInMaxGradientMagnitudes( int fullDim[3],
536  int smallDim[3] );
537 
540 
542 
543  void ApplyFinalColorWindowLevel();
544 
545 private:
547  void operator=(const vtkFixedPointVolumeRayCastMapper&) = delete;
548 
549  bool ThreadWarning;
550 };
551 
552 
554 {
555  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
556 }
557 
558 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition( float in[3], unsigned int out[3] )
559 {
560  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
561  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
562  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
563 }
564 
566 {
567  return ((dir<0.0)?
568  (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5)):
569  (0x80000000+static_cast<unsigned int>(dir*VTKKW_FP_SCALE + 0.5)));
570 }
571 
572 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection( float in[3], unsigned int out[3] )
573 {
574  out[0] = ((in[0]<0.0)?
575  (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5)):
576  (0x80000000+
577  static_cast<unsigned int>(in[0]*VTKKW_FP_SCALE + 0.5)));
578  out[1] = ((in[1]<0.0)?
579  (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5)):
580  (0x80000000+
581  static_cast<unsigned int>(in[1]*VTKKW_FP_SCALE + 0.5)));
582  out[2] = ((in[2]<0.0)?
583  (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5)):
584  (0x80000000+
585  static_cast<unsigned int>(in[2]*VTKKW_FP_SCALE + 0.5)));
586 }
587 
588 inline void vtkFixedPointVolumeRayCastMapper::FixedPointIncrement( unsigned int position[3], unsigned int increment[3] )
589 {
590  if ( increment[0]&0x80000000 )
591  {
592  position[0] += (increment[0]&0x7fffffff);
593  }
594  else
595  {
596  position[0] -= increment[0];
597  }
598  if ( increment[1]&0x80000000 )
599  {
600  position[1] += (increment[1]&0x7fffffff);
601  }
602  else
603  {
604  position[1] -= increment[1];
605  }
606  if ( increment[2]&0x80000000 )
607  {
608  position[2] += (increment[2]&0x7fffffff);
609  }
610  else
611  {
612  position[2] -= increment[2];
613  }
614 }
615 
616 
618 {
619  v[0] = *(ptr);
620  v[1] = *(ptr+1);
621  v[2] = *(ptr+2);
622 }
623 
624 inline void vtkFixedPointVolumeRayCastMapper::GetUIntTripleFromPointer( unsigned int v[3], unsigned int *ptr )
625 {
626  v[0] = *(ptr);
627  v[1] = *(ptr+1);
628  v[2] = *(ptr+2);
629 }
630 
632  unsigned int out[3] )
633 {
634  out[0] = in[0] >> VTKKW_FP_SHIFT;
635  out[1] = in[1] >> VTKKW_FP_SHIFT;
636  out[2] = in[2] >> VTKKW_FP_SHIFT;
637 }
638 
639 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag( unsigned int mmpos[3], int c )
640 {
641  vtkIdType offset =
642  static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
643  ( mmpos[2]*static_cast<vtkIdType>(
644  this->MinMaxVolumeSize[0]*this->MinMaxVolumeSize[1]) +
645  mmpos[1]*static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) +
646  mmpos[0] ) + static_cast<vtkIdType>(c);
647 
648  return ((*(this->MinMaxVolume + 3*offset + 2))&0x00ff);
649 }
650 
651 inline int vtkFixedPointVolumeRayCastMapper::CheckMIPMinMaxVolumeFlag( unsigned int mmpos[3], int c,
652  unsigned short maxIdx, int flip )
653 {
654  vtkIdType offset =
655  static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
656  ( mmpos[2]*static_cast<vtkIdType>(
657  this->MinMaxVolumeSize[0]*this->MinMaxVolumeSize[1]) +
658  mmpos[1]*static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) +
659  mmpos[0] ) + static_cast<vtkIdType>(c);
660 
661  if ( (*(this->MinMaxVolume + 3*offset + 2)&0x00ff) )
662  {
663  if (flip)
664  {
665  return ( *(this->MinMaxVolume + 3*offset) < maxIdx );
666  }
667  else
668  {
669  return ( *(this->MinMaxVolume + 3*offset + 1) > maxIdx );
670  }
671  }
672  else
673  {
674  return 0;
675  }
676 }
677 
678 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC( unsigned short *colorTable,
679  unsigned short *scalarOpacityTable,
680  unsigned short index,
681  unsigned char color[4] )
682 {
683  unsigned short alpha = scalarOpacityTable[index];
684  color[0] = static_cast<unsigned char>
685  ((colorTable[3*index ]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
686  color[1] = static_cast<unsigned char>
687  ((colorTable[3*index+1]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
688  color[2] = static_cast<unsigned char>
689  ((colorTable[3*index+2]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
690  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
691 }
692 
693 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC( unsigned short *colorTable,
694  unsigned short *scalarOpacityTable,
695  unsigned short index[4],
696  int components,
697  unsigned char color[4] )
698 {
699  unsigned short alpha;
700  switch ( components )
701  {
702  case 2:
703  alpha = scalarOpacityTable[index[1]];
704  color[0] = static_cast<unsigned char>
705  ((colorTable[3*index[0] ]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
706  color[1] = static_cast<unsigned char>
707  ((colorTable[3*index[0]+1]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
708  color[2] = static_cast<unsigned char>
709  ((colorTable[3*index[0]+2]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
710  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
711  break;
712  case 4:
713  alpha = scalarOpacityTable[index[3]];
714  color[0] = static_cast<unsigned char>((index[0]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
715  color[1] = static_cast<unsigned char>((index[1]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
716  color[2] = static_cast<unsigned char>((index[2]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
717  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
718  break;
719  }
720 }
721 
722 
724  unsigned short *scalarOpacityTable[4],
725  unsigned short index[4],
726  float weights[4],
727  int components,
728  unsigned char color[4] )
729 {
730  unsigned int tmp[4] = {0,0,0,0};
731 
732  for ( int i = 0; i < components; i++ )
733  {
734  unsigned short alpha = static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]])*weights[i]);
735  tmp[0] += static_cast<unsigned char>(((colorTable[i][3*index[i] ])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
736  tmp[1] += static_cast<unsigned char>(((colorTable[i][3*index[i]+1])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
737  tmp[2] += static_cast<unsigned char>(((colorTable[i][3*index[i]+2])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
738  tmp[3] += static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
739  }
740 
741  color[0] = static_cast<unsigned char>((tmp[0]>255)?(255):(tmp[0]));
742  color[1] = static_cast<unsigned char>((tmp[1]>255)?(255):(tmp[1]));
743  color[2] = static_cast<unsigned char>((tmp[2]>255)?(255):(tmp[2]));
744  color[3] = static_cast<unsigned char>((tmp[3]>255)?(255):(tmp[3]));
745 
746 }
747 
748 inline int vtkFixedPointVolumeRayCastMapper::CheckIfCropped( unsigned int pos[3] )
749 {
750  int idx;
751 
752  if ( pos[2] < this->FixedPointCroppingRegionPlanes[4] )
753  {
754  idx = 0;
755  }
756  else if ( pos[2] > this->FixedPointCroppingRegionPlanes[5] )
757  {
758  idx = 18;
759  }
760  else
761  {
762  idx = 9;
763  }
764 
765  if ( pos[1] >= this->FixedPointCroppingRegionPlanes[2] )
766  {
767  if ( pos[1] > this->FixedPointCroppingRegionPlanes[3] )
768  {
769  idx += 6;
770  }
771  else
772  {
773  idx += 3;
774  }
775  }
776 
777  if ( pos[0] >= this->FixedPointCroppingRegionPlanes[0] )
778  {
779  if ( pos[0] > this->FixedPointCroppingRegionPlanes[1] )
780  {
781  idx += 2;
782  }
783  else
784  {
785  idx += 1;
786  }
787  }
788 
789  return !(static_cast<unsigned int>(this->CroppingRegionFlags)
790  &this->CroppingRegionMask[idx]);
791 }
792 
793 #endif
vtkFixedPointVolumeRayCastMapper::GetSpecularShadingTable
unsigned short * GetSpecularShadingTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:275
vtkFixedPointVolumeRayCastMapper::ContiguousGradientNormal
unsigned short * ContiguousGradientNormal
Definition: vtkFixedPointVolumeRayCastMapper.h:459
vtkFixedPointVolumeRayCastMapper::RenderRendererTable
vtkRenderer ** RenderRendererTable
Definition: vtkFixedPointVolumeRayCastMapper.h:419
vtkFixedPointVolumeRayCastMapper::GetGradientMagnitude
unsigned char ** GetGradientMagnitude()
Definition: vtkFixedPointVolumeRayCastMapper.h:273
vtkVolumeMapper
Abstract class for a volume mapper.
Definition: vtkVolumeMapper.h:43
vtkFixedPointVolumeRayCastMapper::GetGradientNormal
unsigned short ** GetGradientNormal()
Definition: vtkFixedPointVolumeRayCastMapper.h:272
vtkFixedPointVolumeRayCastMapper::OldRowBounds
int * OldRowBounds
Definition: vtkFixedPointVolumeRayCastMapper.h:415
vtkFixedPointVolumeRayCastMapper::Threader
vtkMultiThreader * Threader
Definition: vtkFixedPointVolumeRayCastMapper.h:396
vtkX3D::alpha
Definition: vtkX3D.h:250
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:44
vtkFixedPointVolumeRayCastMapper::SavedMinMaxInput
vtkImageData * SavedMinMaxInput
Definition: vtkFixedPointVolumeRayCastMapper.h:530
vtkFixedPointRayCastImage
helper class for a ray cast image
Definition: vtkFixedPointRayCastImage.h:39
vtkRayCastImageDisplayHelper
helper class that draws the image to the screen
Definition: vtkRayCastImageDisplayHelper.h:39
vtkFixedPointVolumeRayCastMapper::MIPHelper
vtkFixedPointVolumeRayCastMIPHelper * MIPHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:508
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkFixedPointVolumeRayCastMapper::AutoAdjustSampleDistances
vtkTypeBool AutoAdjustSampleDistances
Definition: vtkFixedPointVolumeRayCastMapper.h:372
vtkFixedPointVolumeRayCastMapper
A fixed point mapper for volumes.
Definition: vtkFixedPointVolumeRayCastMapper.h:94
vtkFixedPointVolumeRayCastMapper::GetGradientOpacityTable
unsigned short * GetGradientOpacityTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:270
vtkFixedPointVolumeRayCastMapper::RowBounds
int * RowBounds
Definition: vtkFixedPointVolumeRayCastMapper.h:414
FixedPointVolumeRayCastMapper_CastRays
VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void *arg)
vtkFixedPointVolumeRayCastMapper::MinMaxVolumeSize
int MinMaxVolumeSize[4]
Definition: vtkFixedPointVolumeRayCastMapper.h:529
vtkFixedPointVolumeRayCastMapper::RenderTimeTable
float * RenderTimeTable
Definition: vtkFixedPointVolumeRayCastMapper.h:417
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkX3D::image
Definition: vtkX3D.h:374
vtkFixedPointVolumeRayCastMapper::GradientOpacityRequired
int GradientOpacityRequired
Definition: vtkFixedPointVolumeRayCastMapper.h:474
vtkFixedPointVolumeRayCastMapper::RenderVolumeTable
vtkVolume ** RenderVolumeTable
Definition: vtkFixedPointVolumeRayCastMapper.h:418
vtkFixedPointVolumeRayCastMapper::RayCastImage
vtkFixedPointRayCastImage * RayCastImage
Definition: vtkFixedPointVolumeRayCastMapper.h:412
vtkFixedPointVolumeRayCastMapper::GetDiffuseShadingTable
unsigned short * GetDiffuseShadingTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:274
vtkFixedPointVolumeRayCastMapper::ShiftVectorDown
void ShiftVectorDown(unsigned int in[3], unsigned int out[3])
Definition: vtkFixedPointVolumeRayCastMapper.h:631
vtkFixedPointVolumeRayCastMIPHelper
A helper that generates MIP images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastMIPHelper.h:37
vtkFixedPointVolumeRayCastMapper::LookupAndCombineIndependentColorsUC
void LookupAndCombineIndependentColorsUC(unsigned short *colorTable[4], unsigned short *scalarOpacityTable[4], unsigned short index[4], float weights[4], int components, unsigned char color[4])
Definition: vtkFixedPointVolumeRayCastMapper.h:723
vtkX3D::dir
Definition: vtkX3D.h:324
vtkFixedPointVolumeRayCastMapper::FixedPointCroppingRegionPlanes
unsigned int FixedPointCroppingRegionPlanes[6]
Definition: vtkFixedPointVolumeRayCastMapper.h:500
vtkFixedPointVolumeRayCastMapper::Volume
vtkVolume * Volume
Definition: vtkFixedPointVolumeRayCastMapper.h:480
vtkFixedPointVolumeRayCastMapper::CompositeShadeHelper
vtkFixedPointVolumeRayCastCompositeShadeHelper * CompositeShadeHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:511
vtkFixedPointVolumeRayCastMapper::MinimumImageSampleDistance
float MinimumImageSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:370
vtkFixedPointVolumeRayCastMapper::FixedPointIncrement
void FixedPointIncrement(unsigned int position[3], unsigned int increment[3])
Definition: vtkFixedPointVolumeRayCastMapper.h:588
vtkFiniteDifferenceGradientEstimator
Use finite differences to estimate gradient.
Definition: vtkFiniteDifferenceGradientEstimator.h:45
vtkFixedPointVolumeRayCastMapper::ImageSampleDistance
float ImageSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:369
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
vtkFixedPointVolumeRayCastMapper::ViewToWorldMatrix
vtkMatrix4x4 * ViewToWorldMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:399
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:54
vtkFixedPointVolumeRayCastMapper::TransformedClippingPlanes
float * TransformedClippingPlanes
Definition: vtkFixedPointVolumeRayCastMapper.h:522
vtkColorTransferFunction
Defines a transfer function for mapping a property to an RGB color value.
Definition: vtkColorTransferFunction.h:53
VTKKW_FP_SCALE
#define VTKKW_FP_SCALE
Definition: vtkFixedPointVolumeRayCastMapper.h:65
vtkFixedPointVolumeRayCastMapper::SavedGradientsInput
vtkImageData * SavedGradientsInput
Definition: vtkFixedPointVolumeRayCastMapper.h:441
vtkFixedPointVolumeRayCastCompositeGOShadeHelper
A helper that generates composite images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastCompositeGOShadeHelper.h:39
vtkFixedPointVolumeRayCastMapper::GetRowBounds
int * GetRowBounds()
Definition: vtkFixedPointVolumeRayCastMapper.h:267
vtkFixedPointVolumeRayCastMapper::OldImageSampleDistance
float OldImageSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:377
vtkFixedPointVolumeRayCastMapper::DirectionEncoder
vtkDirectionEncoder * DirectionEncoder
Definition: vtkFixedPointVolumeRayCastMapper.h:464
vtkFixedPointVolumeRayCastMapper::MaximumImageSampleDistance
float MaximumImageSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:371
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkFixedPointVolumeRayCastMapper::NumberOfGradientSlices
int NumberOfGradientSlices
Definition: vtkFixedPointVolumeRayCastMapper.h:462
vtkFixedPointVolumeRayCastMapper::VoxelsToViewMatrix
vtkMatrix4x4 * VoxelsToViewMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:401
vtkFixedPointVolumeRayCastMapper::PerspectiveMatrix
vtkMatrix4x4 * PerspectiveMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:398
vtkFixedPointVolumeRayCastMapper::SavedParametersInput
vtkImageData * SavedParametersInput
Definition: vtkFixedPointVolumeRayCastMapper.h:438
vtkFixedPointVolumeRayCastMapper::NumTransformedClippingPlanes
int NumTransformedClippingPlanes
Definition: vtkFixedPointVolumeRayCastMapper.h:521
vtkFixedPointVolumeRayCastMapper::GetFloatTripleFromPointer
void GetFloatTripleFromPointer(float v[3], float *ptr)
Definition: vtkFixedPointVolumeRayCastMapper.h:617
vtkFixedPointVolumeRayCastMapper::VoxelsToWorldMatrix
vtkMatrix4x4 * VoxelsToWorldMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:403
vtkMultiThreader
A class for performing multithreaded execution.
Definition: vtkMultiThreader.h:77
vtkX3D::position
Definition: vtkX3D.h:261
vtkX3D::color
Definition: vtkX3D.h:221
vtkFixedPointVolumeRayCastMapper::ViewToVoxelsMatrix
vtkMatrix4x4 * ViewToVoxelsMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:400
vtkFixedPointVolumeRayCastMapper::CroppingRegionMask
unsigned int CroppingRegionMask[27]
Definition: vtkFixedPointVolumeRayCastMapper.h:501
vtkEncodedGradientShader
Compute shading tables for encoded normals.
Definition: vtkEncodedGradientShader.h:45
vtkX3D::offset
Definition: vtkX3D.h:438
vtkFixedPointVolumeRayCastMapper::InteractiveSampleDistance
float InteractiveSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:366
vtkVolumeMapper::Render
void Render(vtkRenderer *ren, vtkVolume *vol) override=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection
unsigned int ToFixedPointDirection(float dir)
Definition: vtkFixedPointVolumeRayCastMapper.h:565
vtkFixedPointVolumeRayCastMapper::MinMaxVolumeCache
vtkImageData * MinMaxVolumeCache
Definition: vtkFixedPointVolumeRayCastMapper.h:531
vtkFixedPointVolumeRayCastMapper::FinalColorWindow
float FinalColorWindow
Definition: vtkFixedPointVolumeRayCastMapper.h:538
vtkFixedPointVolumeRayCastMapper::FinalColorLevel
float FinalColorLevel
Definition: vtkFixedPointVolumeRayCastMapper.h:539
vtkFixedPointVolumeRayCastMapper::RenderTableSize
int RenderTableSize
Definition: vtkFixedPointVolumeRayCastMapper.h:420
vtkFixedPointVolumeRayCastMapper::WorldToVoxelsMatrix
vtkMatrix4x4 * WorldToVoxelsMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:402
vtkFixedPointVolumeRayCastMapper::CheckMIPMinMaxVolumeFlag
int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip)
Definition: vtkFixedPointVolumeRayCastMapper.h:651
vtkFixedPointVolumeRayCastMapper::OldSampleDistance
float OldSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:376
vtkVolumeMapper.h
vtkFixedPointVolumeRayCastMapper::IntermixIntersectingGeometry
vtkTypeBool IntermixIntersectingGeometry
Definition: vtkFixedPointVolumeRayCastMapper.h:427
VTKKW_FP_SHIFT
#define VTKKW_FP_SHIFT
Definition: vtkFixedPointVolumeRayCastMapper.h:62
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
vtkVolumeRayCastSpaceLeapingImageFilter
Builds the space leaping data structure.
Definition: vtkVolumeRayCastSpaceLeapingImageFilter.h:40
vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag
int CheckMinMaxVolumeFlag(unsigned int pos[3], int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:639
vtkFixedPointVolumeRayCastMapper::VoxelsTransform
vtkTransform * VoxelsTransform
Definition: vtkFixedPointVolumeRayCastMapper.h:408
vtkFixedPointVolumeRayCastMapper::SavedGradientsMTime
vtkTimeStamp SavedGradientsMTime
Definition: vtkFixedPointVolumeRayCastMapper.h:442
vtkFixedPointVolumeRayCastMapper::GradientShader
vtkEncodedGradientShader * GradientShader
Definition: vtkFixedPointVolumeRayCastMapper.h:466
vtkFixedPointVolumeRayCastMapper::RenderWindow
vtkRenderWindow * RenderWindow
Definition: vtkFixedPointVolumeRayCastMapper.h:479
vtkFixedPointVolumeRayCastMapper::ContiguousGradientMagnitude
unsigned char * ContiguousGradientMagnitude
Definition: vtkFixedPointVolumeRayCastMapper.h:460
vtkFixedPointVolumeRayCastMapper::VoxelsToViewTransform
vtkTransform * VoxelsToViewTransform
Definition: vtkFixedPointVolumeRayCastMapper.h:409
vtkFixedPointVolumeRayCastMapper::CompositeGOHelper
vtkFixedPointVolumeRayCastCompositeGOHelper * CompositeGOHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:510
vtkFixedPointVolumeRayCastMapper::GetScalarOpacityTable
unsigned short * GetScalarOpacityTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:269
vtkFixedPointVolumeRayCastMapper::LookupColorUC
void LookupColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index, unsigned char color[4])
Definition: vtkFixedPointVolumeRayCastMapper.h:678
vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC
void LookupDependentColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index[4], int components, unsigned char color[4])
Definition: vtkFixedPointVolumeRayCastMapper.h:693
vtkFPVRCMSwitchOnDataType
VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void *arg)
vtkFixedPointVolumeRayCastMapper::PerspectiveTransform
vtkTransform * PerspectiveTransform
Definition: vtkFixedPointVolumeRayCastMapper.h:407
VTK_THREAD_RETURN_TYPE
#define VTK_THREAD_RETURN_TYPE
Definition: vtkSystemIncludes.h:135
vtkFixedPointVolumeRayCastMapper::CheckIfCropped
int CheckIfCropped(unsigned int pos[3])
Definition: vtkFixedPointVolumeRayCastMapper.h:748
vtkPiecewiseFunction
Defines a 1D piecewise function.
Definition: vtkPiecewiseFunction.h:45
vtkFixedPointVolumeRayCastMapper::CurrentScalars
vtkDataArray * CurrentScalars
Definition: vtkFixedPointVolumeRayCastMapper.h:476
vtkVolumeMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkVolumeMapper.h:198
vtkFixedPointVolumeRayCastMapper::GetUIntTripleFromPointer
void GetUIntTripleFromPointer(unsigned int v[3], unsigned int *ptr)
Definition: vtkFixedPointVolumeRayCastMapper.h:624
vtkFixedPointVolumeRayCastMapper::FlipMIPComparison
int FlipMIPComparison
Definition: vtkFixedPointVolumeRayCastMapper.h:541
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkTimerLog
Timer support and logging.
Definition: vtkTimerLog.h:85
vtkFixedPointVolumeRayCastMapper::ShadingRequired
int ShadingRequired
Definition: vtkFixedPointVolumeRayCastMapper.h:473
vtkFixedPointVolumeRayCastMapper::MinimumViewDistance
float MinimumViewDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:429
vtkFixedPointVolumeRayCastMapper::ImageDisplayHelper
vtkRayCastImageDisplayHelper * ImageDisplayHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:362
vtkFixedPointVolumeRayCastMapper::SpaceLeapFilter
vtkVolumeRayCastSpaceLeapingImageFilter * SpaceLeapFilter
Definition: vtkFixedPointVolumeRayCastMapper.h:532
vtkFixedPointVolumeRayCastMapper::GetEstimatedRenderTime
float GetEstimatedRenderTime(vtkRenderer *ren, vtkVolume *vol)
Get an estimate of the rendering time for a given volume / renderer.
Definition: vtkFixedPointVolumeRayCastMapper.h:316
vtkFixedPointVolumeRayCastMapper::GetColorTable
unsigned short * GetColorTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:268
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:57
vtkFixedPointVolumeRayCastMapper::RenderTableEntries
int RenderTableEntries
Definition: vtkFixedPointVolumeRayCastMapper.h:421
vtkDirectionEncoder
encode a direction into a one or two byte value
Definition: vtkDirectionEncoder.h:39
vtkFixedPointVolumeRayCastMapper::PreviousScalars
vtkDataArray * PreviousScalars
Definition: vtkFixedPointVolumeRayCastMapper.h:477
vtkFixedPointVolumeRayCastMapper::GradientEstimator
vtkFiniteDifferenceGradientEstimator * GradientEstimator
Definition: vtkFixedPointVolumeRayCastMapper.h:468
vtkFixedPointVolumeRayCastMapper::GradientNormal
unsigned short ** GradientNormal
Definition: vtkFixedPointVolumeRayCastMapper.h:457
vtkVolumeMapper::CroppingRegionFlags
int CroppingRegionFlags
Definition: vtkVolumeMapper.h:279
vtkFixedPointVolumeRayCastCompositeHelper
A helper that generates composite images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastCompositeHelper.h:39
vtkVolumeMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkFixedPointVolumeRayCastMapper::GetVolume
vtkVolume * GetVolume()
Definition: vtkFixedPointVolumeRayCastMapper.h:271
vtkFixedPointVolumeRayCastMapper::LockSampleDistanceToInputSpacing
vtkTypeBool LockSampleDistanceToInputSpacing
Definition: vtkFixedPointVolumeRayCastMapper.h:373
vtkPlaneCollection
maintain a list of planes
Definition: vtkPlaneCollection.h:33
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:81
vtkFixedPointVolumeRayCastCompositeGOHelper
A helper that generates composite images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastCompositeGOHelper.h:39
vtkFixedPointVolumeRayCastMapper::VolumeMatrix
vtkMatrix4x4 * VolumeMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:405
vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition
unsigned int ToFixedPointPosition(float val)
Definition: vtkFixedPointVolumeRayCastMapper.h:553
vtkX3D::index
Definition: vtkX3D.h:246
vtkFixedPointVolumeRayCastMapper::SampleDistance
float SampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:365
vtkFixedPointVolumeRayCastCompositeShadeHelper
A helper that generates composite images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastCompositeShadeHelper.h:39
vtkFixedPointVolumeRayCastMapper::CompositeGOShadeHelper
vtkFixedPointVolumeRayCastCompositeGOShadeHelper * CompositeGOShadeHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:512
vtkFixedPointVolumeRayCastMapper::CompositeHelper
vtkFixedPointVolumeRayCastCompositeHelper * CompositeHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:509
vtkFixedPointVolumeRayCastMapper::GetEstimatedRenderTime
float GetEstimatedRenderTime(vtkRenderer *ren)
Definition: vtkFixedPointVolumeRayCastMapper.h:319
vtkFixedPointVolumeRayCastMapper::MinMaxVolume
unsigned short * MinMaxVolume
Definition: vtkFixedPointVolumeRayCastMapper.h:528
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkFixedPointVolumeRayCastMapper::SavedBlendMode
int SavedBlendMode
Definition: vtkFixedPointVolumeRayCastMapper.h:437
vtkFixedPointVolumeRayCastMapper::SavedSampleDistance
float SavedSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:444
vtkFixedPointVolumeRayCastMapper::GradientMagnitude
unsigned char ** GradientMagnitude
Definition: vtkFixedPointVolumeRayCastMapper.h:458
vtkFixedPointVolumeRayCastMapper::SavedParametersMTime
vtkTimeStamp SavedParametersMTime
Definition: vtkFixedPointVolumeRayCastMapper.h:439