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 =========================================================================*/
56 #ifndef vtkFixedPointVolumeRayCastMapper_h
57 #define vtkFixedPointVolumeRayCastMapper_h
58 
59 #include "vtkRenderingVolumeModule.h" // For export macro
60 #include "vtkVolumeMapper.h"
61 
62 #define VTKKW_FP_SHIFT 15
63 #define VTKKW_FPMM_SHIFT 17
64 #define VTKKW_FP_MASK 0x7fff
65 #define VTKKW_FP_SCALE 32767.0
66 
67 class vtkMatrix4x4;
68 class vtkMultiThreader;
69 class vtkPlaneCollection;
70 class vtkRenderer;
71 class vtkTimerLog;
72 class vtkVolume;
73 class vtkTransform;
74 class vtkRenderWindow;
88 class vtkDataArray;
89 
90 // Forward declaration needed for use by friend declaration below.
93 
94 class VTKRENDERINGVOLUME_EXPORT vtkFixedPointVolumeRayCastMapper : public vtkVolumeMapper
95 {
96 public:
99  void PrintSelf(ostream& os, vtkIndent indent) override;
100 
102 
107  vtkSetMacro(SampleDistance, float);
108  vtkGetMacro(SampleDistance, float);
110 
112 
119  vtkSetMacro(InteractiveSampleDistance, float);
120  vtkGetMacro(InteractiveSampleDistance, float);
122 
124 
131  vtkSetClampMacro(ImageSampleDistance, float, 0.1f, 100.0f);
132  vtkGetMacro(ImageSampleDistance, float);
134 
136 
140  vtkSetClampMacro(MinimumImageSampleDistance, float, 0.1f, 100.0f);
141  vtkGetMacro(MinimumImageSampleDistance, float);
143 
145 
149  vtkSetClampMacro(MaximumImageSampleDistance, float, 0.1f, 100.0f);
150  vtkGetMacro(MaximumImageSampleDistance, float);
152 
154 
163  vtkSetClampMacro(AutoAdjustSampleDistances, vtkTypeBool, 0, 1);
164  vtkGetMacro(AutoAdjustSampleDistances, vtkTypeBool);
165  vtkBooleanMacro(AutoAdjustSampleDistances, vtkTypeBool);
167 
169 
177  vtkSetClampMacro(LockSampleDistanceToInputSpacing, vtkTypeBool, 0, 1);
178  vtkGetMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
179  vtkBooleanMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
181 
183 
188  void SetNumberOfThreads(int num);
191 
193 
197  vtkSetClampMacro(IntermixIntersectingGeometry, vtkTypeBool, 0, 1);
198  vtkGetMacro(IntermixIntersectingGeometry, vtkTypeBool);
199  vtkBooleanMacro(IntermixIntersectingGeometry, vtkTypeBool);
201 
203 
210  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren);
211  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren, vtkVolume* vol);
213 
218  void Render(vtkRenderer*, vtkVolume*) override;
219 
220  unsigned int ToFixedPointPosition(float val);
221  void ToFixedPointPosition(float in[3], unsigned int out[3]);
222  unsigned int ToFixedPointDirection(float dir);
223  void ToFixedPointDirection(float in[3], unsigned int out[3]);
224  void FixedPointIncrement(unsigned int position[3], unsigned int increment[3]);
225  void GetFloatTripleFromPointer(float v[3], float* ptr);
226  void GetUIntTripleFromPointer(unsigned int v[3], unsigned int* ptr);
227  void ShiftVectorDown(unsigned int in[3], unsigned int out[3]);
228  int CheckMinMaxVolumeFlag(unsigned int pos[3], int c);
229  int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip);
230 
231  void LookupColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
232  unsigned short index, unsigned char color[4]);
233  void LookupDependentColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
234  unsigned short index[4], int components, unsigned char color[4]);
235  void LookupAndCombineIndependentColorsUC(unsigned short* colorTable[4],
236  unsigned short* scalarOpacityTable[4], unsigned short index[4], float weights[4],
237  int components, unsigned char color[4]);
238  int CheckIfCropped(unsigned int pos[3]);
239 
240  vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
241  vtkGetObjectMacro(MIPHelper, vtkFixedPointVolumeRayCastMIPHelper);
242  vtkGetObjectMacro(CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper);
243  vtkGetObjectMacro(CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper);
244  vtkGetObjectMacro(CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper);
245  vtkGetObjectMacro(CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper);
246  vtkGetVectorMacro(TableShift, float, 4);
247  vtkGetVectorMacro(TableScale, float, 4);
248  vtkGetMacro(ShadingRequired, int);
249  vtkGetMacro(GradientOpacityRequired, int);
250 
251  vtkGetObjectMacro(CurrentScalars, vtkDataArray);
252  vtkGetObjectMacro(PreviousScalars, vtkDataArray);
253 
254  int* GetRowBounds() { return this->RowBounds; }
255  unsigned short* GetColorTable(int c) { return this->ColorTable[c]; }
256  unsigned short* GetScalarOpacityTable(int c) { return this->ScalarOpacityTable[c]; }
257  unsigned short* GetGradientOpacityTable(int c) { return this->GradientOpacityTable[c]; }
258  vtkVolume* GetVolume() { return this->Volume; }
259  unsigned short** GetGradientNormal() { return this->GradientNormal; }
260  unsigned char** GetGradientMagnitude() { return this->GradientMagnitude; }
261  unsigned short* GetDiffuseShadingTable(int c) { return this->DiffuseShadingTable[c]; }
262  unsigned short* GetSpecularShadingTable(int c) { return this->SpecularShadingTable[c]; }
263 
265  int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int* numSteps);
266 
268 
270 
272 
278  vtkGetObjectMacro(RayCastImage, vtkFixedPointRayCastImage);
280 
281  int PerImageInitialization(vtkRenderer*, vtkVolume*, int, double*, double*, int*);
286  void AbortRender();
287 
288  void CreateCanonicalView(vtkVolume* volume, vtkImageData* image, int blend_mode,
289  double viewDirection[3], double viewUp[3]);
290 
298  {
299  return this->RetrieveRenderTime(ren, vol);
300  }
301  float GetEstimatedRenderTime(vtkRenderer* ren) { return this->RetrieveRenderTime(ren); }
302 
304 
317  vtkSetMacro(FinalColorWindow, float);
318  vtkGetMacro(FinalColorWindow, float);
319  vtkSetMacro(FinalColorLevel, float);
320  vtkGetMacro(FinalColorLevel, float);
322 
323  // Here to be used by the mapper to tell the helper
324  // to flip the MIP comparison in order to support
325  // minimum intensity blending
326  vtkGetMacro(FlipMIPComparison, int);
327 
335 
336 protected:
339 
340  // The helper class that displays the image
342 
343  // The distance between sample points along the ray
346 
347  // The distance between rays in the image
353 
354  // Saved values used to restore
357 
358  // Internal method for computing matrices needed during
359  // ray casting
360  void ComputeMatrices(double volumeOrigin[3], double volumeSpacing[3], int volumeExtent[6],
361  vtkRenderer* ren, vtkVolume* vol);
362 
363  int ComputeRowBounds(vtkRenderer* ren, int imageFlag, int rowBoundsFlag, int volumeExtent[6]);
364 
366 
369 
371 
378 
380 
384 
385  // This object encapsulated the image and all related information
387 
388  int* RowBounds;
390 
396 
397  void StoreRenderTime(vtkRenderer* ren, vtkVolume* vol, float t);
400 
402 
404 
405  vtkColorTransferFunction* SavedRGBFunction[4];
406  vtkPiecewiseFunction* SavedGrayFunction[4];
407  vtkPiecewiseFunction* SavedScalarOpacityFunction[4];
408  vtkPiecewiseFunction* SavedGradientOpacityFunction[4];
409  int SavedColorChannels[4];
410  float SavedScalarOpacityDistance[4];
414 
417 
419 
420  unsigned short ColorTable[4][32768 * 3];
421  unsigned short ScalarOpacityTable[4][32768];
422  unsigned short GradientOpacityTable[4][256];
423  int TableSize[4];
424  float TableScale[4];
425  float TableShift[4];
426 
427  float GradientMagnitudeScale[4];
428  float GradientMagnitudeShift[4];
429 
430  unsigned short** GradientNormal;
431  unsigned char** GradientMagnitude;
432  unsigned short* ContiguousGradientNormal;
434 
436 
438 
440 
442 
443  unsigned short DiffuseShadingTable[4][65536 * 3];
444  unsigned short SpecularShadingTable[4][65536 * 3];
445 
448 
451 
454 
456  float rayStart[3], float rayEnd[3], float rayDirection[3], double bounds[6]);
457 
462 
464 
466  float rayStart[3], float rayEnd[3], int numClippingPlanes, float* clippingPlanes);
467 
468  unsigned int FixedPointCroppingRegionPlanes[6];
469  unsigned int CroppingRegionMask[27];
470 
471  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
472  // are indexing into the ImageInUse image. This must be converted to
473  // the zbuffer image coordinates. Nearest neighbor value is returned.
474  float GetZBufferValue(int x, int y);
475 
481 
482  // Some variables used for ray computation
483  float ViewToVoxelsArray[16];
484  float WorldToVoxelsArray[16];
485  float VoxelsToWorldArray[16];
486 
487  double CroppingBounds[6];
488 
491 
492  double SavedSpacing[3];
493 
494  // Min Max structure used to do space leaping
495  unsigned short* MinMaxVolume;
496  int MinMaxVolumeSize[4];
500 
502  void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3]);
503 
506 
508 
510 
511 private:
513  void operator=(const vtkFixedPointVolumeRayCastMapper&) = delete;
514 
515  bool ThreadWarning;
516 };
517 
519 {
520  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
521 }
522 
523 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition(float in[3], unsigned int out[3])
524 {
525  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
526  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
527  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
528 }
529 
531 {
532  return ((dir < 0.0) ? (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5))
533  : (0x80000000 + static_cast<unsigned int>(dir * VTKKW_FP_SCALE + 0.5)));
534 }
535 
537  float in[3], unsigned int out[3])
538 {
539  out[0] = ((in[0] < 0.0) ? (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5))
540  : (0x80000000 + static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5)));
541  out[1] = ((in[1] < 0.0) ? (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5))
542  : (0x80000000 + static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5)));
543  out[2] = ((in[2] < 0.0) ? (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5))
544  : (0x80000000 + static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5)));
545 }
546 
548  unsigned int position[3], unsigned int increment[3])
549 {
550  if (increment[0] & 0x80000000)
551  {
552  position[0] += (increment[0] & 0x7fffffff);
553  }
554  else
555  {
556  position[0] -= increment[0];
557  }
558  if (increment[1] & 0x80000000)
559  {
560  position[1] += (increment[1] & 0x7fffffff);
561  }
562  else
563  {
564  position[1] -= increment[1];
565  }
566  if (increment[2] & 0x80000000)
567  {
568  position[2] += (increment[2] & 0x7fffffff);
569  }
570  else
571  {
572  position[2] -= increment[2];
573  }
574 }
575 
577 {
578  v[0] = *(ptr);
579  v[1] = *(ptr + 1);
580  v[2] = *(ptr + 2);
581 }
582 
584  unsigned int v[3], unsigned int* ptr)
585 {
586  v[0] = *(ptr);
587  v[1] = *(ptr + 1);
588  v[2] = *(ptr + 2);
589 }
590 
592  unsigned int in[3], unsigned int out[3])
593 {
594  out[0] = in[0] >> VTKKW_FP_SHIFT;
595  out[1] = in[1] >> VTKKW_FP_SHIFT;
596  out[2] = in[2] >> VTKKW_FP_SHIFT;
597 }
598 
599 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag(unsigned int mmpos[3], int c)
600 {
601  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
602  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
603  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
604  static_cast<vtkIdType>(c);
605 
606  return ((*(this->MinMaxVolume + 3 * offset + 2)) & 0x00ff);
607 }
608 
610  unsigned int mmpos[3], int c, unsigned short maxIdx, int flip)
611 {
612  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
613  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
614  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
615  static_cast<vtkIdType>(c);
616 
617  if ((*(this->MinMaxVolume + 3 * offset + 2) & 0x00ff))
618  {
619  if (flip)
620  {
621  return (*(this->MinMaxVolume + 3 * offset) < maxIdx);
622  }
623  else
624  {
625  return (*(this->MinMaxVolume + 3 * offset + 1) > maxIdx);
626  }
627  }
628  else
629  {
630  return 0;
631  }
632 }
633 
634 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC(unsigned short* colorTable,
635  unsigned short* scalarOpacityTable, unsigned short index, unsigned char color[4])
636 {
637  unsigned short alpha = scalarOpacityTable[index];
638  color[0] = static_cast<unsigned char>(
639  (colorTable[3 * index] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
640  color[1] = static_cast<unsigned char>(
641  (colorTable[3 * index + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
642  color[2] = static_cast<unsigned char>(
643  (colorTable[3 * index + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
644  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
645 }
646 
647 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC(unsigned short* colorTable,
648  unsigned short* scalarOpacityTable, unsigned short index[4], int components,
649  unsigned char color[4])
650 {
651  unsigned short alpha;
652  switch (components)
653  {
654  case 2:
655  alpha = scalarOpacityTable[index[1]];
656  color[0] = static_cast<unsigned char>(
657  (colorTable[3 * index[0]] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
658  color[1] = static_cast<unsigned char>(
659  (colorTable[3 * index[0] + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
660  color[2] = static_cast<unsigned char>(
661  (colorTable[3 * index[0] + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
662  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
663  break;
664  case 4:
665  alpha = scalarOpacityTable[index[3]];
666  color[0] = static_cast<unsigned char>((index[0] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
667  color[1] = static_cast<unsigned char>((index[1] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
668  color[2] = static_cast<unsigned char>((index[2] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
669  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
670  break;
671  }
672 }
673 
675  unsigned short* colorTable[4], unsigned short* scalarOpacityTable[4], unsigned short index[4],
676  float weights[4], int components, unsigned char color[4])
677 {
678  unsigned int tmp[4] = { 0, 0, 0, 0 };
679 
680  for (int i = 0; i < components; i++)
681  {
682  unsigned short alpha =
683  static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]]) * weights[i]);
684  tmp[0] += static_cast<unsigned char>(
685  ((colorTable[i][3 * index[i]]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
686  tmp[1] += static_cast<unsigned char>(
687  ((colorTable[i][3 * index[i] + 1]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
688  tmp[2] += static_cast<unsigned char>(
689  ((colorTable[i][3 * index[i] + 2]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
690  tmp[3] += static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
691  }
692 
693  color[0] = static_cast<unsigned char>((tmp[0] > 255) ? (255) : (tmp[0]));
694  color[1] = static_cast<unsigned char>((tmp[1] > 255) ? (255) : (tmp[1]));
695  color[2] = static_cast<unsigned char>((tmp[2] > 255) ? (255) : (tmp[2]));
696  color[3] = static_cast<unsigned char>((tmp[3] > 255) ? (255) : (tmp[3]));
697 }
698 
700 {
701  int idx;
702 
703  if (pos[2] < this->FixedPointCroppingRegionPlanes[4])
704  {
705  idx = 0;
706  }
707  else if (pos[2] > this->FixedPointCroppingRegionPlanes[5])
708  {
709  idx = 18;
710  }
711  else
712  {
713  idx = 9;
714  }
715 
716  if (pos[1] >= this->FixedPointCroppingRegionPlanes[2])
717  {
718  if (pos[1] > this->FixedPointCroppingRegionPlanes[3])
719  {
720  idx += 6;
721  }
722  else
723  {
724  idx += 3;
725  }
726  }
727 
728  if (pos[0] >= this->FixedPointCroppingRegionPlanes[0])
729  {
730  if (pos[0] > this->FixedPointCroppingRegionPlanes[1])
731  {
732  idx += 2;
733  }
734  else
735  {
736  idx += 1;
737  }
738  }
739 
740  return !(static_cast<unsigned int>(this->CroppingRegionFlags) & this->CroppingRegionMask[idx]);
741 }
742 
743 #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:59
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:35
@ 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