VTK  9.2.6
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 =========================================================================*/
74 #ifndef vtkFixedPointVolumeRayCastMapper_h
75 #define vtkFixedPointVolumeRayCastMapper_h
76 
77 #include "vtkRenderingVolumeModule.h" // For export macro
78 #include "vtkThreads.h" // for VTK_THREAD_RETURN_TYPE
79 #include "vtkVolumeMapper.h"
80 
81 #define VTKKW_FP_SHIFT 15
82 #define VTKKW_FPMM_SHIFT 17
83 #define VTKKW_FP_MASK 0x7fff
84 #define VTKKW_FP_SCALE 32767.0
85 
86 class vtkMatrix4x4;
87 class vtkMultiThreader;
88 class vtkPlaneCollection;
89 class vtkRenderer;
90 class vtkTimerLog;
91 class vtkVolume;
92 class vtkTransform;
93 class vtkRenderWindow;
102 class vtkDirectionEncoder;
107 class vtkDataArray;
108 
109 // Forward declaration needed for use by friend declaration below.
110 VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
111 VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
112 
113 class VTKRENDERINGVOLUME_EXPORT vtkFixedPointVolumeRayCastMapper : public vtkVolumeMapper
114 {
115 public:
118  void PrintSelf(ostream& os, vtkIndent indent) override;
119 
121 
126  vtkSetMacro(SampleDistance, float);
127  vtkGetMacro(SampleDistance, float);
129 
131 
138  vtkSetMacro(InteractiveSampleDistance, float);
139  vtkGetMacro(InteractiveSampleDistance, float);
141 
143 
150  vtkSetClampMacro(ImageSampleDistance, float, 0.1f, 100.0f);
151  vtkGetMacro(ImageSampleDistance, float);
153 
155 
159  vtkSetClampMacro(MinimumImageSampleDistance, float, 0.1f, 100.0f);
160  vtkGetMacro(MinimumImageSampleDistance, float);
162 
164 
168  vtkSetClampMacro(MaximumImageSampleDistance, float, 0.1f, 100.0f);
169  vtkGetMacro(MaximumImageSampleDistance, float);
171 
173 
182  vtkSetClampMacro(AutoAdjustSampleDistances, vtkTypeBool, 0, 1);
183  vtkGetMacro(AutoAdjustSampleDistances, vtkTypeBool);
184  vtkBooleanMacro(AutoAdjustSampleDistances, vtkTypeBool);
186 
188 
196  vtkSetClampMacro(LockSampleDistanceToInputSpacing, vtkTypeBool, 0, 1);
197  vtkGetMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
198  vtkBooleanMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
200 
202 
207  void SetNumberOfThreads(int num);
210 
212 
216  vtkSetClampMacro(IntermixIntersectingGeometry, vtkTypeBool, 0, 1);
217  vtkGetMacro(IntermixIntersectingGeometry, vtkTypeBool);
218  vtkBooleanMacro(IntermixIntersectingGeometry, vtkTypeBool);
220 
222 
229  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren);
230  float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren, vtkVolume* vol);
232 
237  void Render(vtkRenderer*, vtkVolume*) override;
238 
239  unsigned int ToFixedPointPosition(float val);
240  void ToFixedPointPosition(float in[3], unsigned int out[3]);
241  unsigned int ToFixedPointDirection(float dir);
242  void ToFixedPointDirection(float in[3], unsigned int out[3]);
243  void FixedPointIncrement(unsigned int position[3], unsigned int increment[3]);
244  void GetFloatTripleFromPointer(float v[3], float* ptr);
245  void GetUIntTripleFromPointer(unsigned int v[3], unsigned int* ptr);
246  void ShiftVectorDown(unsigned int in[3], unsigned int out[3]);
247  int CheckMinMaxVolumeFlag(unsigned int pos[3], int c);
248  int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip);
249 
250  void LookupColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
251  unsigned short index, unsigned char color[4]);
252  void LookupDependentColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
253  unsigned short index[4], int components, unsigned char color[4]);
254  void LookupAndCombineIndependentColorsUC(unsigned short* colorTable[4],
255  unsigned short* scalarOpacityTable[4], unsigned short index[4], float weights[4],
256  int components, unsigned char color[4]);
257  int CheckIfCropped(unsigned int pos[3]);
258 
259  vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
260  vtkGetObjectMacro(MIPHelper, vtkFixedPointVolumeRayCastMIPHelper);
261  vtkGetObjectMacro(CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper);
262  vtkGetObjectMacro(CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper);
263  vtkGetObjectMacro(CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper);
264  vtkGetObjectMacro(CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper);
265  vtkGetVectorMacro(TableShift, float, 4);
266  vtkGetVectorMacro(TableScale, float, 4);
267  vtkGetMacro(ShadingRequired, int);
268  vtkGetMacro(GradientOpacityRequired, int);
269 
270  vtkGetObjectMacro(CurrentScalars, vtkDataArray);
271  vtkGetObjectMacro(PreviousScalars, vtkDataArray);
272 
273  int* GetRowBounds() { return this->RowBounds; }
274  unsigned short* GetColorTable(int c) { return this->ColorTable[c]; }
275  unsigned short* GetScalarOpacityTable(int c) { return this->ScalarOpacityTable[c]; }
276  unsigned short* GetGradientOpacityTable(int c) { return this->GradientOpacityTable[c]; }
277  vtkVolume* GetVolume() { return this->Volume; }
278  unsigned short** GetGradientNormal() { return this->GradientNormal; }
279  unsigned char** GetGradientMagnitude() { return this->GradientMagnitude; }
280  unsigned short* GetDiffuseShadingTable(int c) { return this->DiffuseShadingTable[c]; }
281  unsigned short* GetSpecularShadingTable(int c) { return this->SpecularShadingTable[c]; }
282 
284  int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int* numSteps);
285 
287 
289 
291 
297  vtkGetObjectMacro(RayCastImage, vtkFixedPointRayCastImage);
299 
300  int PerImageInitialization(vtkRenderer*, vtkVolume*, int, double*, double*, int*);
305  void AbortRender();
306 
307  void CreateCanonicalView(vtkVolume* volume, vtkImageData* image, int blend_mode,
308  double viewDirection[3], double viewUp[3]);
309 
317  {
318  return this->RetrieveRenderTime(ren, vol);
319  }
320  float GetEstimatedRenderTime(vtkRenderer* ren) { return this->RetrieveRenderTime(ren); }
321 
323 
336  vtkSetMacro(FinalColorWindow, float);
337  vtkGetMacro(FinalColorWindow, float);
338  vtkSetMacro(FinalColorLevel, float);
339  vtkGetMacro(FinalColorLevel, float);
341 
342  // Here to be used by the mapper to tell the helper
343  // to flip the MIP comparison in order to support
344  // minimum intensity blending
345  vtkGetMacro(FlipMIPComparison, int);
346 
354 
355 protected:
358 
359  // The helper class that displays the image
361 
362  // The distance between sample points along the ray
365 
366  // The distance between rays in the image
372 
373  // Saved values used to restore
376 
377  // Internal method for computing matrices needed during
378  // ray casting
379  void ComputeMatrices(double inputOrigin[3], double inputSpacing[3], int inputExtent[6],
380  vtkRenderer* ren, vtkVolume* vol);
381 
382  int ComputeRowBounds(vtkRenderer* ren, int imageFlag, int rowBoundsFlag, int inputExtent[6]);
383 
385 
386  friend VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
387  friend VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
388 
390 
397 
399 
403 
404  // This object encapsulated the image and all related information
406 
407  int* RowBounds;
409 
415 
416  void StoreRenderTime(vtkRenderer* ren, vtkVolume* vol, float t);
419 
421 
423 
424  vtkColorTransferFunction* SavedRGBFunction[4];
425  vtkPiecewiseFunction* SavedGrayFunction[4];
426  vtkPiecewiseFunction* SavedScalarOpacityFunction[4];
427  vtkPiecewiseFunction* SavedGradientOpacityFunction[4];
428  int SavedColorChannels[4];
429  float SavedScalarOpacityDistance[4];
433 
436 
438 
439  unsigned short ColorTable[4][32768 * 3];
440  unsigned short ScalarOpacityTable[4][32768];
441  unsigned short GradientOpacityTable[4][256];
442  int TableSize[4];
443  float TableScale[4];
444  float TableShift[4];
445 
446  float GradientMagnitudeScale[4];
447  float GradientMagnitudeShift[4];
448 
449  unsigned short** GradientNormal;
450  unsigned char** GradientMagnitude;
451  unsigned short* ContiguousGradientNormal;
453 
455 
457 
459 
461 
462  unsigned short DiffuseShadingTable[4][65536 * 3];
463  unsigned short SpecularShadingTable[4][65536 * 3];
464 
467 
470 
473 
475  double rayStart[3], double rayEnd[3], float rayDirection[3], double bounds[6]);
476 
481 
483 
485  double rayStart[3], double rayEnd[3], int numClippingPlanes, float* clippingPlanes);
486 
487  unsigned int FixedPointCroppingRegionPlanes[6];
488  unsigned int CroppingRegionMask[27];
489 
490  // Get the ZBuffer value corresponding to location (x,y) where (x,y)
491  // are indexing into the ImageInUse image. This must be converted to
492  // the zbuffer image coordinates. Nearest neighbor value is returned.
493  float GetZBufferValue(int x, int y);
494 
500 
501  // Some variables used for ray computation
502  float ViewToVoxelsArray[16];
503  float WorldToVoxelsArray[16];
504  float VoxelsToWorldArray[16];
505 
506  double CroppingBounds[6];
507 
510 
511  double SavedSpacing[3];
512 
513  // Min Max structure used to do space leaping
514  unsigned short* MinMaxVolume;
515  int MinMaxVolumeSize[4];
519 
521  void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3]);
522 
525 
527 
529 
530 private:
532  void operator=(const vtkFixedPointVolumeRayCastMapper&) = delete;
533 
534  bool ThreadWarning;
535 };
536 
538 {
539  return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
540 }
541 
542 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition(float in[3], unsigned int out[3])
543 {
544  out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
545  out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
546  out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
547 }
548 
550 {
551  return ((dir < 0.0) ? (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5))
552  : (0x80000000 + static_cast<unsigned int>(dir * VTKKW_FP_SCALE + 0.5)));
553 }
554 
556  float in[3], unsigned int out[3])
557 {
558  out[0] = ((in[0] < 0.0) ? (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5))
559  : (0x80000000 + static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5)));
560  out[1] = ((in[1] < 0.0) ? (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5))
561  : (0x80000000 + static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5)));
562  out[2] = ((in[2] < 0.0) ? (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5))
563  : (0x80000000 + static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5)));
564 }
565 
567  unsigned int position[3], unsigned int increment[3])
568 {
569  if (increment[0] & 0x80000000)
570  {
571  position[0] += (increment[0] & 0x7fffffff);
572  }
573  else
574  {
575  position[0] -= increment[0];
576  }
577  if (increment[1] & 0x80000000)
578  {
579  position[1] += (increment[1] & 0x7fffffff);
580  }
581  else
582  {
583  position[1] -= increment[1];
584  }
585  if (increment[2] & 0x80000000)
586  {
587  position[2] += (increment[2] & 0x7fffffff);
588  }
589  else
590  {
591  position[2] -= increment[2];
592  }
593 }
594 
596 {
597  v[0] = *(ptr);
598  v[1] = *(ptr + 1);
599  v[2] = *(ptr + 2);
600 }
601 
603  unsigned int v[3], unsigned int* ptr)
604 {
605  v[0] = *(ptr);
606  v[1] = *(ptr + 1);
607  v[2] = *(ptr + 2);
608 }
609 
611  unsigned int in[3], unsigned int out[3])
612 {
613  out[0] = in[0] >> VTKKW_FP_SHIFT;
614  out[1] = in[1] >> VTKKW_FP_SHIFT;
615  out[2] = in[2] >> VTKKW_FP_SHIFT;
616 }
617 
618 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag(unsigned int mmpos[3], int c)
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  return ((*(this->MinMaxVolume + 3 * offset + 2)) & 0x00ff);
626 }
627 
629  unsigned int mmpos[3], int c, unsigned short maxIdx, int flip)
630 {
631  vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
632  (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
633  mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
634  static_cast<vtkIdType>(c);
635 
636  if ((*(this->MinMaxVolume + 3 * offset + 2) & 0x00ff))
637  {
638  if (flip)
639  {
640  return (*(this->MinMaxVolume + 3 * offset) < maxIdx);
641  }
642  else
643  {
644  return (*(this->MinMaxVolume + 3 * offset + 1) > maxIdx);
645  }
646  }
647  else
648  {
649  return 0;
650  }
651 }
652 
653 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC(unsigned short* colorTable,
654  unsigned short* scalarOpacityTable, unsigned short index, unsigned char color[4])
655 {
656  unsigned short alpha = scalarOpacityTable[index];
657  color[0] = static_cast<unsigned char>(
658  (colorTable[3 * index] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
659  color[1] = static_cast<unsigned char>(
660  (colorTable[3 * index + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
661  color[2] = static_cast<unsigned char>(
662  (colorTable[3 * index + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
663  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
664 }
665 
666 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC(unsigned short* colorTable,
667  unsigned short* scalarOpacityTable, unsigned short index[4], int components,
668  unsigned char color[4])
669 {
670  unsigned short alpha;
671  switch (components)
672  {
673  case 2:
674  alpha = scalarOpacityTable[index[1]];
675  color[0] = static_cast<unsigned char>(
676  (colorTable[3 * index[0]] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
677  color[1] = static_cast<unsigned char>(
678  (colorTable[3 * index[0] + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
679  color[2] = static_cast<unsigned char>(
680  (colorTable[3 * index[0] + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
681  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
682  break;
683  case 4:
684  alpha = scalarOpacityTable[index[3]];
685  color[0] = static_cast<unsigned char>((index[0] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
686  color[1] = static_cast<unsigned char>((index[1] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
687  color[2] = static_cast<unsigned char>((index[2] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
688  color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
689  break;
690  }
691 }
692 
694  unsigned short* colorTable[4], unsigned short* scalarOpacityTable[4], unsigned short index[4],
695  float weights[4], int components, unsigned char color[4])
696 {
697  unsigned int tmp[4] = { 0, 0, 0, 0 };
698 
699  for (int i = 0; i < components; i++)
700  {
701  unsigned short alpha =
702  static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]]) * weights[i]);
703  tmp[0] += static_cast<unsigned char>(
704  ((colorTable[i][3 * index[i]]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
705  tmp[1] += static_cast<unsigned char>(
706  ((colorTable[i][3 * index[i] + 1]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
707  tmp[2] += static_cast<unsigned char>(
708  ((colorTable[i][3 * index[i] + 2]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
709  tmp[3] += static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
710  }
711 
712  color[0] = static_cast<unsigned char>((tmp[0] > 255) ? (255) : (tmp[0]));
713  color[1] = static_cast<unsigned char>((tmp[1] > 255) ? (255) : (tmp[1]));
714  color[2] = static_cast<unsigned char>((tmp[2] > 255) ? (255) : (tmp[2]));
715  color[3] = static_cast<unsigned char>((tmp[3] > 255) ? (255) : (tmp[3]));
716 }
717 
719 {
720  int idx;
721 
722  if (pos[2] < this->FixedPointCroppingRegionPlanes[4])
723  {
724  idx = 0;
725  }
726  else if (pos[2] > this->FixedPointCroppingRegionPlanes[5])
727  {
728  idx = 18;
729  }
730  else
731  {
732  idx = 9;
733  }
734 
735  if (pos[1] >= this->FixedPointCroppingRegionPlanes[2])
736  {
737  if (pos[1] > this->FixedPointCroppingRegionPlanes[3])
738  {
739  idx += 6;
740  }
741  else
742  {
743  idx += 3;
744  }
745  }
746 
747  if (pos[0] >= this->FixedPointCroppingRegionPlanes[0])
748  {
749  if (pos[0] > this->FixedPointCroppingRegionPlanes[1])
750  {
751  idx += 2;
752  }
753  else
754  {
755  idx += 1;
756  }
757  }
758 
759  return !(static_cast<unsigned int>(this->CroppingRegionFlags) & this->CroppingRegionMask[idx]);
760 }
761 
762 #endif
Defines a transfer function for mapping a property to an RGB color value.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:65
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:63
a simple class to control print indentation
Definition: vtkIndent.h:49
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:51
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:82
record modification and/or execution time
Definition: vtkTimeStamp.h:45
Timer support and logging.
Definition: vtkTimerLog.h:105
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:70
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:60
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
@ 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