VTK  9.3.20240328
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
102 #ifndef vtkFixedPointVolumeRayCastMapper_h
103 #define vtkFixedPointVolumeRayCastMapper_h
104 
105 #include "vtkRenderingVolumeModule.h" // For export macro
106 #include "vtkThreads.h" // for VTK_THREAD_RETURN_TYPE
107 #include "vtkVolumeMapper.h"
108 
109 #define VTKKW_FP_SHIFT 15
110 #define VTKKW_FPMM_SHIFT 17
111 #define VTKKW_FP_MASK 0x7fff
112 #define VTKKW_FP_SCALE 32767.0
113 
114 VTK_ABI_NAMESPACE_BEGIN
115 class vtkMatrix4x4;
116 class vtkMultiThreader;
117 class vtkPlaneCollection;
118 class vtkRenderer;
119 class vtkTimerLog;
120 class vtkVolume;
121 class vtkTransform;
122 class vtkRenderWindow;
131 class vtkDirectionEncoder;
136 class vtkDataArray;
137 
138 // Forward declaration needed for use by friend declaration below.
139 VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
140 VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
141 
142 class VTKRENDERINGVOLUME_EXPORT vtkFixedPointVolumeRayCastMapper : public vtkVolumeMapper
143 {
144 public:
147  void PrintSelf(ostream& os, vtkIndent indent) override;
148 
150 
155  vtkSetMacro(SampleDistance, float);
156  vtkGetMacro(SampleDistance, float);
158 
160 
167  vtkSetMacro(InteractiveSampleDistance, float);
168  vtkGetMacro(InteractiveSampleDistance, float);
170 
172 
179  vtkSetClampMacro(ImageSampleDistance, float, 0.1f, 100.0f);
180  vtkGetMacro(ImageSampleDistance, float);
182 
184 
188  vtkSetClampMacro(MinimumImageSampleDistance, float, 0.1f, 100.0f);
189  vtkGetMacro(MinimumImageSampleDistance, float);
191 
193 
197  vtkSetClampMacro(MaximumImageSampleDistance, float, 0.1f, 100.0f);
198  vtkGetMacro(MaximumImageSampleDistance, float);
200 
202 
211  vtkSetClampMacro(AutoAdjustSampleDistances, vtkTypeBool, 0, 1);
212  vtkGetMacro(AutoAdjustSampleDistances, vtkTypeBool);
213  vtkBooleanMacro(AutoAdjustSampleDistances, vtkTypeBool);
215 
217 
225  vtkSetClampMacro(LockSampleDistanceToInputSpacing, vtkTypeBool, 0, 1);
226  vtkGetMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
227  vtkBooleanMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
229 
231 
236  void SetNumberOfThreads(int num);
239 
241 
245  vtkSetClampMacro(IntermixIntersectingGeometry, vtkTypeBool, 0, 1);
246  vtkGetMacro(IntermixIntersectingGeometry, vtkTypeBool);
247  vtkBooleanMacro(IntermixIntersectingGeometry, vtkTypeBool);
249 
251 
258  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren);
259  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren, vtkVolume* vol);
261 
266  void Render(vtkRenderer*, vtkVolume*) override;
267 
268  unsigned int ToFixedPointPosition(float val);
269  void ToFixedPointPosition(float in[3], unsigned int out[3]);
270  unsigned int ToFixedPointDirection(float dir);
271  void ToFixedPointDirection(float in[3], unsigned int out[3]);
272  void FixedPointIncrement(unsigned int position[3], unsigned int increment[3]);
273  void GetFloatTripleFromPointer(float v[3], float* ptr);
274  void GetUIntTripleFromPointer(unsigned int v[3], unsigned int* ptr);
275  void ShiftVectorDown(unsigned int in[3], unsigned int out[3]);
276  int CheckMinMaxVolumeFlag(unsigned int pos[3], int c);
277  int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip);
278 
279  void LookupColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
280  unsigned short index, unsigned char color[4]);
281  void LookupDependentColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
282  unsigned short index[4], int components, unsigned char color[4]);
283  void LookupAndCombineIndependentColorsUC(unsigned short* colorTable[4],
284  unsigned short* scalarOpacityTable[4], unsigned short index[4], float weights[4],
285  int components, unsigned char color[4]);
286  int CheckIfCropped(unsigned int pos[3]);
287 
288  vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
289  vtkGetObjectMacro(MIPHelper, vtkFixedPointVolumeRayCastMIPHelper);
290  vtkGetObjectMacro(CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper);
291  vtkGetObjectMacro(CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper);
292  vtkGetObjectMacro(CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper);
293  vtkGetObjectMacro(CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper);
294  vtkGetVectorMacro(TableShift, float, 4);
295  vtkGetVectorMacro(TableScale, float, 4);
296  vtkGetMacro(ShadingRequired, int);
297  vtkGetMacro(GradientOpacityRequired, int);
298 
299  vtkGetObjectMacro(CurrentScalars, vtkDataArray);
300  vtkGetObjectMacro(PreviousScalars, vtkDataArray);
301 
302  int* GetRowBounds() { return this->RowBounds; }
303  unsigned short* GetColorTable(int c) { return this->ColorTable[c]; }
304  unsigned short* GetScalarOpacityTable(int c) { return this->ScalarOpacityTable[c]; }
305  unsigned short* GetGradientOpacityTable(int c) { return this->GradientOpacityTable[c]; }
306  vtkVolume* GetVolume() { return this->Volume; }
307  unsigned short** GetGradientNormal() { return this->GradientNormal; }
308  unsigned char** GetGradientMagnitude() { return this->GradientMagnitude; }
309  unsigned short* GetDiffuseShadingTable(int c) { return this->DiffuseShadingTable[c]; }
310  unsigned short* GetSpecularShadingTable(int c) { return this->SpecularShadingTable[c]; }
311 
313  int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int* numSteps);
314 
316 
318 
320 
326  vtkGetObjectMacro(RayCastImage, vtkFixedPointRayCastImage);
328 
329  int PerImageInitialization(vtkRenderer*, vtkVolume*, int, double*, double*, int*);
334  void AbortRender();
335 
336  void CreateCanonicalView(vtkVolume* volume, vtkImageData* image, int blend_mode,
337  double viewDirection[3], double viewUp[3]);
338 
346  {
347  return this->RetrieveRenderTime(ren, vol);
348  }
349  float GetEstimatedRenderTime(vtkRenderer* ren) { return this->RetrieveRenderTime(ren); }
350 
352 
365  vtkSetMacro(FinalColorWindow, float);
366  vtkGetMacro(FinalColorWindow, float);
367  vtkSetMacro(FinalColorLevel, float);
368  vtkGetMacro(FinalColorLevel, float);
370 
371  // Here to be used by the mapper to tell the helper
372  // to flip the MIP comparison in order to support
373  // minimum intensity blending
374  vtkGetMacro(FlipMIPComparison, int);
375 
383 
384 protected:
387 
388  // The helper class that displays the image
390 
391  // The distance between sample points along the ray
394 
395  // The distance between rays in the image
401 
402  // Saved values used to restore
405 
406  // Internal method for computing matrices needed during
407  // ray casting
408  void ComputeMatrices(double inputOrigin[3], double inputSpacing[3], int inputExtent[6],
409  vtkRenderer* ren, vtkVolume* vol);
410 
411  int ComputeRowBounds(vtkRenderer* ren, int imageFlag, int rowBoundsFlag, int inputExtent[6]);
412 
414 
415  friend VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
416  friend VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
417 
419 
426 
428 
432 
433  // This object encapsulated the image and all related information
435 
436  int* RowBounds;
438 
444 
445  void StoreRenderTime(vtkRenderer* ren, vtkVolume* vol, float t);
448 
450 
452 
453  vtkColorTransferFunction* SavedRGBFunction[4];
454  vtkPiecewiseFunction* SavedGrayFunction[4];
455  vtkPiecewiseFunction* SavedScalarOpacityFunction[4];
456  vtkPiecewiseFunction* SavedGradientOpacityFunction[4];
457  int SavedColorChannels[4];
458  float SavedScalarOpacityDistance[4];
462 
465 
467 
468  unsigned short ColorTable[4][32768 * 3];
469  unsigned short ScalarOpacityTable[4][32768];
470  unsigned short GradientOpacityTable[4][256];
471  int TableSize[4];
472  float TableScale[4];
473  float TableShift[4];
474 
475  float GradientMagnitudeScale[4];
476  float GradientMagnitudeShift[4];
477 
478  unsigned short** GradientNormal;
479  unsigned char** GradientMagnitude;
480  unsigned short* ContiguousGradientNormal;
482 
484 
486 
488 
490 
491  unsigned short DiffuseShadingTable[4][65536 * 3];
492  unsigned short SpecularShadingTable[4][65536 * 3];
493 
496 
499 
502 
504  double rayStart[3], double rayEnd[3], float rayDirection[3], double bounds[6]);
505 
510 
512 
514  double rayStart[3], double rayEnd[3], int numClippingPlanes, float* clippingPlanes);
515 
516  unsigned int FixedPointCroppingRegionPlanes[6];
517  unsigned int CroppingRegionMask[27];
518 
519  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
520  // are indexing into the ImageInUse image. This must be converted to
521  // the zbuffer image coordinates. Nearest neighbor value is returned.
522  float GetZBufferValue(int x, int y);
523 
529 
530  // Some variables used for ray computation
531  float ViewToVoxelsArray[16];
532  float WorldToVoxelsArray[16];
533  float VoxelsToWorldArray[16];
534 
535  double CroppingBounds[6];
536 
539 
540  double SavedSpacing[3];
541 
542  // Min Max structure used to do space leaping
543  unsigned short* MinMaxVolume;
544  int MinMaxVolumeSize[4];
548 
550  void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3]);
551 
554 
556 
558 
559 private:
561  void operator=(const vtkFixedPointVolumeRayCastMapper&) = delete;
562 
563  bool ThreadWarning;
564 };
565 
567 {
568  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
569 }
570 
571 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition(float in[3], unsigned int out[3])
572 {
573  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
574  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
575  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
576 }
577 
579 {
580  return ((dir < 0.0) ? (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5))
581  : (0x80000000 + static_cast<unsigned int>(dir * VTKKW_FP_SCALE + 0.5)));
582 }
583 
585  float in[3], unsigned int out[3])
586 {
587  out[0] = ((in[0] < 0.0) ? (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5))
588  : (0x80000000 + static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5)));
589  out[1] = ((in[1] < 0.0) ? (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5))
590  : (0x80000000 + static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5)));
591  out[2] = ((in[2] < 0.0) ? (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5))
592  : (0x80000000 + static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5)));
593 }
594 
596  unsigned int position[3], unsigned int increment[3])
597 {
598  if (increment[0] & 0x80000000)
599  {
600  position[0] += (increment[0] & 0x7fffffff);
601  }
602  else
603  {
604  position[0] -= increment[0];
605  }
606  if (increment[1] & 0x80000000)
607  {
608  position[1] += (increment[1] & 0x7fffffff);
609  }
610  else
611  {
612  position[1] -= increment[1];
613  }
614  if (increment[2] & 0x80000000)
615  {
616  position[2] += (increment[2] & 0x7fffffff);
617  }
618  else
619  {
620  position[2] -= increment[2];
621  }
622 }
623 
625 {
626  v[0] = *(ptr);
627  v[1] = *(ptr + 1);
628  v[2] = *(ptr + 2);
629 }
630 
632  unsigned int v[3], unsigned int* ptr)
633 {
634  v[0] = *(ptr);
635  v[1] = *(ptr + 1);
636  v[2] = *(ptr + 2);
637 }
638 
640  unsigned int in[3], unsigned int out[3])
641 {
642  out[0] = in[0] >> VTKKW_FP_SHIFT;
643  out[1] = in[1] >> VTKKW_FP_SHIFT;
644  out[2] = in[2] >> VTKKW_FP_SHIFT;
645 }
646 
647 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag(unsigned int mmpos[3], int c)
648 {
649  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
650  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
651  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
652  static_cast<vtkIdType>(c);
653 
654  return ((*(this->MinMaxVolume + 3 * offset + 2)) & 0x00ff);
655 }
656 
658  unsigned int mmpos[3], int c, unsigned short maxIdx, int flip)
659 {
660  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
661  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
662  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
663  static_cast<vtkIdType>(c);
664 
665  if ((*(this->MinMaxVolume + 3 * offset + 2) & 0x00ff))
666  {
667  if (flip)
668  {
669  return (*(this->MinMaxVolume + 3 * offset) < maxIdx);
670  }
671  else
672  {
673  return (*(this->MinMaxVolume + 3 * offset + 1) > maxIdx);
674  }
675  }
676  else
677  {
678  return 0;
679  }
680 }
681 
682 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC(unsigned short* colorTable,
683  unsigned short* scalarOpacityTable, unsigned short index, unsigned char color[4])
684 {
685  unsigned short alpha = scalarOpacityTable[index];
686  color[0] = static_cast<unsigned char>(
687  (colorTable[3 * index] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
688  color[1] = static_cast<unsigned char>(
689  (colorTable[3 * index + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
690  color[2] = static_cast<unsigned char>(
691  (colorTable[3 * index + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
692  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
693 }
694 
695 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC(unsigned short* colorTable,
696  unsigned short* scalarOpacityTable, unsigned short index[4], 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 
723  unsigned short* colorTable[4], unsigned short* scalarOpacityTable[4], unsigned short index[4],
724  float weights[4], int components, unsigned char color[4])
725 {
726  unsigned int tmp[4] = { 0, 0, 0, 0 };
727 
728  for (int i = 0; i < components; i++)
729  {
730  unsigned short alpha =
731  static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]]) * weights[i]);
732  tmp[0] += static_cast<unsigned char>(
733  ((colorTable[i][3 * index[i]]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
734  tmp[1] += static_cast<unsigned char>(
735  ((colorTable[i][3 * index[i] + 1]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
736  tmp[2] += static_cast<unsigned char>(
737  ((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 
748 {
749  int idx;
750 
751  if (pos[2] < this->FixedPointCroppingRegionPlanes[4])
752  {
753  idx = 0;
754  }
755  else if (pos[2] > this->FixedPointCroppingRegionPlanes[5])
756  {
757  idx = 18;
758  }
759  else
760  {
761  idx = 9;
762  }
763 
764  if (pos[1] >= this->FixedPointCroppingRegionPlanes[2])
765  {
766  if (pos[1] > this->FixedPointCroppingRegionPlanes[3])
767  {
768  idx += 6;
769  }
770  else
771  {
772  idx += 3;
773  }
774  }
775 
776  if (pos[0] >= this->FixedPointCroppingRegionPlanes[0])
777  {
778  if (pos[0] > this->FixedPointCroppingRegionPlanes[1])
779  {
780  idx += 2;
781  }
782  else
783  {
784  idx += 1;
785  }
786  }
787 
788  return !(static_cast<unsigned int>(this->CroppingRegionFlags) & this->CroppingRegionMask[idx]);
789 }
790 
791 VTK_ABI_NAMESPACE_END
792 #endif
Defines a transfer function for mapping a property to an RGB color value.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:154
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:155
a simple class to control print indentation
Definition: vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:140
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:171
record modification and/or execution time
Definition: vtkTimeStamp.h:44
Timer support and logging.
Definition: vtkTimerLog.h:174
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:159
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:119
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
@ 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
VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void *arg)
VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void *arg)
int vtkIdType
Definition: vtkType.h:315