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 =========================================================================*/
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 
343  virtual void ReleaseGraphicsResources(vtkWindow *);
344 
345 protected:
348 
349  // The helper class that displays the image
351 
352  // The distance between sample points along the ray
355 
356  // The distance between rays in the image
362 
363  // Saved values used to restore
366 
367  // Internal method for computing matrices needed during
368  // ray casting
369  void ComputeMatrices( double volumeOrigin[3],
370  double volumeSpacing[3],
371  int volumeExtent[6],
372  vtkRenderer *ren,
373  vtkVolume *vol );
374 
375  int ComputeRowBounds( vtkRenderer *ren,
376  int imageFlag, int rowBoundsFlag,
377  int volumeExtent[6]);
378 
379  void CaptureZBuffer( vtkRenderer *ren );
380 
383 
385 
392 
394 
398 
399  // This object encapsulated the image and all related information
401 
402  int *RowBounds;
404 
410 
411  void StoreRenderTime( vtkRenderer *ren, vtkVolume *vol, float t );
412  float RetrieveRenderTime( vtkRenderer *ren, vtkVolume *vol );
413  float RetrieveRenderTime( vtkRenderer *ren );
414 
416 
418 
419  vtkColorTransferFunction *SavedRGBFunction[4];
420  vtkPiecewiseFunction *SavedGrayFunction[4];
421  vtkPiecewiseFunction *SavedScalarOpacityFunction[4];
422  vtkPiecewiseFunction *SavedGradientOpacityFunction[4];
423  int SavedColorChannels[4];
424  float SavedScalarOpacityDistance[4];
428 
431 
433 
434 
435  unsigned short ColorTable[4][32768*3];
436  unsigned short ScalarOpacityTable[4][32768];
437  unsigned short GradientOpacityTable[4][256];
438  int TableSize[4];
439  float TableScale[4];
440  float TableShift[4];
441 
442  float GradientMagnitudeScale[4];
443  float GradientMagnitudeShift[4];
444 
445  unsigned short **GradientNormal;
446  unsigned char **GradientMagnitude;
447  unsigned short *ContiguousGradientNormal;
449 
451 
453 
455 
457 
458  unsigned short DiffuseShadingTable [4][65536*3];
459  unsigned short SpecularShadingTable[4][65536*3];
460 
463 
466 
469 
470  int ClipRayAgainstVolume( float rayStart[3],
471  float rayEnd[3],
472  float rayDirection[3],
473  double bounds[6] );
474 
475  int UpdateColorTable( vtkVolume *vol );
476  int UpdateGradients( vtkVolume *vol );
477  int UpdateShadingTable( vtkRenderer *ren,
478  vtkVolume *vol );
479  void UpdateCroppingRegions();
480 
481  void ComputeGradients( vtkVolume *vol );
482 
483  int ClipRayAgainstClippingPlanes( float rayStart[3],
484  float rayEnd[3],
485  int numClippingPlanes,
486  float *clippingPlanes );
487 
488  unsigned int FixedPointCroppingRegionPlanes[6];
489  unsigned int CroppingRegionMask[27];
490 
491  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
492  // are indexing into the ImageInUse image. This must be converted to
493  // the zbuffer image coordinates. Nearest neighbor value is returned.
494  float GetZBufferValue( int x, int y );
495 
501 
502  // Some variables used for ray computation
503  float ViewToVoxelsArray[16];
504  float WorldToVoxelsArray[16];
505  float VoxelsToWorldArray[16];
506 
507  double CroppingBounds[6];
508 
511 
512  double SavedSpacing[3];
513 
514 
515  // Min Max structure used to do space leaping
516  unsigned short *MinMaxVolume;
517  int MinMaxVolumeSize[4];
521 
522  void UpdateMinMaxVolume( vtkVolume *vol );
523  void FillInMaxGradientMagnitudes( int fullDim[3],
524  int smallDim[3] );
525 
528 
530 
531  void ApplyFinalColorWindowLevel();
532 
533 private:
535  void operator=(const vtkFixedPointVolumeRayCastMapper&); // Not implemented.
536 
537  bool ThreadWarning;
538 };
539 
540 
542 {
543  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
544 }
545 
546 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition( float in[3], unsigned int out[3] )
547 {
548  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
549  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
550  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
551 }
552 
554 {
555  return ((dir<0.0)?
556  (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5)):
557  (0x80000000+static_cast<unsigned int>(dir*VTKKW_FP_SCALE + 0.5)));
558 }
559 
560 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection( float in[3], unsigned int out[3] )
561 {
562  out[0] = ((in[0]<0.0)?
563  (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5)):
564  (0x80000000+
565  static_cast<unsigned int>(in[0]*VTKKW_FP_SCALE + 0.5)));
566  out[1] = ((in[1]<0.0)?
567  (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5)):
568  (0x80000000+
569  static_cast<unsigned int>(in[1]*VTKKW_FP_SCALE + 0.5)));
570  out[2] = ((in[2]<0.0)?
571  (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5)):
572  (0x80000000+
573  static_cast<unsigned int>(in[2]*VTKKW_FP_SCALE + 0.5)));
574 }
575 
576 inline void vtkFixedPointVolumeRayCastMapper::FixedPointIncrement( unsigned int position[3], unsigned int increment[3] )
577 {
578  if ( increment[0]&0x80000000 )
579  {
580  position[0] += (increment[0]&0x7fffffff);
581  }
582  else
583  {
584  position[0] -= increment[0];
585  }
586  if ( increment[1]&0x80000000 )
587  {
588  position[1] += (increment[1]&0x7fffffff);
589  }
590  else
591  {
592  position[1] -= increment[1];
593  }
594  if ( increment[2]&0x80000000 )
595  {
596  position[2] += (increment[2]&0x7fffffff);
597  }
598  else
599  {
600  position[2] -= increment[2];
601  }
602 }
603 
604 
606 {
607  v[0] = *(ptr);
608  v[1] = *(ptr+1);
609  v[2] = *(ptr+2);
610 }
611 
612 inline void vtkFixedPointVolumeRayCastMapper::GetUIntTripleFromPointer( unsigned int v[3], unsigned int *ptr )
613 {
614  v[0] = *(ptr);
615  v[1] = *(ptr+1);
616  v[2] = *(ptr+2);
617 }
618 
620  unsigned int out[3] )
621 {
622  out[0] = in[0] >> VTKKW_FP_SHIFT;
623  out[1] = in[1] >> VTKKW_FP_SHIFT;
624  out[2] = in[2] >> VTKKW_FP_SHIFT;
625 }
626 
627 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag( unsigned int mmpos[3], int c )
628 {
629  vtkIdType offset =
630  static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
631  ( mmpos[2]*static_cast<vtkIdType>(
632  this->MinMaxVolumeSize[0]*this->MinMaxVolumeSize[1]) +
633  mmpos[1]*static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) +
634  mmpos[0] ) + static_cast<vtkIdType>(c);
635 
636  return ((*(this->MinMaxVolume + 3*offset + 2))&0x00ff);
637 }
638 
639 inline int vtkFixedPointVolumeRayCastMapper::CheckMIPMinMaxVolumeFlag( unsigned int mmpos[3], int c,
640  unsigned short maxIdx, int flip )
641 {
642  vtkIdType offset =
643  static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
644  ( mmpos[2]*static_cast<vtkIdType>(
645  this->MinMaxVolumeSize[0]*this->MinMaxVolumeSize[1]) +
646  mmpos[1]*static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) +
647  mmpos[0] ) + static_cast<vtkIdType>(c);
648 
649  if ( (*(this->MinMaxVolume + 3*offset + 2)&0x00ff) )
650  {
651  if (flip)
652  {
653  return ( *(this->MinMaxVolume + 3*offset) < maxIdx );
654  }
655  else
656  {
657  return ( *(this->MinMaxVolume + 3*offset + 1) > maxIdx );
658  }
659  }
660  else
661  {
662  return 0;
663  }
664 }
665 
666 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC( unsigned short *colorTable,
667  unsigned short *scalarOpacityTable,
668  unsigned short index,
669  unsigned char color[4] )
670 {
671  unsigned short alpha = scalarOpacityTable[index];
672  color[0] = static_cast<unsigned char>
673  ((colorTable[3*index ]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
674  color[1] = static_cast<unsigned char>
675  ((colorTable[3*index+1]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
676  color[2] = static_cast<unsigned char>
677  ((colorTable[3*index+2]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
678  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
679 }
680 
681 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC( unsigned short *colorTable,
682  unsigned short *scalarOpacityTable,
683  unsigned short index[4],
684  int components,
685  unsigned char color[4] )
686 {
687  unsigned short alpha;
688  switch ( components )
689  {
690  case 2:
691  alpha = scalarOpacityTable[index[1]];
692  color[0] = static_cast<unsigned char>
693  ((colorTable[3*index[0] ]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
694  color[1] = static_cast<unsigned char>
695  ((colorTable[3*index[0]+1]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
696  color[2] = static_cast<unsigned char>
697  ((colorTable[3*index[0]+2]*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
698  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
699  break;
700  case 4:
701  alpha = scalarOpacityTable[index[3]];
702  color[0] = static_cast<unsigned char>((index[0]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
703  color[1] = static_cast<unsigned char>((index[1]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
704  color[2] = static_cast<unsigned char>((index[2]*alpha + 0x7fff)>>VTKKW_FP_SHIFT );
705  color[3] = static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
706  break;
707  }
708 }
709 
710 
712  unsigned short *scalarOpacityTable[4],
713  unsigned short index[4],
714  float weights[4],
715  int components,
716  unsigned char color[4] )
717 {
718  unsigned int tmp[4] = {0,0,0,0};
719 
720  for ( int i = 0; i < components; i++ )
721  {
722  unsigned short alpha = static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]])*weights[i]);
723  tmp[0] += static_cast<unsigned char>(((colorTable[i][3*index[i] ])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
724  tmp[1] += static_cast<unsigned char>(((colorTable[i][3*index[i]+1])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
725  tmp[2] += static_cast<unsigned char>(((colorTable[i][3*index[i]+2])*alpha + 0x7fff)>>(2*VTKKW_FP_SHIFT - 8));
726  tmp[3] += static_cast<unsigned char>(alpha>>(VTKKW_FP_SHIFT - 8));
727  }
728 
729  color[0] = static_cast<unsigned char>((tmp[0]>255)?(255):(tmp[0]));
730  color[1] = static_cast<unsigned char>((tmp[1]>255)?(255):(tmp[1]));
731  color[2] = static_cast<unsigned char>((tmp[2]>255)?(255):(tmp[2]));
732  color[3] = static_cast<unsigned char>((tmp[3]>255)?(255):(tmp[3]));
733 
734 }
735 
736 inline int vtkFixedPointVolumeRayCastMapper::CheckIfCropped( unsigned int pos[3] )
737 {
738  int idx;
739 
740  if ( pos[2] < this->FixedPointCroppingRegionPlanes[4] )
741  {
742  idx = 0;
743  }
744  else if ( pos[2] > this->FixedPointCroppingRegionPlanes[5] )
745  {
746  idx = 18;
747  }
748  else
749  {
750  idx = 9;
751  }
752 
753  if ( pos[1] >= this->FixedPointCroppingRegionPlanes[2] )
754  {
755  if ( pos[1] > this->FixedPointCroppingRegionPlanes[3] )
756  {
757  idx += 6;
758  }
759  else
760  {
761  idx += 3;
762  }
763  }
764 
765  if ( pos[0] >= this->FixedPointCroppingRegionPlanes[0] )
766  {
767  if ( pos[0] > this->FixedPointCroppingRegionPlanes[1] )
768  {
769  idx += 2;
770  }
771  else
772  {
773  idx += 1;
774  }
775  }
776 
777  return !(static_cast<unsigned int>(this->CroppingRegionFlags)
778  &this->CroppingRegionMask[idx]);
779 }
780 
781 #endif
void ShiftVectorDown(unsigned int in[3], unsigned int out[3])
vtkFixedPointVolumeRayCastMIPHelper * MIPHelper
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.
void FixedPointIncrement(unsigned int position[3], unsigned int increment[3])
Use finite differences to estimate gradient.
Defines a 1D piecewise function.
void PrintSelf(ostream &os, vtkIndent indent)
#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
VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void *arg)
abstract specification for renderers
Definition: vtkRenderer.h:62
void GetUIntTripleFromPointer(unsigned int v[3], unsigned int *ptr)
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
int vtkIdType
Definition: vtkType.h:247
A helper that generates MIP images for the volume ray cast mapper.
helper class that draws the image to the screen
#define VTKKW_FP_SCALE
Timer support and logging.
Definition: vtkTimerLog.h:81
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
vtkFixedPointVolumeRayCastCompositeGOHelper * CompositeGOHelper
a simple class to control print indentation
Definition: vtkIndent.h:38
float GetEstimatedRenderTime(vtkRenderer *ren, vtkVolume *vol)
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:54
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)
void LookupColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index, unsigned char color[4])
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkFixedPointVolumeRayCastCompositeGOShadeHelper * CompositeGOShadeHelper
static vtkAlgorithm * New()
vtkRayCastImageDisplayHelper * ImageDisplayHelper
#define VTKKW_FP_SHIFT
vtkFiniteDifferenceGradientEstimator * GradientEstimator
void GetFloatTripleFromPointer(float v[3], float *ptr)
helper class for a ray cast image