VTK  9.1.0
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 "vtkThreads.h" // for VTK_THREAD_RETURN_TYPE
61 #include "vtkVolumeMapper.h"
62 
63 #define VTKKW_FP_SHIFT 15
64 #define VTKKW_FPMM_SHIFT 17
65 #define VTKKW_FP_MASK 0x7fff
66 #define VTKKW_FP_SCALE 32767.0
67 
68 class vtkMatrix4x4;
69 class vtkMultiThreader;
70 class vtkPlaneCollection;
71 class vtkRenderer;
72 class vtkTimerLog;
73 class vtkVolume;
74 class vtkTransform;
75 class vtkRenderWindow;
89 class vtkDataArray;
90 
91 // Forward declaration needed for use by friend declaration below.
92 VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
93 VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
94 
95 class VTKRENDERINGVOLUME_EXPORT vtkFixedPointVolumeRayCastMapper : public vtkVolumeMapper
96 {
97 public:
100  void PrintSelf(ostream& os, vtkIndent indent) override;
101 
103 
108  vtkSetMacro(SampleDistance, float);
109  vtkGetMacro(SampleDistance, float);
111 
113 
120  vtkSetMacro(InteractiveSampleDistance, float);
121  vtkGetMacro(InteractiveSampleDistance, float);
123 
125 
132  vtkSetClampMacro(ImageSampleDistance, float, 0.1f, 100.0f);
133  vtkGetMacro(ImageSampleDistance, float);
135 
137 
141  vtkSetClampMacro(MinimumImageSampleDistance, float, 0.1f, 100.0f);
142  vtkGetMacro(MinimumImageSampleDistance, float);
144 
146 
150  vtkSetClampMacro(MaximumImageSampleDistance, float, 0.1f, 100.0f);
151  vtkGetMacro(MaximumImageSampleDistance, float);
153 
155 
164  vtkSetClampMacro(AutoAdjustSampleDistances, vtkTypeBool, 0, 1);
165  vtkGetMacro(AutoAdjustSampleDistances, vtkTypeBool);
166  vtkBooleanMacro(AutoAdjustSampleDistances, vtkTypeBool);
168 
170 
178  vtkSetClampMacro(LockSampleDistanceToInputSpacing, vtkTypeBool, 0, 1);
179  vtkGetMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
180  vtkBooleanMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
182 
184 
189  void SetNumberOfThreads(int num);
192 
194 
198  vtkSetClampMacro(IntermixIntersectingGeometry, vtkTypeBool, 0, 1);
199  vtkGetMacro(IntermixIntersectingGeometry, vtkTypeBool);
200  vtkBooleanMacro(IntermixIntersectingGeometry, vtkTypeBool);
202 
204 
211  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren);
212  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren, vtkVolume* vol);
214 
219  void Render(vtkRenderer*, vtkVolume*) override;
220 
221  unsigned int ToFixedPointPosition(float val);
222  void ToFixedPointPosition(float in[3], unsigned int out[3]);
223  unsigned int ToFixedPointDirection(float dir);
224  void ToFixedPointDirection(float in[3], unsigned int out[3]);
225  void FixedPointIncrement(unsigned int position[3], unsigned int increment[3]);
226  void GetFloatTripleFromPointer(float v[3], float* ptr);
227  void GetUIntTripleFromPointer(unsigned int v[3], unsigned int* ptr);
228  void ShiftVectorDown(unsigned int in[3], unsigned int out[3]);
229  int CheckMinMaxVolumeFlag(unsigned int pos[3], int c);
230  int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip);
231 
232  void LookupColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
233  unsigned short index, unsigned char color[4]);
234  void LookupDependentColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
235  unsigned short index[4], int components, unsigned char color[4]);
236  void LookupAndCombineIndependentColorsUC(unsigned short* colorTable[4],
237  unsigned short* scalarOpacityTable[4], unsigned short index[4], float weights[4],
238  int components, unsigned char color[4]);
239  int CheckIfCropped(unsigned int pos[3]);
240 
241  vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
242  vtkGetObjectMacro(MIPHelper, vtkFixedPointVolumeRayCastMIPHelper);
243  vtkGetObjectMacro(CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper);
244  vtkGetObjectMacro(CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper);
245  vtkGetObjectMacro(CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper);
246  vtkGetObjectMacro(CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper);
247  vtkGetVectorMacro(TableShift, float, 4);
248  vtkGetVectorMacro(TableScale, float, 4);
249  vtkGetMacro(ShadingRequired, int);
250  vtkGetMacro(GradientOpacityRequired, int);
251 
252  vtkGetObjectMacro(CurrentScalars, vtkDataArray);
253  vtkGetObjectMacro(PreviousScalars, vtkDataArray);
254 
255  int* GetRowBounds() { return this->RowBounds; }
256  unsigned short* GetColorTable(int c) { return this->ColorTable[c]; }
257  unsigned short* GetScalarOpacityTable(int c) { return this->ScalarOpacityTable[c]; }
258  unsigned short* GetGradientOpacityTable(int c) { return this->GradientOpacityTable[c]; }
259  vtkVolume* GetVolume() { return this->Volume; }
260  unsigned short** GetGradientNormal() { return this->GradientNormal; }
261  unsigned char** GetGradientMagnitude() { return this->GradientMagnitude; }
262  unsigned short* GetDiffuseShadingTable(int c) { return this->DiffuseShadingTable[c]; }
263  unsigned short* GetSpecularShadingTable(int c) { return this->SpecularShadingTable[c]; }
264 
266  int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int* numSteps);
267 
269 
271 
273 
279  vtkGetObjectMacro(RayCastImage, vtkFixedPointRayCastImage);
281 
282  int PerImageInitialization(vtkRenderer*, vtkVolume*, int, double*, double*, int*);
287  void AbortRender();
288 
289  void CreateCanonicalView(vtkVolume* volume, vtkImageData* image, int blend_mode,
290  double viewDirection[3], double viewUp[3]);
291 
299  {
300  return this->RetrieveRenderTime(ren, vol);
301  }
302  float GetEstimatedRenderTime(vtkRenderer* ren) { return this->RetrieveRenderTime(ren); }
303 
305 
318  vtkSetMacro(FinalColorWindow, float);
319  vtkGetMacro(FinalColorWindow, float);
320  vtkSetMacro(FinalColorLevel, float);
321  vtkGetMacro(FinalColorLevel, float);
323 
324  // Here to be used by the mapper to tell the helper
325  // to flip the MIP comparison in order to support
326  // minimum intensity blending
327  vtkGetMacro(FlipMIPComparison, int);
328 
336 
337 protected:
340 
341  // The helper class that displays the image
343 
344  // The distance between sample points along the ray
347 
348  // The distance between rays in the image
354 
355  // Saved values used to restore
358 
359  // Internal method for computing matrices needed during
360  // ray casting
361  void ComputeMatrices(double inputOrigin[3], double inputSpacing[3], int inputExtent[6],
362  vtkRenderer* ren, vtkVolume* vol);
363 
364  int ComputeRowBounds(vtkRenderer* ren, int imageFlag, int rowBoundsFlag, int inputExtent[6]);
365 
367 
368  friend VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
369  friend VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
370 
372 
379 
381 
385 
386  // This object encapsulated the image and all related information
388 
389  int* RowBounds;
391 
397 
398  void StoreRenderTime(vtkRenderer* ren, vtkVolume* vol, float t);
401 
403 
405 
406  vtkColorTransferFunction* SavedRGBFunction[4];
407  vtkPiecewiseFunction* SavedGrayFunction[4];
408  vtkPiecewiseFunction* SavedScalarOpacityFunction[4];
409  vtkPiecewiseFunction* SavedGradientOpacityFunction[4];
410  int SavedColorChannels[4];
411  float SavedScalarOpacityDistance[4];
415 
418 
420 
421  unsigned short ColorTable[4][32768 * 3];
422  unsigned short ScalarOpacityTable[4][32768];
423  unsigned short GradientOpacityTable[4][256];
424  int TableSize[4];
425  float TableScale[4];
426  float TableShift[4];
427 
428  float GradientMagnitudeScale[4];
429  float GradientMagnitudeShift[4];
430 
431  unsigned short** GradientNormal;
432  unsigned char** GradientMagnitude;
433  unsigned short* ContiguousGradientNormal;
435 
437 
439 
441 
443 
444  unsigned short DiffuseShadingTable[4][65536 * 3];
445  unsigned short SpecularShadingTable[4][65536 * 3];
446 
449 
452 
455 
457  double rayStart[3], double rayEnd[3], float rayDirection[3], double bounds[6]);
458 
463 
465 
467  double rayStart[3], double rayEnd[3], int numClippingPlanes, float* clippingPlanes);
468 
469  unsigned int FixedPointCroppingRegionPlanes[6];
470  unsigned int CroppingRegionMask[27];
471 
472  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
473  // are indexing into the ImageInUse image. This must be converted to
474  // the zbuffer image coordinates. Nearest neighbor value is returned.
475  float GetZBufferValue(int x, int y);
476 
482 
483  // Some variables used for ray computation
484  float ViewToVoxelsArray[16];
485  float WorldToVoxelsArray[16];
486  float VoxelsToWorldArray[16];
487 
488  double CroppingBounds[6];
489 
492 
493  double SavedSpacing[3];
494 
495  // Min Max structure used to do space leaping
496  unsigned short* MinMaxVolume;
497  int MinMaxVolumeSize[4];
501 
503  void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3]);
504 
507 
509 
511 
512 private:
514  void operator=(const vtkFixedPointVolumeRayCastMapper&) = delete;
515 
516  bool ThreadWarning;
517 };
518 
520 {
521  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
522 }
523 
524 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition(float in[3], unsigned int out[3])
525 {
526  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
527  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
528  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
529 }
530 
532 {
533  return ((dir < 0.0) ? (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5))
534  : (0x80000000 + static_cast<unsigned int>(dir * VTKKW_FP_SCALE + 0.5)));
535 }
536 
538  float in[3], unsigned int out[3])
539 {
540  out[0] = ((in[0] < 0.0) ? (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5))
541  : (0x80000000 + static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5)));
542  out[1] = ((in[1] < 0.0) ? (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5))
543  : (0x80000000 + static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5)));
544  out[2] = ((in[2] < 0.0) ? (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5))
545  : (0x80000000 + static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5)));
546 }
547 
549  unsigned int position[3], unsigned int increment[3])
550 {
551  if (increment[0] & 0x80000000)
552  {
553  position[0] += (increment[0] & 0x7fffffff);
554  }
555  else
556  {
557  position[0] -= increment[0];
558  }
559  if (increment[1] & 0x80000000)
560  {
561  position[1] += (increment[1] & 0x7fffffff);
562  }
563  else
564  {
565  position[1] -= increment[1];
566  }
567  if (increment[2] & 0x80000000)
568  {
569  position[2] += (increment[2] & 0x7fffffff);
570  }
571  else
572  {
573  position[2] -= increment[2];
574  }
575 }
576 
578 {
579  v[0] = *(ptr);
580  v[1] = *(ptr + 1);
581  v[2] = *(ptr + 2);
582 }
583 
585  unsigned int v[3], unsigned int* ptr)
586 {
587  v[0] = *(ptr);
588  v[1] = *(ptr + 1);
589  v[2] = *(ptr + 2);
590 }
591 
593  unsigned int in[3], unsigned int out[3])
594 {
595  out[0] = in[0] >> VTKKW_FP_SHIFT;
596  out[1] = in[1] >> VTKKW_FP_SHIFT;
597  out[2] = in[2] >> VTKKW_FP_SHIFT;
598 }
599 
600 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag(unsigned int mmpos[3], int c)
601 {
602  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
603  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
604  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
605  static_cast<vtkIdType>(c);
606 
607  return ((*(this->MinMaxVolume + 3 * offset + 2)) & 0x00ff);
608 }
609 
611  unsigned int mmpos[3], int c, unsigned short maxIdx, int flip)
612 {
613  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
614  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
615  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
616  static_cast<vtkIdType>(c);
617 
618  if ((*(this->MinMaxVolume + 3 * offset + 2) & 0x00ff))
619  {
620  if (flip)
621  {
622  return (*(this->MinMaxVolume + 3 * offset) < maxIdx);
623  }
624  else
625  {
626  return (*(this->MinMaxVolume + 3 * offset + 1) > maxIdx);
627  }
628  }
629  else
630  {
631  return 0;
632  }
633 }
634 
635 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC(unsigned short* colorTable,
636  unsigned short* scalarOpacityTable, unsigned short index, unsigned char color[4])
637 {
638  unsigned short alpha = scalarOpacityTable[index];
639  color[0] = static_cast<unsigned char>(
640  (colorTable[3 * index] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
641  color[1] = static_cast<unsigned char>(
642  (colorTable[3 * index + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
643  color[2] = static_cast<unsigned char>(
644  (colorTable[3 * index + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
645  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
646 }
647 
648 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC(unsigned short* colorTable,
649  unsigned short* scalarOpacityTable, unsigned short index[4], int components,
650  unsigned char color[4])
651 {
652  unsigned short alpha;
653  switch (components)
654  {
655  case 2:
656  alpha = scalarOpacityTable[index[1]];
657  color[0] = static_cast<unsigned char>(
658  (colorTable[3 * index[0]] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
659  color[1] = static_cast<unsigned char>(
660  (colorTable[3 * index[0] + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
661  color[2] = static_cast<unsigned char>(
662  (colorTable[3 * index[0] + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
663  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
664  break;
665  case 4:
666  alpha = scalarOpacityTable[index[3]];
667  color[0] = static_cast<unsigned char>((index[0] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
668  color[1] = static_cast<unsigned char>((index[1] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
669  color[2] = static_cast<unsigned char>((index[2] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
670  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
671  break;
672  }
673 }
674 
676  unsigned short* colorTable[4], unsigned short* scalarOpacityTable[4], unsigned short index[4],
677  float weights[4], int components, unsigned char color[4])
678 {
679  unsigned int tmp[4] = { 0, 0, 0, 0 };
680 
681  for (int i = 0; i < components; i++)
682  {
683  unsigned short alpha =
684  static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]]) * weights[i]);
685  tmp[0] += static_cast<unsigned char>(
686  ((colorTable[i][3 * index[i]]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
687  tmp[1] += static_cast<unsigned char>(
688  ((colorTable[i][3 * index[i] + 1]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
689  tmp[2] += static_cast<unsigned char>(
690  ((colorTable[i][3 * index[i] + 2]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
691  tmp[3] += static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
692  }
693 
694  color[0] = static_cast<unsigned char>((tmp[0] > 255) ? (255) : (tmp[0]));
695  color[1] = static_cast<unsigned char>((tmp[1] > 255) ? (255) : (tmp[1]));
696  color[2] = static_cast<unsigned char>((tmp[2] > 255) ? (255) : (tmp[2]));
697  color[3] = static_cast<unsigned char>((tmp[3] > 255) ? (255) : (tmp[3]));
698 }
699 
701 {
702  int idx;
703 
704  if (pos[2] < this->FixedPointCroppingRegionPlanes[4])
705  {
706  idx = 0;
707  }
708  else if (pos[2] > this->FixedPointCroppingRegionPlanes[5])
709  {
710  idx = 18;
711  }
712  else
713  {
714  idx = 9;
715  }
716 
717  if (pos[1] >= this->FixedPointCroppingRegionPlanes[2])
718  {
719  if (pos[1] > this->FixedPointCroppingRegionPlanes[3])
720  {
721  idx += 6;
722  }
723  else
724  {
725  idx += 3;
726  }
727  }
728 
729  if (pos[0] >= this->FixedPointCroppingRegionPlanes[0])
730  {
731  if (pos[0] > this->FixedPointCroppingRegionPlanes[1])
732  {
733  idx += 2;
734  }
735  else
736  {
737  idx += 1;
738  }
739  }
740 
741  return !(static_cast<unsigned int>(this->CroppingRegionFlags) & this->CroppingRegionMask[idx]);
742 }
743 
744 #endif
Defines a transfer function for mapping a property to an RGB color value.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
encode a direction into a one or two byte value
Compute shading tables for encoded normals.
Use finite differences to estimate gradient.
helper class for a ray cast image
A helper that generates composite images for the volume ray cast mapper.
A helper that generates composite images for the volume ray cast mapper.
A helper that generates composite images for the volume ray cast mapper.
A helper that generates composite images for the volume ray cast mapper.
A helper that generates MIP images for the volume ray cast mapper.
void SetRayCastImage(vtkFixedPointRayCastImage *)
Set / Get the underlying image object.
vtkRayCastImageDisplayHelper * ImageDisplayHelper
vtkFixedPointVolumeRayCastMIPHelper * MIPHelper
vtkFixedPointVolumeRayCastCompositeGOHelper * CompositeGOHelper
int ShouldUseNearestNeighborInterpolation(vtkVolume *vol)
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
float RetrieveRenderTime(vtkRenderer *ren)
void GetFloatTripleFromPointer(float v[3], float *ptr)
void CaptureZBuffer(vtkRenderer *ren)
float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer *ren)
What is the image sample distance required to achieve the desired time? A version of this method is p...
void ComputeRayInfo(int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int *numSteps)
vtkFixedPointVolumeRayCastCompositeShadeHelper * CompositeShadeHelper
void StoreRenderTime(vtkRenderer *ren, vtkVolume *vol, float t)
vtkFiniteDifferenceGradientEstimator * GradientEstimator
vtkFixedPointVolumeRayCastCompositeGOShadeHelper * CompositeGOShadeHelper
int ComputeRowBounds(vtkRenderer *ren, int imageFlag, int rowBoundsFlag, int inputExtent[6])
float GetZBufferValue(int x, int y)
void DisplayRenderedImage(vtkRenderer *, vtkVolume *)
void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3])
void InitializeRayInfo(vtkVolume *vol)
void SetNumberOfThreads(int num)
Set/Get the number of threads to use.
void Render(vtkRenderer *, vtkVolume *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Initialize rendering for this volume.
void ComputeGradients(vtkVolume *vol)
int UpdateShadingTable(vtkRenderer *ren, vtkVolume *vol)
void GetUIntTripleFromPointer(unsigned int v[3], unsigned int *ptr)
float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer *ren, vtkVolume *vol)
What is the image sample distance required to achieve the desired time? A version of this method is p...
float GetEstimatedRenderTime(vtkRenderer *ren, vtkVolume *vol)
Get an estimate of the rendering time for a given volume / renderer.
float RetrieveRenderTime(vtkRenderer *ren, vtkVolume *vol)
int CheckMinMaxVolumeFlag(unsigned int pos[3], int c)
vtkFixedPointVolumeRayCastCompositeHelper * CompositeHelper
int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip)
friend VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void *arg)
void PerSubVolumeInitialization(vtkRenderer *, vtkVolume *, int)
void ComputeMatrices(double inputOrigin[3], double inputSpacing[3], int inputExtent[6], vtkRenderer *ren, vtkVolume *vol)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void LookupColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index, unsigned char color[4])
void FixedPointIncrement(unsigned int position[3], unsigned int increment[3])
void LookupAndCombineIndependentColorsUC(unsigned short *colorTable[4], unsigned short *scalarOpacityTable[4], unsigned short index[4], float weights[4], int components, unsigned char color[4])
vtkVolumeRayCastSpaceLeapingImageFilter * SpaceLeapFilter
void PerVolumeInitialization(vtkRenderer *, vtkVolume *)
static vtkFixedPointVolumeRayCastMapper * New()
int ClipRayAgainstVolume(double rayStart[3], double rayEnd[3], float rayDirection[3], double bounds[6])
void CreateCanonicalView(vtkVolume *volume, vtkImageData *image, int blend_mode, double viewDirection[3], double viewUp[3])
int PerImageInitialization(vtkRenderer *, vtkVolume *, int, double *, double *, int *)
void UpdateMinMaxVolume(vtkVolume *vol)
friend VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void *arg)
void ShiftVectorDown(unsigned int in[3], unsigned int out[3])
int UpdateColorTable(vtkVolume *vol)
int ClipRayAgainstClippingPlanes(double rayStart[3], double rayEnd[3], int numClippingPlanes, float *clippingPlanes)
int GetNumberOfThreads()
Set/Get the number of threads to use.
int UpdateGradients(vtkVolume *vol)
void LookupDependentColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index[4], int components, unsigned char color[4])
topologically and geometrically regular array of data
Definition: vtkImageData.h:48
a simple class to control print indentation
Definition: vtkIndent.h:34
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:36
A class for performing multithreaded execution.
Defines a 1D piecewise function.
maintain a list of planes
helper class that draws the image to the screen
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:64
record modification and/or execution time
Definition: vtkTimeStamp.h:33
Timer support and logging.
Definition: vtkTimerLog.h:90
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:55
Abstract class for a volume mapper.
int CroppingRegionFlags
Cropping variables, and a method for converting the world coordinate cropping region planes to voxel ...
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:45
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
@ dir
Definition: vtkX3D.h:330
@ alpha
Definition: vtkX3D.h:256
@ color
Definition: vtkX3D.h:227
@ image
Definition: vtkX3D.h:380
@ position
Definition: vtkX3D.h:267
@ index
Definition: vtkX3D.h:252
@ offset
Definition: vtkX3D.h:444
int vtkTypeBool
Definition: vtkABI.h:69
#define VTKKW_FP_SCALE
#define VTKKW_FP_SHIFT
VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void *arg)
VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void *arg)
int vtkIdType
Definition: vtkType.h:332