VTK  9.3.0
vtkFixedPointVolumeRayCastMapper.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
62 #ifndef vtkFixedPointVolumeRayCastMapper_h
63 #define vtkFixedPointVolumeRayCastMapper_h
64 
65 #include "vtkRenderingVolumeModule.h" // For export macro
66 #include "vtkThreads.h" // for VTK_THREAD_RETURN_TYPE
67 #include "vtkVolumeMapper.h"
68 
69 #define VTKKW_FP_SHIFT 15
70 #define VTKKW_FPMM_SHIFT 17
71 #define VTKKW_FP_MASK 0x7fff
72 #define VTKKW_FP_SCALE 32767.0
73 
74 VTK_ABI_NAMESPACE_BEGIN
75 class vtkMatrix4x4;
76 class vtkMultiThreader;
77 class vtkPlaneCollection;
78 class vtkRenderer;
79 class vtkTimerLog;
80 class vtkVolume;
81 class vtkTransform;
82 class vtkRenderWindow;
96 class vtkDataArray;
97 
98 // Forward declaration needed for use by friend declaration below.
99 VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
100 VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
101 
102 class VTKRENDERINGVOLUME_EXPORT vtkFixedPointVolumeRayCastMapper : public vtkVolumeMapper
103 {
104 public:
107  void PrintSelf(ostream& os, vtkIndent indent) override;
108 
110 
115  vtkSetMacro(SampleDistance, float);
116  vtkGetMacro(SampleDistance, float);
118 
120 
127  vtkSetMacro(InteractiveSampleDistance, float);
128  vtkGetMacro(InteractiveSampleDistance, float);
130 
132 
139  vtkSetClampMacro(ImageSampleDistance, float, 0.1f, 100.0f);
140  vtkGetMacro(ImageSampleDistance, float);
142 
144 
148  vtkSetClampMacro(MinimumImageSampleDistance, float, 0.1f, 100.0f);
149  vtkGetMacro(MinimumImageSampleDistance, float);
151 
153 
157  vtkSetClampMacro(MaximumImageSampleDistance, float, 0.1f, 100.0f);
158  vtkGetMacro(MaximumImageSampleDistance, float);
160 
162 
171  vtkSetClampMacro(AutoAdjustSampleDistances, vtkTypeBool, 0, 1);
172  vtkGetMacro(AutoAdjustSampleDistances, vtkTypeBool);
173  vtkBooleanMacro(AutoAdjustSampleDistances, vtkTypeBool);
175 
177 
185  vtkSetClampMacro(LockSampleDistanceToInputSpacing, vtkTypeBool, 0, 1);
186  vtkGetMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
187  vtkBooleanMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
189 
191 
196  void SetNumberOfThreads(int num);
199 
201 
205  vtkSetClampMacro(IntermixIntersectingGeometry, vtkTypeBool, 0, 1);
206  vtkGetMacro(IntermixIntersectingGeometry, vtkTypeBool);
207  vtkBooleanMacro(IntermixIntersectingGeometry, vtkTypeBool);
209 
211 
218  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren);
219  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren, vtkVolume* vol);
221 
226  void Render(vtkRenderer*, vtkVolume*) override;
227 
228  unsigned int ToFixedPointPosition(float val);
229  void ToFixedPointPosition(float in[3], unsigned int out[3]);
230  unsigned int ToFixedPointDirection(float dir);
231  void ToFixedPointDirection(float in[3], unsigned int out[3]);
232  void FixedPointIncrement(unsigned int position[3], unsigned int increment[3]);
233  void GetFloatTripleFromPointer(float v[3], float* ptr);
234  void GetUIntTripleFromPointer(unsigned int v[3], unsigned int* ptr);
235  void ShiftVectorDown(unsigned int in[3], unsigned int out[3]);
236  int CheckMinMaxVolumeFlag(unsigned int pos[3], int c);
237  int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip);
238 
239  void LookupColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
240  unsigned short index, unsigned char color[4]);
241  void LookupDependentColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
242  unsigned short index[4], int components, unsigned char color[4]);
243  void LookupAndCombineIndependentColorsUC(unsigned short* colorTable[4],
244  unsigned short* scalarOpacityTable[4], unsigned short index[4], float weights[4],
245  int components, unsigned char color[4]);
246  int CheckIfCropped(unsigned int pos[3]);
247 
248  vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
249  vtkGetObjectMacro(MIPHelper, vtkFixedPointVolumeRayCastMIPHelper);
250  vtkGetObjectMacro(CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper);
251  vtkGetObjectMacro(CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper);
252  vtkGetObjectMacro(CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper);
253  vtkGetObjectMacro(CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper);
254  vtkGetVectorMacro(TableShift, float, 4);
255  vtkGetVectorMacro(TableScale, float, 4);
256  vtkGetMacro(ShadingRequired, int);
257  vtkGetMacro(GradientOpacityRequired, int);
258 
259  vtkGetObjectMacro(CurrentScalars, vtkDataArray);
260  vtkGetObjectMacro(PreviousScalars, vtkDataArray);
261 
262  int* GetRowBounds() { return this->RowBounds; }
263  unsigned short* GetColorTable(int c) { return this->ColorTable[c]; }
264  unsigned short* GetScalarOpacityTable(int c) { return this->ScalarOpacityTable[c]; }
265  unsigned short* GetGradientOpacityTable(int c) { return this->GradientOpacityTable[c]; }
266  vtkVolume* GetVolume() { return this->Volume; }
267  unsigned short** GetGradientNormal() { return this->GradientNormal; }
268  unsigned char** GetGradientMagnitude() { return this->GradientMagnitude; }
269  unsigned short* GetDiffuseShadingTable(int c) { return this->DiffuseShadingTable[c]; }
270  unsigned short* GetSpecularShadingTable(int c) { return this->SpecularShadingTable[c]; }
271 
273  int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int* numSteps);
274 
276 
278 
280 
286  vtkGetObjectMacro(RayCastImage, vtkFixedPointRayCastImage);
288 
289  int PerImageInitialization(vtkRenderer*, vtkVolume*, int, double*, double*, int*);
294  void AbortRender();
295 
296  void CreateCanonicalView(vtkVolume* volume, vtkImageData* image, int blend_mode,
297  double viewDirection[3], double viewUp[3]);
298 
306  {
307  return this->RetrieveRenderTime(ren, vol);
308  }
309  float GetEstimatedRenderTime(vtkRenderer* ren) { return this->RetrieveRenderTime(ren); }
310 
312 
325  vtkSetMacro(FinalColorWindow, float);
326  vtkGetMacro(FinalColorWindow, float);
327  vtkSetMacro(FinalColorLevel, float);
328  vtkGetMacro(FinalColorLevel, float);
330 
331  // Here to be used by the mapper to tell the helper
332  // to flip the MIP comparison in order to support
333  // minimum intensity blending
334  vtkGetMacro(FlipMIPComparison, int);
335 
343 
344 protected:
347 
348  // The helper class that displays the image
350 
351  // The distance between sample points along the ray
354 
355  // The distance between rays in the image
361 
362  // Saved values used to restore
365 
366  // Internal method for computing matrices needed during
367  // ray casting
368  void ComputeMatrices(double inputOrigin[3], double inputSpacing[3], int inputExtent[6],
369  vtkRenderer* ren, vtkVolume* vol);
370 
371  int ComputeRowBounds(vtkRenderer* ren, int imageFlag, int rowBoundsFlag, int inputExtent[6]);
372 
374 
375  friend VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
376  friend VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
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);
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  unsigned short ColorTable[4][32768 * 3];
429  unsigned short ScalarOpacityTable[4][32768];
430  unsigned short GradientOpacityTable[4][256];
431  int TableSize[4];
432  float TableScale[4];
433  float TableShift[4];
434 
435  float GradientMagnitudeScale[4];
436  float GradientMagnitudeShift[4];
437 
438  unsigned short** GradientNormal;
439  unsigned char** GradientMagnitude;
440  unsigned short* ContiguousGradientNormal;
442 
444 
446 
448 
450 
451  unsigned short DiffuseShadingTable[4][65536 * 3];
452  unsigned short SpecularShadingTable[4][65536 * 3];
453 
456 
459 
462 
464  double rayStart[3], double rayEnd[3], float rayDirection[3], double bounds[6]);
465 
470 
472 
474  double rayStart[3], double rayEnd[3], int numClippingPlanes, float* clippingPlanes);
475 
476  unsigned int FixedPointCroppingRegionPlanes[6];
477  unsigned int CroppingRegionMask[27];
478 
479  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
480  // are indexing into the ImageInUse image. This must be converted to
481  // the zbuffer image coordinates. Nearest neighbor value is returned.
482  float GetZBufferValue(int x, int y);
483 
489 
490  // Some variables used for ray computation
491  float ViewToVoxelsArray[16];
492  float WorldToVoxelsArray[16];
493  float VoxelsToWorldArray[16];
494 
495  double CroppingBounds[6];
496 
499 
500  double SavedSpacing[3];
501 
502  // Min Max structure used to do space leaping
503  unsigned short* MinMaxVolume;
504  int MinMaxVolumeSize[4];
508 
510  void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3]);
511 
514 
516 
518 
519 private:
521  void operator=(const vtkFixedPointVolumeRayCastMapper&) = delete;
522 
523  bool ThreadWarning;
524 };
525 
527 {
528  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
529 }
530 
531 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition(float in[3], unsigned int out[3])
532 {
533  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
534  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
535  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
536 }
537 
539 {
540  return ((dir < 0.0) ? (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5))
541  : (0x80000000 + static_cast<unsigned int>(dir * VTKKW_FP_SCALE + 0.5)));
542 }
543 
545  float in[3], unsigned int out[3])
546 {
547  out[0] = ((in[0] < 0.0) ? (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5))
548  : (0x80000000 + static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5)));
549  out[1] = ((in[1] < 0.0) ? (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5))
550  : (0x80000000 + static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5)));
551  out[2] = ((in[2] < 0.0) ? (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5))
552  : (0x80000000 + static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5)));
553 }
554 
556  unsigned int position[3], unsigned int increment[3])
557 {
558  if (increment[0] & 0x80000000)
559  {
560  position[0] += (increment[0] & 0x7fffffff);
561  }
562  else
563  {
564  position[0] -= increment[0];
565  }
566  if (increment[1] & 0x80000000)
567  {
568  position[1] += (increment[1] & 0x7fffffff);
569  }
570  else
571  {
572  position[1] -= increment[1];
573  }
574  if (increment[2] & 0x80000000)
575  {
576  position[2] += (increment[2] & 0x7fffffff);
577  }
578  else
579  {
580  position[2] -= increment[2];
581  }
582 }
583 
585 {
586  v[0] = *(ptr);
587  v[1] = *(ptr + 1);
588  v[2] = *(ptr + 2);
589 }
590 
592  unsigned int v[3], unsigned int* ptr)
593 {
594  v[0] = *(ptr);
595  v[1] = *(ptr + 1);
596  v[2] = *(ptr + 2);
597 }
598 
600  unsigned int in[3], unsigned int out[3])
601 {
602  out[0] = in[0] >> VTKKW_FP_SHIFT;
603  out[1] = in[1] >> VTKKW_FP_SHIFT;
604  out[2] = in[2] >> VTKKW_FP_SHIFT;
605 }
606 
607 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag(unsigned int mmpos[3], int c)
608 {
609  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
610  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
611  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
612  static_cast<vtkIdType>(c);
613 
614  return ((*(this->MinMaxVolume + 3 * offset + 2)) & 0x00ff);
615 }
616 
618  unsigned int mmpos[3], int c, unsigned short maxIdx, int flip)
619 {
620  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
621  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
622  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
623  static_cast<vtkIdType>(c);
624 
625  if ((*(this->MinMaxVolume + 3 * offset + 2) & 0x00ff))
626  {
627  if (flip)
628  {
629  return (*(this->MinMaxVolume + 3 * offset) < maxIdx);
630  }
631  else
632  {
633  return (*(this->MinMaxVolume + 3 * offset + 1) > maxIdx);
634  }
635  }
636  else
637  {
638  return 0;
639  }
640 }
641 
642 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC(unsigned short* colorTable,
643  unsigned short* scalarOpacityTable, unsigned short index, unsigned char color[4])
644 {
645  unsigned short alpha = scalarOpacityTable[index];
646  color[0] = static_cast<unsigned char>(
647  (colorTable[3 * index] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
648  color[1] = static_cast<unsigned char>(
649  (colorTable[3 * index + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
650  color[2] = static_cast<unsigned char>(
651  (colorTable[3 * index + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
652  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
653 }
654 
655 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC(unsigned short* colorTable,
656  unsigned short* scalarOpacityTable, unsigned short index[4], int components,
657  unsigned char color[4])
658 {
659  unsigned short alpha;
660  switch (components)
661  {
662  case 2:
663  alpha = scalarOpacityTable[index[1]];
664  color[0] = static_cast<unsigned char>(
665  (colorTable[3 * index[0]] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
666  color[1] = static_cast<unsigned char>(
667  (colorTable[3 * index[0] + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
668  color[2] = static_cast<unsigned char>(
669  (colorTable[3 * index[0] + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
670  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
671  break;
672  case 4:
673  alpha = scalarOpacityTable[index[3]];
674  color[0] = static_cast<unsigned char>((index[0] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
675  color[1] = static_cast<unsigned char>((index[1] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
676  color[2] = static_cast<unsigned char>((index[2] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
677  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
678  break;
679  }
680 }
681 
683  unsigned short* colorTable[4], unsigned short* scalarOpacityTable[4], unsigned short index[4],
684  float weights[4], int components, unsigned char color[4])
685 {
686  unsigned int tmp[4] = { 0, 0, 0, 0 };
687 
688  for (int i = 0; i < components; i++)
689  {
690  unsigned short alpha =
691  static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]]) * weights[i]);
692  tmp[0] += static_cast<unsigned char>(
693  ((colorTable[i][3 * index[i]]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
694  tmp[1] += static_cast<unsigned char>(
695  ((colorTable[i][3 * index[i] + 1]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
696  tmp[2] += static_cast<unsigned char>(
697  ((colorTable[i][3 * index[i] + 2]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
698  tmp[3] += static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
699  }
700 
701  color[0] = static_cast<unsigned char>((tmp[0] > 255) ? (255) : (tmp[0]));
702  color[1] = static_cast<unsigned char>((tmp[1] > 255) ? (255) : (tmp[1]));
703  color[2] = static_cast<unsigned char>((tmp[2] > 255) ? (255) : (tmp[2]));
704  color[3] = static_cast<unsigned char>((tmp[3] > 255) ? (255) : (tmp[3]));
705 }
706 
708 {
709  int idx;
710 
711  if (pos[2] < this->FixedPointCroppingRegionPlanes[4])
712  {
713  idx = 0;
714  }
715  else if (pos[2] > this->FixedPointCroppingRegionPlanes[5])
716  {
717  idx = 18;
718  }
719  else
720  {
721  idx = 9;
722  }
723 
724  if (pos[1] >= this->FixedPointCroppingRegionPlanes[2])
725  {
726  if (pos[1] > this->FixedPointCroppingRegionPlanes[3])
727  {
728  idx += 6;
729  }
730  else
731  {
732  idx += 3;
733  }
734  }
735 
736  if (pos[0] >= this->FixedPointCroppingRegionPlanes[0])
737  {
738  if (pos[0] > this->FixedPointCroppingRegionPlanes[1])
739  {
740  idx += 2;
741  }
742  else
743  {
744  idx += 1;
745  }
746  }
747 
748  return !(static_cast<unsigned int>(this->CroppingRegionFlags) & this->CroppingRegionMask[idx]);
749 }
750 
751 VTK_ABI_NAMESPACE_END
752 #endif
Defines a transfer function for mapping a property to an RGB color value.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
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:52
a simple class to control print indentation
Definition: vtkIndent.h:38
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:40
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:71
record modification and/or execution time
Definition: vtkTimeStamp.h:34
Timer support and logging.
Definition: vtkTimerLog.h:94
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
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:49
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
@ dir
Definition: vtkX3D.h:324
@ alpha
Definition: vtkX3D.h:250
@ color
Definition: vtkX3D.h:221
@ image
Definition: vtkX3D.h:374
@ position
Definition: vtkX3D.h:261
@ index
Definition: vtkX3D.h:246
@ offset
Definition: vtkX3D.h:438
int vtkTypeBool
Definition: vtkABI.h:64
#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:315