VTK  9.0.1
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 =========================================================================*/
65 #ifndef vtkFixedPointVolumeRayCastMapper_h
66 #define vtkFixedPointVolumeRayCastMapper_h
67 
68 #include "vtkRenderingVolumeModule.h" // For export macro
69 #include "vtkVolumeMapper.h"
70 
71 #define VTKKW_FP_SHIFT 15
72 #define VTKKW_FPMM_SHIFT 17
73 #define VTKKW_FP_MASK 0x7fff
74 #define VTKKW_FP_SCALE 32767.0
75 
76 class vtkMatrix4x4;
77 class vtkMultiThreader;
78 class vtkPlaneCollection;
79 class vtkRenderer;
80 class vtkTimerLog;
81 class vtkVolume;
82 class vtkTransform;
83 class vtkRenderWindow;
97 class vtkDataArray;
98 
99 // Forward declaration needed for use by friend declaration below.
102 
103 class VTKRENDERINGVOLUME_EXPORT vtkFixedPointVolumeRayCastMapper : public vtkVolumeMapper
104 {
105 public:
108  void PrintSelf(ostream& os, vtkIndent indent) override;
109 
111 
116  vtkSetMacro(SampleDistance, float);
117  vtkGetMacro(SampleDistance, float);
119 
121 
128  vtkSetMacro(InteractiveSampleDistance, float);
129  vtkGetMacro(InteractiveSampleDistance, float);
131 
133 
140  vtkSetClampMacro(ImageSampleDistance, float, 0.1f, 100.0f);
141  vtkGetMacro(ImageSampleDistance, float);
143 
145 
149  vtkSetClampMacro(MinimumImageSampleDistance, float, 0.1f, 100.0f);
150  vtkGetMacro(MinimumImageSampleDistance, float);
152 
154 
158  vtkSetClampMacro(MaximumImageSampleDistance, float, 0.1f, 100.0f);
159  vtkGetMacro(MaximumImageSampleDistance, float);
161 
163 
172  vtkSetClampMacro(AutoAdjustSampleDistances, vtkTypeBool, 0, 1);
173  vtkGetMacro(AutoAdjustSampleDistances, vtkTypeBool);
174  vtkBooleanMacro(AutoAdjustSampleDistances, vtkTypeBool);
176 
178 
186  vtkSetClampMacro(LockSampleDistanceToInputSpacing, vtkTypeBool, 0, 1);
187  vtkGetMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
188  vtkBooleanMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
190 
192 
197  void SetNumberOfThreads(int num);
200 
202 
206  vtkSetClampMacro(IntermixIntersectingGeometry, vtkTypeBool, 0, 1);
207  vtkGetMacro(IntermixIntersectingGeometry, vtkTypeBool);
208  vtkBooleanMacro(IntermixIntersectingGeometry, vtkTypeBool);
210 
212 
219  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren);
220  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren, vtkVolume* vol);
222 
227  void Render(vtkRenderer*, vtkVolume*) override;
228 
229  unsigned int ToFixedPointPosition(float val);
230  void ToFixedPointPosition(float in[3], unsigned int out[3]);
231  unsigned int ToFixedPointDirection(float dir);
232  void ToFixedPointDirection(float in[3], unsigned int out[3]);
233  void FixedPointIncrement(unsigned int position[3], unsigned int increment[3]);
234  void GetFloatTripleFromPointer(float v[3], float* ptr);
235  void GetUIntTripleFromPointer(unsigned int v[3], unsigned int* ptr);
236  void ShiftVectorDown(unsigned int in[3], unsigned int out[3]);
237  int CheckMinMaxVolumeFlag(unsigned int pos[3], int c);
238  int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip);
239 
240  void LookupColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
241  unsigned short index, unsigned char color[4]);
242  void LookupDependentColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
243  unsigned short index[4], int components, unsigned char color[4]);
244  void LookupAndCombineIndependentColorsUC(unsigned short* colorTable[4],
245  unsigned short* scalarOpacityTable[4], unsigned short index[4], float weights[4],
246  int components, unsigned char color[4]);
247  int CheckIfCropped(unsigned int pos[3]);
248 
249  vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
250  vtkGetObjectMacro(MIPHelper, vtkFixedPointVolumeRayCastMIPHelper);
251  vtkGetObjectMacro(CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper);
252  vtkGetObjectMacro(CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper);
253  vtkGetObjectMacro(CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper);
254  vtkGetObjectMacro(CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper);
255  vtkGetVectorMacro(TableShift, float, 4);
256  vtkGetVectorMacro(TableScale, float, 4);
257  vtkGetMacro(ShadingRequired, int);
258  vtkGetMacro(GradientOpacityRequired, int);
259 
260  vtkGetObjectMacro(CurrentScalars, vtkDataArray);
261  vtkGetObjectMacro(PreviousScalars, vtkDataArray);
262 
263  int* GetRowBounds() { return this->RowBounds; }
264  unsigned short* GetColorTable(int c) { return this->ColorTable[c]; }
265  unsigned short* GetScalarOpacityTable(int c) { return this->ScalarOpacityTable[c]; }
266  unsigned short* GetGradientOpacityTable(int c) { return this->GradientOpacityTable[c]; }
267  vtkVolume* GetVolume() { return this->Volume; }
268  unsigned short** GetGradientNormal() { return this->GradientNormal; }
269  unsigned char** GetGradientMagnitude() { return this->GradientMagnitude; }
270  unsigned short* GetDiffuseShadingTable(int c) { return this->DiffuseShadingTable[c]; }
271  unsigned short* GetSpecularShadingTable(int c) { return this->SpecularShadingTable[c]; }
272 
274  int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int* numSteps);
275 
277 
279 
281 
287  vtkGetObjectMacro(RayCastImage, vtkFixedPointRayCastImage);
289 
290  int PerImageInitialization(vtkRenderer*, vtkVolume*, int, double*, double*, int*);
295  void AbortRender();
296 
297  void CreateCanonicalView(vtkVolume* volume, vtkImageData* image, int blend_mode,
298  double viewDirection[3], double viewUp[3]);
299 
307  {
308  return this->RetrieveRenderTime(ren, vol);
309  }
310  float GetEstimatedRenderTime(vtkRenderer* ren) { return this->RetrieveRenderTime(ren); }
311 
313 
326  vtkSetMacro(FinalColorWindow, float);
327  vtkGetMacro(FinalColorWindow, float);
328  vtkSetMacro(FinalColorLevel, float);
329  vtkGetMacro(FinalColorLevel, float);
331 
332  // Here to be used by the mapper to tell the helper
333  // to flip the MIP comparison in order to support
334  // minimum intensity blending
335  vtkGetMacro(FlipMIPComparison, int);
336 
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], double volumeSpacing[3], int volumeExtent[6],
370  vtkRenderer* ren, vtkVolume* vol);
371 
372  int ComputeRowBounds(vtkRenderer* ren, int imageFlag, int rowBoundsFlag, int volumeExtent[6]);
373 
375 
378 
380 
387 
389 
393 
394  // This object encapsulated the image and all related information
396 
397  int* RowBounds;
399 
405 
406  void StoreRenderTime(vtkRenderer* ren, vtkVolume* vol, float t);
409 
411 
413 
414  vtkColorTransferFunction* SavedRGBFunction[4];
415  vtkPiecewiseFunction* SavedGrayFunction[4];
416  vtkPiecewiseFunction* SavedScalarOpacityFunction[4];
417  vtkPiecewiseFunction* SavedGradientOpacityFunction[4];
418  int SavedColorChannels[4];
419  float SavedScalarOpacityDistance[4];
423 
426 
428 
429  unsigned short ColorTable[4][32768 * 3];
430  unsigned short ScalarOpacityTable[4][32768];
431  unsigned short GradientOpacityTable[4][256];
432  int TableSize[4];
433  float TableScale[4];
434  float TableShift[4];
435 
436  float GradientMagnitudeScale[4];
437  float GradientMagnitudeShift[4];
438 
439  unsigned short** GradientNormal;
440  unsigned char** GradientMagnitude;
441  unsigned short* ContiguousGradientNormal;
443 
445 
447 
449 
451 
452  unsigned short DiffuseShadingTable[4][65536 * 3];
453  unsigned short SpecularShadingTable[4][65536 * 3];
454 
457 
460 
463 
465  float rayStart[3], float rayEnd[3], float rayDirection[3], double bounds[6]);
466 
471 
473 
475  float rayStart[3], float rayEnd[3], int numClippingPlanes, float* clippingPlanes);
476 
477  unsigned int FixedPointCroppingRegionPlanes[6];
478  unsigned int CroppingRegionMask[27];
479 
480  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
481  // are indexing into the ImageInUse image. This must be converted to
482  // the zbuffer image coordinates. Nearest neighbor value is returned.
483  float GetZBufferValue(int x, int y);
484 
490 
491  // Some variables used for ray computation
492  float ViewToVoxelsArray[16];
493  float WorldToVoxelsArray[16];
494  float VoxelsToWorldArray[16];
495 
496  double CroppingBounds[6];
497 
500 
501  double SavedSpacing[3];
502 
503  // Min Max structure used to do space leaping
504  unsigned short* MinMaxVolume;
505  int MinMaxVolumeSize[4];
509 
511  void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3]);
512 
515 
517 
519 
520 private:
522  void operator=(const vtkFixedPointVolumeRayCastMapper&) = delete;
523 
524  bool ThreadWarning;
525 };
526 
528 {
529  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
530 }
531 
532 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition(float in[3], unsigned int out[3])
533 {
534  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
535  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
536  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
537 }
538 
540 {
541  return ((dir < 0.0) ? (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5))
542  : (0x80000000 + static_cast<unsigned int>(dir * VTKKW_FP_SCALE + 0.5)));
543 }
544 
546  float in[3], unsigned int out[3])
547 {
548  out[0] = ((in[0] < 0.0) ? (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5))
549  : (0x80000000 + static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5)));
550  out[1] = ((in[1] < 0.0) ? (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5))
551  : (0x80000000 + static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5)));
552  out[2] = ((in[2] < 0.0) ? (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5))
553  : (0x80000000 + static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5)));
554 }
555 
557  unsigned int position[3], unsigned int increment[3])
558 {
559  if (increment[0] & 0x80000000)
560  {
561  position[0] += (increment[0] & 0x7fffffff);
562  }
563  else
564  {
565  position[0] -= increment[0];
566  }
567  if (increment[1] & 0x80000000)
568  {
569  position[1] += (increment[1] & 0x7fffffff);
570  }
571  else
572  {
573  position[1] -= increment[1];
574  }
575  if (increment[2] & 0x80000000)
576  {
577  position[2] += (increment[2] & 0x7fffffff);
578  }
579  else
580  {
581  position[2] -= increment[2];
582  }
583 }
584 
586 {
587  v[0] = *(ptr);
588  v[1] = *(ptr + 1);
589  v[2] = *(ptr + 2);
590 }
591 
593  unsigned int v[3], unsigned int* ptr)
594 {
595  v[0] = *(ptr);
596  v[1] = *(ptr + 1);
597  v[2] = *(ptr + 2);
598 }
599 
601  unsigned int in[3], unsigned int out[3])
602 {
603  out[0] = in[0] >> VTKKW_FP_SHIFT;
604  out[1] = in[1] >> VTKKW_FP_SHIFT;
605  out[2] = in[2] >> VTKKW_FP_SHIFT;
606 }
607 
608 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag(unsigned int mmpos[3], int c)
609 {
610  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
611  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
612  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
613  static_cast<vtkIdType>(c);
614 
615  return ((*(this->MinMaxVolume + 3 * offset + 2)) & 0x00ff);
616 }
617 
619  unsigned int mmpos[3], int c, unsigned short maxIdx, int flip)
620 {
621  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
622  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
623  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
624  static_cast<vtkIdType>(c);
625 
626  if ((*(this->MinMaxVolume + 3 * offset + 2) & 0x00ff))
627  {
628  if (flip)
629  {
630  return (*(this->MinMaxVolume + 3 * offset) < maxIdx);
631  }
632  else
633  {
634  return (*(this->MinMaxVolume + 3 * offset + 1) > maxIdx);
635  }
636  }
637  else
638  {
639  return 0;
640  }
641 }
642 
643 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC(unsigned short* colorTable,
644  unsigned short* scalarOpacityTable, unsigned short index, unsigned char color[4])
645 {
646  unsigned short alpha = scalarOpacityTable[index];
647  color[0] = static_cast<unsigned char>(
648  (colorTable[3 * index] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
649  color[1] = static_cast<unsigned char>(
650  (colorTable[3 * index + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
651  color[2] = static_cast<unsigned char>(
652  (colorTable[3 * index + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
653  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
654 }
655 
656 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC(unsigned short* colorTable,
657  unsigned short* scalarOpacityTable, unsigned short index[4], int components,
658  unsigned char color[4])
659 {
660  unsigned short alpha;
661  switch (components)
662  {
663  case 2:
664  alpha = scalarOpacityTable[index[1]];
665  color[0] = static_cast<unsigned char>(
666  (colorTable[3 * index[0]] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
667  color[1] = static_cast<unsigned char>(
668  (colorTable[3 * index[0] + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
669  color[2] = static_cast<unsigned char>(
670  (colorTable[3 * index[0] + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
671  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
672  break;
673  case 4:
674  alpha = scalarOpacityTable[index[3]];
675  color[0] = static_cast<unsigned char>((index[0] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
676  color[1] = static_cast<unsigned char>((index[1] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
677  color[2] = static_cast<unsigned char>((index[2] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
678  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
679  break;
680  }
681 }
682 
684  unsigned short* colorTable[4], unsigned short* scalarOpacityTable[4], unsigned short index[4],
685  float weights[4], int components, unsigned char color[4])
686 {
687  unsigned int tmp[4] = { 0, 0, 0, 0 };
688 
689  for (int i = 0; i < components; i++)
690  {
691  unsigned short alpha =
692  static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]]) * weights[i]);
693  tmp[0] += static_cast<unsigned char>(
694  ((colorTable[i][3 * index[i]]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
695  tmp[1] += static_cast<unsigned char>(
696  ((colorTable[i][3 * index[i] + 1]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
697  tmp[2] += static_cast<unsigned char>(
698  ((colorTable[i][3 * index[i] + 2]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
699  tmp[3] += static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
700  }
701 
702  color[0] = static_cast<unsigned char>((tmp[0] > 255) ? (255) : (tmp[0]));
703  color[1] = static_cast<unsigned char>((tmp[1] > 255) ? (255) : (tmp[1]));
704  color[2] = static_cast<unsigned char>((tmp[2] > 255) ? (255) : (tmp[2]));
705  color[3] = static_cast<unsigned char>((tmp[3] > 255) ? (255) : (tmp[3]));
706 }
707 
709 {
710  int idx;
711 
712  if (pos[2] < this->FixedPointCroppingRegionPlanes[4])
713  {
714  idx = 0;
715  }
716  else if (pos[2] > this->FixedPointCroppingRegionPlanes[5])
717  {
718  idx = 18;
719  }
720  else
721  {
722  idx = 9;
723  }
724 
725  if (pos[1] >= this->FixedPointCroppingRegionPlanes[2])
726  {
727  if (pos[1] > this->FixedPointCroppingRegionPlanes[3])
728  {
729  idx += 6;
730  }
731  else
732  {
733  idx += 3;
734  }
735  }
736 
737  if (pos[0] >= this->FixedPointCroppingRegionPlanes[0])
738  {
739  if (pos[0] > this->FixedPointCroppingRegionPlanes[1])
740  {
741  idx += 2;
742  }
743  else
744  {
745  idx += 1;
746  }
747  }
748 
749  return !(static_cast<unsigned int>(this->CroppingRegionFlags) & this->CroppingRegionMask[idx]);
750 }
751 
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: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
int ClipRayAgainstVolume(float rayStart[3], float rayEnd[3], float rayDirection[3], double bounds[6])
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)
int ClipRayAgainstClippingPlanes(float rayStart[3], float rayEnd[3], int numClippingPlanes, float *clippingPlanes)
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
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)
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 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])
int ComputeRowBounds(vtkRenderer *ren, int imageFlag, int rowBoundsFlag, int volumeExtent[6])
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()
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 ComputeMatrices(double volumeOrigin[3], double volumeSpacing[3], int volumeExtent[6], vtkRenderer *ren, vtkVolume *vol)
void ShiftVectorDown(unsigned int in[3], unsigned int out[3])
int UpdateColorTable(vtkVolume *vol)
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:42
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:68
record modification and/or execution time
Definition: vtkTimeStamp.h:33
Timer support and logging.
Definition: vtkTimerLog.h:91
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:55
Abstract class for a volume mapper.
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:45
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
@ 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)
#define VTK_THREAD_RETURN_TYPE
int vtkIdType
Definition: vtkType.h:338