VTK: Rendering/Volume/vtkFixedPointVolumeRayCastMapper.h Source File

| VTK 9.3.1

vtkFixedPointVolumeRayCastMapper.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
62 #ifndef vtkFixedPointVolumeRayCastMapper_h
63 #define vtkFixedPointVolumeRayCastMapper_h
64
65 #include "vtkRenderingVolumeModule.h" // For export macro
66 #include "vtkThreads.h" // for VTK_THREAD_RETURN_TYPE
67 #include "vtkVolumeMapper.h"
68
69 #define VTKKW_FP_SHIFT 15
70 #define VTKKW_FPMM_SHIFT 17
71 #define VTKKW_FP_MASK 0x7fff
72 #define VTKKW_FP_SCALE 32767.0
73
74 VTK_ABI_NAMESPACE_BEGIN
75 class vtkMatrix4x4;
76 class vtkMultiThreader;
77 class vtkPlaneCollection;
78 class vtkRenderer;
79 class vtkTimerLog;
80 class vtkVolume;
81 class vtkTransform;
82 class vtkRenderWindow;
83 class vtkColorTransferFunction;
84 class vtkPiecewiseFunction;
85 class vtkFixedPointVolumeRayCastMIPHelper;
86 class vtkFixedPointVolumeRayCastCompositeHelper;
87 class vtkFixedPointVolumeRayCastCompositeGOHelper;
88 class vtkFixedPointVolumeRayCastCompositeGOShadeHelper;
89 class vtkFixedPointVolumeRayCastCompositeShadeHelper;
90 class vtkVolumeRayCastSpaceLeapingImageFilter;
91 class vtkDirectionEncoder;
92 class vtkEncodedGradientShader;
93 class vtkFiniteDifferenceGradientEstimator;
94 class vtkRayCastImageDisplayHelper;
95 class vtkFixedPointRayCastImage;
96 class vtkDataArray;
97
98 // Forward declaration needed for use by friend declaration below.
99 VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
100 VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
101
102 class VTKRENDERINGVOLUME_EXPORT vtkFixedPointVolumeRayCastMapper : public vtkVolumeMapper
103 {
104 public:
105 static vtkFixedPointVolumeRayCastMapper* New();
106 vtkTypeMacro(vtkFixedPointVolumeRayCastMapper, vtkVolumeMapper);
107 void PrintSelf(ostream& os, vtkIndent indent) override;
108
110
115 vtkSetMacro(SampleDistance, float);
116 vtkGetMacro(SampleDistance, float);
118
120
127 vtkSetMacro(InteractiveSampleDistance, float);
128 vtkGetMacro(InteractiveSampleDistance, float);
130
132
139 vtkSetClampMacro(ImageSampleDistance, float, 0.1f, 100.0f);
140 vtkGetMacro(ImageSampleDistance, float);
142
144
148 vtkSetClampMacro(MinimumImageSampleDistance, float, 0.1f, 100.0f);
149 vtkGetMacro(MinimumImageSampleDistance, float);
151
153
157 vtkSetClampMacro(MaximumImageSampleDistance, float, 0.1f, 100.0f);
158 vtkGetMacro(MaximumImageSampleDistance, float);
160
162
171 vtkSetClampMacro(AutoAdjustSampleDistances, vtkTypeBool, 0, 1);
172 vtkGetMacro(AutoAdjustSampleDistances, vtkTypeBool);
173 vtkBooleanMacro(AutoAdjustSampleDistances, vtkTypeBool);
175
177
185 vtkSetClampMacro(LockSampleDistanceToInputSpacing, vtkTypeBool, 0, 1);
186 vtkGetMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
187 vtkBooleanMacro(LockSampleDistanceToInputSpacing, vtkTypeBool);
189
191
196 void SetNumberOfThreads(int num);
197 int GetNumberOfThreads();
199
201
205 vtkSetClampMacro(IntermixIntersectingGeometry, vtkTypeBool, 0, 1);
206 vtkGetMacro(IntermixIntersectingGeometry, vtkTypeBool);
207 vtkBooleanMacro(IntermixIntersectingGeometry, vtkTypeBool);
209
211
218 float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren);
219 float ComputeRequiredImageSampleDistance(float desiredTime, vtkRenderer* ren, vtkVolume* vol);
221
226 void Render(vtkRenderer*, vtkVolume*) override;
227
228 unsigned int ToFixedPointPosition(float val);
229 void ToFixedPointPosition(float in[3], unsigned int out[3]);
230 unsigned int ToFixedPointDirection(float dir);
231 void ToFixedPointDirection(float in[3], unsigned int out[3]);
232 void FixedPointIncrement(unsigned int position[3], unsigned int increment[3]);
233 void GetFloatTripleFromPointer(float v[3], float* ptr);
234 void GetUIntTripleFromPointer(unsigned int v[3], unsigned int* ptr);
235 void ShiftVectorDown(unsigned int in[3], unsigned int out[3]);
236 int CheckMinMaxVolumeFlag(unsigned int pos[3], int c);
237 int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip);
238
239 void LookupColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
240 unsigned short index, unsigned char color[4]);
241 void LookupDependentColorUC(unsigned short* colorTable, unsigned short* scalarOpacityTable,
242 unsigned short index[4], int components, unsigned char color[4]);
243 void LookupAndCombineIndependentColorsUC(unsigned short* colorTable[4],
244 unsigned short* scalarOpacityTable[4], unsigned short index[4], float weights[4],
245 int components, unsigned char color[4]);
246 int CheckIfCropped(unsigned int pos[3]);
247
248 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
249 vtkGetObjectMacro(MIPHelper, vtkFixedPointVolumeRayCastMIPHelper);
250 vtkGetObjectMacro(CompositeHelper, vtkFixedPointVolumeRayCastCompositeHelper);
251 vtkGetObjectMacro(CompositeGOHelper, vtkFixedPointVolumeRayCastCompositeGOHelper);
252 vtkGetObjectMacro(CompositeGOShadeHelper, vtkFixedPointVolumeRayCastCompositeGOShadeHelper);
253 vtkGetObjectMacro(CompositeShadeHelper, vtkFixedPointVolumeRayCastCompositeShadeHelper);
254 vtkGetVectorMacro(TableShift, float, 4);
255 vtkGetVectorMacro(TableScale, float, 4);
256 vtkGetMacro(ShadingRequired, int);
257 vtkGetMacro(GradientOpacityRequired, int);
258
259 vtkGetObjectMacro(CurrentScalars, vtkDataArray);
260 vtkGetObjectMacro(PreviousScalars, vtkDataArray);
261
262 int* GetRowBounds() { return this->RowBounds; }
263 unsigned short* GetColorTable(int c) { return this->ColorTable[c]; }
264 unsigned short* GetScalarOpacityTable(int c) { return this->ScalarOpacityTable[c]; }
265 unsigned short* GetGradientOpacityTable(int c) { return this->GradientOpacityTable[c]; }
266 vtkVolume* GetVolume() { return this->Volume; }
267 unsigned short** GetGradientNormal() { return this->GradientNormal; }
268 unsigned char** GetGradientMagnitude() { return this->GradientMagnitude; }
269 unsigned short* GetDiffuseShadingTable(int c) { return this->DiffuseShadingTable[c]; }
270 unsigned short* GetSpecularShadingTable(int c) { return this->SpecularShadingTable[c]; }
271
272 void ComputeRayInfo(
273 int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int* numSteps);
274
275 void InitializeRayInfo(vtkVolume* vol);
276
277 int ShouldUseNearestNeighborInterpolation(vtkVolume* vol);
278
280
285 void SetRayCastImage(vtkFixedPointRayCastImage*);
286 vtkGetObjectMacro(RayCastImage, vtkFixedPointRayCastImage);
288
289 int PerImageInitialization(vtkRenderer*, vtkVolume*, int, double*, double*, int*);
290 void PerVolumeInitialization(vtkRenderer*, vtkVolume*);
291 void PerSubVolumeInitialization(vtkRenderer*, vtkVolume*, int);
292 void RenderSubVolume();
293 void DisplayRenderedImage(vtkRenderer*, vtkVolume*);
294 void AbortRender();
295
296 void CreateCanonicalView(vtkVolume* volume, vtkImageData* image, int blend_mode,
297 double viewDirection[3], double viewUp[3]);
298
305 float GetEstimatedRenderTime(vtkRenderer* ren, vtkVolume* vol)
306 {
307 return this->RetrieveRenderTime(ren, vol);
308 }
309 float GetEstimatedRenderTime(vtkRenderer* ren) { return this->RetrieveRenderTime(ren); }
310
312
325 vtkSetMacro(FinalColorWindow, float);
326 vtkGetMacro(FinalColorWindow, float);
327 vtkSetMacro(FinalColorLevel, float);
328 vtkGetMacro(FinalColorLevel, float);
330
331 // Here to be used by the mapper to tell the helper
332 // to flip the MIP comparison in order to support
333 // minimum intensity blending
334 vtkGetMacro(FlipMIPComparison, int);
335
342 void ReleaseGraphicsResources(vtkWindow*) override;
343
344 protected:
345 vtkFixedPointVolumeRayCastMapper();
346 ~vtkFixedPointVolumeRayCastMapper() override;
347
348 // The helper class that displays the image
349 vtkRayCastImageDisplayHelper* ImageDisplayHelper;
350
351 // The distance between sample points along the ray
352 float SampleDistance;
353 float InteractiveSampleDistance;
354
355 // The distance between rays in the image
356 float ImageSampleDistance;
357 float MinimumImageSampleDistance;
358 float MaximumImageSampleDistance;
359 vtkTypeBool AutoAdjustSampleDistances;
360 vtkTypeBool LockSampleDistanceToInputSpacing;
361
362 // Saved values used to restore
363 float OldSampleDistance;
364 float OldImageSampleDistance;
365
366 // Internal method for computing matrices needed during
367 // ray casting
368 void ComputeMatrices(double inputOrigin[3], double inputSpacing[3], int inputExtent[6],
369 vtkRenderer* ren, vtkVolume* vol);
370
371 int ComputeRowBounds(vtkRenderer* ren, int imageFlag, int rowBoundsFlag, int inputExtent[6]);
372
373 void CaptureZBuffer(vtkRenderer* ren);
374
375 friend VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void* arg);
376 friend VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void* arg);
377
378 vtkMultiThreader* Threader;
379
380 vtkMatrix4x4* PerspectiveMatrix;
381 vtkMatrix4x4* ViewToWorldMatrix;
382 vtkMatrix4x4* ViewToVoxelsMatrix;
383 vtkMatrix4x4* VoxelsToViewMatrix;
384 vtkMatrix4x4* WorldToVoxelsMatrix;
385 vtkMatrix4x4* VoxelsToWorldMatrix;
386
387 vtkMatrix4x4* VolumeMatrix;
388
389 vtkTransform* PerspectiveTransform;
390 vtkTransform* VoxelsTransform;
391 vtkTransform* VoxelsToViewTransform;
392
393 // This object encapsulated the image and all related information
394 vtkFixedPointRayCastImage* RayCastImage;
395
396 int* RowBounds;
397 int* OldRowBounds;
398
399 float* RenderTimeTable;
400 vtkVolume** RenderVolumeTable;
401 vtkRenderer** RenderRendererTable;
402 int RenderTableSize;
403 int RenderTableEntries;
404
405 void StoreRenderTime(vtkRenderer* ren, vtkVolume* vol, float t);
406 float RetrieveRenderTime(vtkRenderer* ren, vtkVolume* vol);
407 float RetrieveRenderTime(vtkRenderer* ren);
408
409 vtkTypeBool IntermixIntersectingGeometry;
410
411 float MinimumViewDistance;
412
413 vtkColorTransferFunction* SavedRGBFunction[4];
414 vtkPiecewiseFunction* SavedGrayFunction[4];
415 vtkPiecewiseFunction* SavedScalarOpacityFunction[4];
416 vtkPiecewiseFunction* SavedGradientOpacityFunction[4];
417 int SavedColorChannels[4];
418 float SavedScalarOpacityDistance[4];
419 int SavedBlendMode;
420 vtkImageData* SavedParametersInput;
421 vtkTimeStamp SavedParametersMTime;
422
423 vtkImageData* SavedGradientsInput;
424 vtkTimeStamp SavedGradientsMTime;
425
426 float SavedSampleDistance;
427
428 unsigned short ColorTable[4][32768 * 3];
429 unsigned short ScalarOpacityTable[4][32768];
430 unsigned short GradientOpacityTable[4][256];
431 int TableSize[4];
432 float TableScale[4];
433 float TableShift[4];
434
435 float GradientMagnitudeScale[4];
436 float GradientMagnitudeShift[4];
437
438 unsigned short** GradientNormal;
439 unsigned char** GradientMagnitude;
440 unsigned short* ContiguousGradientNormal;
441 unsigned char* ContiguousGradientMagnitude;
442
443 int NumberOfGradientSlices;
444
445 vtkDirectionEncoder* DirectionEncoder;
446
447 vtkEncodedGradientShader* GradientShader;
448
449 vtkFiniteDifferenceGradientEstimator* GradientEstimator;
450
451 unsigned short DiffuseShadingTable[4][65536 * 3];
452 unsigned short SpecularShadingTable[4][65536 * 3];
453
454 int ShadingRequired;
455 int GradientOpacityRequired;
456
457 vtkDataArray* CurrentScalars;
458 vtkDataArray* PreviousScalars;
459
460 vtkRenderWindow* RenderWindow;
461 vtkVolume* Volume;
462
463 int ClipRayAgainstVolume(
464 double rayStart[3], double rayEnd[3], float rayDirection[3], double bounds[6]);
465
466 int UpdateColorTable(vtkVolume* vol);
467 int UpdateGradients(vtkVolume* vol);
468 int UpdateShadingTable(vtkRenderer* ren, vtkVolume* vol);
469 void UpdateCroppingRegions();
470
471 void ComputeGradients(vtkVolume* vol);
472
473 int ClipRayAgainstClippingPlanes(
474 double rayStart[3], double rayEnd[3], int numClippingPlanes, float* clippingPlanes);
475
476 unsigned int FixedPointCroppingRegionPlanes[6];
477 unsigned int CroppingRegionMask[27];
478
479 // Get the ZBuffer value corresponding to location (x,y) where (x,y)
480 // are indexing into the ImageInUse image. This must be converted to
481 // the zbuffer image coordinates. Nearest neighbor value is returned.
482 float GetZBufferValue(int x, int y);
483
484 vtkFixedPointVolumeRayCastMIPHelper* MIPHelper;
485 vtkFixedPointVolumeRayCastCompositeHelper* CompositeHelper;
486 vtkFixedPointVolumeRayCastCompositeGOHelper* CompositeGOHelper;
487 vtkFixedPointVolumeRayCastCompositeShadeHelper* CompositeShadeHelper;
488 vtkFixedPointVolumeRayCastCompositeGOShadeHelper* CompositeGOShadeHelper;
489
490 // Some variables used for ray computation
491 float ViewToVoxelsArray[16];
492 float WorldToVoxelsArray[16];
493 float VoxelsToWorldArray[16];
494
495 double CroppingBounds[6];
496
497 int NumTransformedClippingPlanes;
498 float* TransformedClippingPlanes;
499
500 double SavedSpacing[3];
501
502 // Min Max structure used to do space leaping
503 unsigned short* MinMaxVolume;
504 int MinMaxVolumeSize[4];
505 vtkImageData* SavedMinMaxInput;
506 vtkImageData* MinMaxVolumeCache;
507 vtkVolumeRayCastSpaceLeapingImageFilter* SpaceLeapFilter;
508
509 void UpdateMinMaxVolume(vtkVolume* vol);
510 void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3]);
511
512 float FinalColorWindow;
513 float FinalColorLevel;
514
515 int FlipMIPComparison;
516
517 void ApplyFinalColorWindowLevel();
518
519 private:
520 vtkFixedPointVolumeRayCastMapper(const vtkFixedPointVolumeRayCastMapper&) = delete;
521 void operator=(const vtkFixedPointVolumeRayCastMapper&) = delete;
522
523 bool ThreadWarning;
524 };
525
526 inline unsigned int vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition(float val)
527 {
528 return static_cast<unsigned int>(val * VTKKW_FP_SCALE + 0.5);
529 }
530
531 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition(float in[3], unsigned int out[3])
532 {
533 out[0] = static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5);
534 out[1] = static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5);
535 out[2] = static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5);
536 }
537
538 inline unsigned int vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection(float dir)
539 {
540 return ((dir < 0.0) ? (static_cast<unsigned int>(-dir * VTKKW_FP_SCALE + 0.5))
541 : (0x80000000 + static_cast<unsigned int>(dir * VTKKW_FP_SCALE + 0.5)));
542 }
543
544 inline void vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection(
545 float in[3], unsigned int out[3])
546 {
547 out[0] = ((in[0] < 0.0) ? (static_cast<unsigned int>(-in[0] * VTKKW_FP_SCALE + 0.5))
548 : (0x80000000 + static_cast<unsigned int>(in[0] * VTKKW_FP_SCALE + 0.5)));
549 out[1] = ((in[1] < 0.0) ? (static_cast<unsigned int>(-in[1] * VTKKW_FP_SCALE + 0.5))
550 : (0x80000000 + static_cast<unsigned int>(in[1] * VTKKW_FP_SCALE + 0.5)));
551 out[2] = ((in[2] < 0.0) ? (static_cast<unsigned int>(-in[2] * VTKKW_FP_SCALE + 0.5))
552 : (0x80000000 + static_cast<unsigned int>(in[2] * VTKKW_FP_SCALE + 0.5)));
553 }
554
555 inline void vtkFixedPointVolumeRayCastMapper::FixedPointIncrement(
556 unsigned int position[3], unsigned int increment[3])
557 {
558 if (increment[0] & 0x80000000)
559 {
560 position[0] += (increment[0] & 0x7fffffff);
561 }
562 else
563 {
564 position[0] -= increment[0];
565 }
566 if (increment[1] & 0x80000000)
567 {
568 position[1] += (increment[1] & 0x7fffffff);
569 }
570 else
571 {
572 position[1] -= increment[1];
573 }
574 if (increment[2] & 0x80000000)
575 {
576 position[2] += (increment[2] & 0x7fffffff);
577 }
578 else
579 {
580 position[2] -= increment[2];
581 }
582 }
583
584 inline void vtkFixedPointVolumeRayCastMapper::GetFloatTripleFromPointer(float v[3], float* ptr)
585 {
586 v[0] = *(ptr);
587 v[1] = *(ptr + 1);
588 v[2] = *(ptr + 2);
589 }
590
591 inline void vtkFixedPointVolumeRayCastMapper::GetUIntTripleFromPointer(
592 unsigned int v[3], unsigned int* ptr)
593 {
594 v[0] = *(ptr);
595 v[1] = *(ptr + 1);
596 v[2] = *(ptr + 2);
597 }
598
599 inline void vtkFixedPointVolumeRayCastMapper::ShiftVectorDown(
600 unsigned int in[3], unsigned int out[3])
601 {
602 out[0] = in[0] >> VTKKW_FP_SHIFT;
603 out[1] = in[1] >> VTKKW_FP_SHIFT;
604 out[2] = in[2] >> VTKKW_FP_SHIFT;
605 }
606
607 inline int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag(unsigned int mmpos[3], int c)
608 {
609 vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
610 (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
611 mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
612 static_cast<vtkIdType>(c);
613
614 return ((*(this->MinMaxVolume + 3 * offset + 2)) & 0x00ff);
615 }
616
617 inline int vtkFixedPointVolumeRayCastMapper::CheckMIPMinMaxVolumeFlag(
618 unsigned int mmpos[3], int c, unsigned short maxIdx, int flip)
619 {
620 vtkIdType offset = static_cast<vtkIdType>(this->MinMaxVolumeSize[3]) *
621 (mmpos[2] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0] * this->MinMaxVolumeSize[1]) +
622 mmpos[1] * static_cast<vtkIdType>(this->MinMaxVolumeSize[0]) + mmpos[0]) +
623 static_cast<vtkIdType>(c);
624
625 if ((*(this->MinMaxVolume + 3 * offset + 2) & 0x00ff))
626 {
627 if (flip)
628 {
629 return (*(this->MinMaxVolume + 3 * offset) < maxIdx);
630 }
631 else
632 {
633 return (*(this->MinMaxVolume + 3 * offset + 1) > maxIdx);
634 }
635 }
636 else
637 {
638 return 0;
639 }
640 }
641
642 inline void vtkFixedPointVolumeRayCastMapper::LookupColorUC(unsigned short* colorTable,
643 unsigned short* scalarOpacityTable, unsigned short index, unsigned char color[4])
644 {
645 unsigned short alpha = scalarOpacityTable[index];
646 color[0] = static_cast<unsigned char>(
647 (colorTable[3 * index] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
648 color[1] = static_cast<unsigned char>(
649 (colorTable[3 * index + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
650 color[2] = static_cast<unsigned char>(
651 (colorTable[3 * index + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
652 color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
653 }
654
655 inline void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC(unsigned short* colorTable,
656 unsigned short* scalarOpacityTable, unsigned short index[4], int components,
657 unsigned char color[4])
658 {
659 unsigned short alpha;
660 switch (components)
661 {
662 case 2:
663 alpha = scalarOpacityTable[index[1]];
664 color[0] = static_cast<unsigned char>(
665 (colorTable[3 * index[0]] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
666 color[1] = static_cast<unsigned char>(
667 (colorTable[3 * index[0] + 1] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
668 color[2] = static_cast<unsigned char>(
669 (colorTable[3 * index[0] + 2] * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
670 color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
671 break;
672 case 4:
673 alpha = scalarOpacityTable[index[3]];
674 color[0] = static_cast<unsigned char>((index[0] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
675 color[1] = static_cast<unsigned char>((index[1] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
676 color[2] = static_cast<unsigned char>((index[2] * alpha + 0x7fff) >> VTKKW_FP_SHIFT);
677 color[3] = static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
678 break;
679 }
680 }
681
682 inline void vtkFixedPointVolumeRayCastMapper::LookupAndCombineIndependentColorsUC(
683 unsigned short* colorTable[4], unsigned short* scalarOpacityTable[4], unsigned short index[4],
684 float weights[4], int components, unsigned char color[4])
685 {
686 unsigned int tmp[4] = { 0, 0, 0, 0 };
687
688 for (int i = 0; i < components; i++)
689 {
690 unsigned short alpha =
691 static_cast<unsigned short>(static_cast<float>(scalarOpacityTable[i][index[i]]) * weights[i]);
692 tmp[0] += static_cast<unsigned char>(
693 ((colorTable[i][3 * index[i]]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
694 tmp[1] += static_cast<unsigned char>(
695 ((colorTable[i][3 * index[i] + 1]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
696 tmp[2] += static_cast<unsigned char>(
697 ((colorTable[i][3 * index[i] + 2]) * alpha + 0x7fff) >> (2 * VTKKW_FP_SHIFT - 8));
698 tmp[3] += static_cast<unsigned char>(alpha >> (VTKKW_FP_SHIFT - 8));
699 }
700
701 color[0] = static_cast<unsigned char>((tmp[0] > 255) ? (255) : (tmp[0]));
702 color[1] = static_cast<unsigned char>((tmp[1] > 255) ? (255) : (tmp[1]));
703 color[2] = static_cast<unsigned char>((tmp[2] > 255) ? (255) : (tmp[2]));
704 color[3] = static_cast<unsigned char>((tmp[3] > 255) ? (255) : (tmp[3]));
705 }
706
707 inline int vtkFixedPointVolumeRayCastMapper::CheckIfCropped(unsigned int pos[3])
708 {
709 int idx;
710
711 if (pos[2] < this->FixedPointCroppingRegionPlanes[4])
712 {
713 idx = 0;
714 }
715 else if (pos[2] > this->FixedPointCroppingRegionPlanes[5])
716 {
717 idx = 18;
718 }
719 else
720 {
721 idx = 9;
722 }
723
724 if (pos[1] >= this->FixedPointCroppingRegionPlanes[2])
725 {
726 if (pos[1] > this->FixedPointCroppingRegionPlanes[3])
727 {
728 idx += 6;
729 }
730 else
731 {
732 idx += 3;
733 }
734 }
735
736 if (pos[0] >= this->FixedPointCroppingRegionPlanes[0])
737 {
738 if (pos[0] > this->FixedPointCroppingRegionPlanes[1])
739 {
740 idx += 2;
741 }
742 else
743 {
744 idx += 1;
745 }
746 }
747
748 return !(static_cast<unsigned int>(this->CroppingRegionFlags) & this->CroppingRegionMask[idx]);
749 }
750
751 VTK_ABI_NAMESPACE_END
752 #endif
vtkColorTransferFunction
Defines a transfer function for mapping a property to an RGB color value.
Definition: vtkColorTransferFunction.h:60
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkDirectionEncoder
encode a direction into a one or two byte value
Definition: vtkDirectionEncoder.h:29
vtkEncodedGradientShader
Compute shading tables for encoded normals.
Definition: vtkEncodedGradientShader.h:35
vtkFiniteDifferenceGradientEstimator
Use finite differences to estimate gradient.
Definition: vtkFiniteDifferenceGradientEstimator.h:36
vtkFixedPointRayCastImage
helper class for a ray cast image
Definition: vtkFixedPointRayCastImage.h:29
vtkFixedPointVolumeRayCastCompositeGOHelper
A helper that generates composite images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastCompositeGOHelper.h:29
vtkFixedPointVolumeRayCastCompositeGOShadeHelper
A helper that generates composite images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastCompositeGOShadeHelper.h:29
vtkFixedPointVolumeRayCastCompositeHelper
A helper that generates composite images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastCompositeHelper.h:29
vtkFixedPointVolumeRayCastCompositeShadeHelper
A helper that generates composite images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastCompositeShadeHelper.h:29
vtkFixedPointVolumeRayCastMIPHelper
A helper that generates MIP images for the volume ray cast mapper.
Definition: vtkFixedPointVolumeRayCastMIPHelper.h:28
vtkFixedPointVolumeRayCastMapper
A fixed point mapper for volumes.
Definition: vtkFixedPointVolumeRayCastMapper.h:103
vtkFixedPointVolumeRayCastMapper::SetRayCastImage
void SetRayCastImage(vtkFixedPointRayCastImage *)
Set / Get the underlying image object.
vtkFixedPointVolumeRayCastMapper::ImageDisplayHelper
vtkRayCastImageDisplayHelper * ImageDisplayHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:349
vtkFixedPointVolumeRayCastMapper::ViewToWorldMatrix
vtkMatrix4x4 * ViewToWorldMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:381
vtkFixedPointVolumeRayCastMapper::ViewToVoxelsMatrix
vtkMatrix4x4 * ViewToVoxelsMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:382
vtkFixedPointVolumeRayCastMapper::GradientShader
vtkEncodedGradientShader * GradientShader
Definition: vtkFixedPointVolumeRayCastMapper.h:447
vtkFixedPointVolumeRayCastMapper::MIPHelper
vtkFixedPointVolumeRayCastMIPHelper * MIPHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:484
vtkFixedPointVolumeRayCastMapper::CompositeGOHelper
vtkFixedPointVolumeRayCastCompositeGOHelper * CompositeGOHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:486
vtkFixedPointVolumeRayCastMapper::OldImageSampleDistance
float OldImageSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:364
vtkFixedPointVolumeRayCastMapper::ShouldUseNearestNeighborInterpolation
int ShouldUseNearestNeighborInterpolation(vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::Volume
vtkVolume * Volume
Definition: vtkFixedPointVolumeRayCastMapper.h:461
vtkFixedPointVolumeRayCastMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkFixedPointVolumeRayCastMapper::AbortRender
void AbortRender()
vtkFixedPointVolumeRayCastMapper::Threader
vtkMultiThreader * Threader
Definition: vtkFixedPointVolumeRayCastMapper.h:378
vtkFixedPointVolumeRayCastMapper::GetDiffuseShadingTable
unsigned short * GetDiffuseShadingTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:269
vtkFixedPointVolumeRayCastMapper::RetrieveRenderTime
float RetrieveRenderTime(vtkRenderer *ren)
vtkFixedPointVolumeRayCastMapper::OldRowBounds
int * OldRowBounds
Definition: vtkFixedPointVolumeRayCastMapper.h:397
vtkFixedPointVolumeRayCastMapper::MaximumImageSampleDistance
float MaximumImageSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:358
vtkFixedPointVolumeRayCastMapper::ImageSampleDistance
float ImageSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:356
vtkFixedPointVolumeRayCastMapper::VoxelsTransform
vtkTransform * VoxelsTransform
Definition: vtkFixedPointVolumeRayCastMapper.h:390
vtkFixedPointVolumeRayCastMapper::ContiguousGradientNormal
unsigned short * ContiguousGradientNormal
Definition: vtkFixedPointVolumeRayCastMapper.h:440
vtkFixedPointVolumeRayCastMapper::MinimumImageSampleDistance
float MinimumImageSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:357
vtkFixedPointVolumeRayCastMapper::vtkFixedPointVolumeRayCastMapper
vtkFixedPointVolumeRayCastMapper()
vtkFixedPointVolumeRayCastMapper::SavedMinMaxInput
vtkImageData * SavedMinMaxInput
Definition: vtkFixedPointVolumeRayCastMapper.h:505
vtkFixedPointVolumeRayCastMapper::UpdateCroppingRegions
void UpdateCroppingRegions()
vtkFixedPointVolumeRayCastMapper::GetFloatTripleFromPointer
void GetFloatTripleFromPointer(float v[3], float *ptr)
Definition: vtkFixedPointVolumeRayCastMapper.h:584
vtkFixedPointVolumeRayCastMapper::RenderSubVolume
void RenderSubVolume()
vtkFixedPointVolumeRayCastMapper::MinMaxVolume
unsigned short * MinMaxVolume
Definition: vtkFixedPointVolumeRayCastMapper.h:503
vtkFixedPointVolumeRayCastMapper::FinalColorWindow
float FinalColorWindow
Definition: vtkFixedPointVolumeRayCastMapper.h:512
vtkFixedPointVolumeRayCastMapper::GetSpecularShadingTable
unsigned short * GetSpecularShadingTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:270
vtkFixedPointVolumeRayCastMapper::GradientMagnitude
unsigned char ** GradientMagnitude
Definition: vtkFixedPointVolumeRayCastMapper.h:439
vtkFixedPointVolumeRayCastMapper::CaptureZBuffer
void CaptureZBuffer(vtkRenderer *ren)
vtkFixedPointVolumeRayCastMapper::ApplyFinalColorWindowLevel
void ApplyFinalColorWindowLevel()
vtkFixedPointVolumeRayCastMapper::ComputeRequiredImageSampleDistance
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...
vtkFixedPointVolumeRayCastMapper::ComputeRayInfo
void ComputeRayInfo(int x, int y, unsigned int pos[3], unsigned int dir[3], unsigned int *numSteps)
vtkFixedPointVolumeRayCastMapper::CompositeShadeHelper
vtkFixedPointVolumeRayCastCompositeShadeHelper * CompositeShadeHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:487
vtkFixedPointVolumeRayCastMapper::VoxelsToWorldMatrix
vtkMatrix4x4 * VoxelsToWorldMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:385
vtkFixedPointVolumeRayCastMapper::SavedGradientsMTime
vtkTimeStamp SavedGradientsMTime
Definition: vtkFixedPointVolumeRayCastMapper.h:424
vtkFixedPointVolumeRayCastMapper::SavedBlendMode
int SavedBlendMode
Definition: vtkFixedPointVolumeRayCastMapper.h:419
vtkFixedPointVolumeRayCastMapper::RenderWindow
vtkRenderWindow * RenderWindow
Definition: vtkFixedPointVolumeRayCastMapper.h:460
vtkFixedPointVolumeRayCastMapper::MinimumViewDistance
float MinimumViewDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:411
vtkFixedPointVolumeRayCastMapper::StoreRenderTime
void StoreRenderTime(vtkRenderer *ren, vtkVolume *vol, float t)
vtkFixedPointVolumeRayCastMapper::GradientEstimator
vtkFiniteDifferenceGradientEstimator * GradientEstimator
Definition: vtkFixedPointVolumeRayCastMapper.h:449
vtkFixedPointVolumeRayCastMapper::CompositeGOShadeHelper
vtkFixedPointVolumeRayCastCompositeGOShadeHelper * CompositeGOShadeHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:488
vtkFixedPointVolumeRayCastMapper::IntermixIntersectingGeometry
vtkTypeBool IntermixIntersectingGeometry
Definition: vtkFixedPointVolumeRayCastMapper.h:409
vtkFixedPointVolumeRayCastMapper::ComputeRowBounds
int ComputeRowBounds(vtkRenderer *ren, int imageFlag, int rowBoundsFlag, int inputExtent[6])
vtkFixedPointVolumeRayCastMapper::AutoAdjustSampleDistances
vtkTypeBool AutoAdjustSampleDistances
Definition: vtkFixedPointVolumeRayCastMapper.h:359
vtkFixedPointVolumeRayCastMapper::MinMaxVolumeCache
vtkImageData * MinMaxVolumeCache
Definition: vtkFixedPointVolumeRayCastMapper.h:506
vtkFixedPointVolumeRayCastMapper::GetZBufferValue
float GetZBufferValue(int x, int y)
vtkFixedPointVolumeRayCastMapper::DisplayRenderedImage
void DisplayRenderedImage(vtkRenderer *, vtkVolume *)
vtkFixedPointVolumeRayCastMapper::GetScalarOpacityTable
unsigned short * GetScalarOpacityTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:264
vtkFixedPointVolumeRayCastMapper::FillInMaxGradientMagnitudes
void FillInMaxGradientMagnitudes(int fullDim[3], int smallDim[3])
vtkFixedPointVolumeRayCastMapper::RowBounds
int * RowBounds
Definition: vtkFixedPointVolumeRayCastMapper.h:396
vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection
unsigned int ToFixedPointDirection(float dir)
Definition: vtkFixedPointVolumeRayCastMapper.h:538
vtkFixedPointVolumeRayCastMapper::VolumeMatrix
vtkMatrix4x4 * VolumeMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:387
vtkFixedPointVolumeRayCastMapper::InitializeRayInfo
void InitializeRayInfo(vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::SetNumberOfThreads
void SetNumberOfThreads(int num)
Set/Get the number of threads to use.
vtkFixedPointVolumeRayCastMapper::SavedParametersInput
vtkImageData * SavedParametersInput
Definition: vtkFixedPointVolumeRayCastMapper.h:420
vtkFixedPointVolumeRayCastMapper::Render
void Render(vtkRenderer *, vtkVolume *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Initialize rendering for this volume.
vtkFixedPointVolumeRayCastMapper::ComputeGradients
void ComputeGradients(vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::FlipMIPComparison
int FlipMIPComparison
Definition: vtkFixedPointVolumeRayCastMapper.h:515
vtkFixedPointVolumeRayCastMapper::GetVolume
vtkVolume * GetVolume()
Definition: vtkFixedPointVolumeRayCastMapper.h:266
vtkFixedPointVolumeRayCastMapper::UpdateShadingTable
int UpdateShadingTable(vtkRenderer *ren, vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::GetUIntTripleFromPointer
void GetUIntTripleFromPointer(unsigned int v[3], unsigned int *ptr)
Definition: vtkFixedPointVolumeRayCastMapper.h:591
vtkFixedPointVolumeRayCastMapper::FinalColorLevel
float FinalColorLevel
Definition: vtkFixedPointVolumeRayCastMapper.h:513
vtkFixedPointVolumeRayCastMapper::ComputeRequiredImageSampleDistance
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...
vtkFixedPointVolumeRayCastMapper::~vtkFixedPointVolumeRayCastMapper
~vtkFixedPointVolumeRayCastMapper() override
vtkFixedPointVolumeRayCastMapper::SavedSampleDistance
float SavedSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:426
vtkFixedPointVolumeRayCastMapper::ShadingRequired
int ShadingRequired
Definition: vtkFixedPointVolumeRayCastMapper.h:454
vtkFixedPointVolumeRayCastMapper::GetEstimatedRenderTime
float GetEstimatedRenderTime(vtkRenderer *ren, vtkVolume *vol)
Get an estimate of the rendering time for a given volume / renderer.
Definition: vtkFixedPointVolumeRayCastMapper.h:305
vtkFixedPointVolumeRayCastMapper::RetrieveRenderTime
float RetrieveRenderTime(vtkRenderer *ren, vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::GradientOpacityRequired
int GradientOpacityRequired
Definition: vtkFixedPointVolumeRayCastMapper.h:455
vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag
int CheckMinMaxVolumeFlag(unsigned int pos[3], int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:607
vtkFixedPointVolumeRayCastMapper::CompositeHelper
vtkFixedPointVolumeRayCastCompositeHelper * CompositeHelper
Definition: vtkFixedPointVolumeRayCastMapper.h:485
vtkFixedPointVolumeRayCastMapper::PerspectiveTransform
vtkTransform * PerspectiveTransform
Definition: vtkFixedPointVolumeRayCastMapper.h:389
vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition
unsigned int ToFixedPointPosition(float val)
Definition: vtkFixedPointVolumeRayCastMapper.h:526
vtkFixedPointVolumeRayCastMapper::GetColorTable
unsigned short * GetColorTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:263
vtkFixedPointVolumeRayCastMapper::CheckMIPMinMaxVolumeFlag
int CheckMIPMinMaxVolumeFlag(unsigned int pos[3], int c, unsigned short maxIdx, int flip)
Definition: vtkFixedPointVolumeRayCastMapper.h:617
vtkFixedPointVolumeRayCastMapper::GetEstimatedRenderTime
float GetEstimatedRenderTime(vtkRenderer *ren)
Definition: vtkFixedPointVolumeRayCastMapper.h:309
vtkFixedPointVolumeRayCastMapper::GetGradientMagnitude
unsigned char ** GetGradientMagnitude()
Definition: vtkFixedPointVolumeRayCastMapper.h:268
vtkFixedPointVolumeRayCastMapper::DirectionEncoder
vtkDirectionEncoder * DirectionEncoder
Definition: vtkFixedPointVolumeRayCastMapper.h:445
vtkFixedPointVolumeRayCastMapper::SampleDistance
float SampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:352
vtkFixedPointVolumeRayCastMapper::PerspectiveMatrix
vtkMatrix4x4 * PerspectiveMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:380
vtkFixedPointVolumeRayCastMapper::GetGradientOpacityTable
unsigned short * GetGradientOpacityTable(int c)
Definition: vtkFixedPointVolumeRayCastMapper.h:265
vtkFixedPointVolumeRayCastMapper::RenderTableEntries
int RenderTableEntries
Definition: vtkFixedPointVolumeRayCastMapper.h:403
vtkFixedPointVolumeRayCastMapper::RenderTableSize
int RenderTableSize
Definition: vtkFixedPointVolumeRayCastMapper.h:402
vtkFixedPointVolumeRayCastMapper::InteractiveSampleDistance
float InteractiveSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:353
vtkFixedPointVolumeRayCastMapper::vtkFPVRCMSwitchOnDataType
friend VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void *arg)
vtkFixedPointVolumeRayCastMapper::PerSubVolumeInitialization
void PerSubVolumeInitialization(vtkRenderer *, vtkVolume *, int)
vtkFixedPointVolumeRayCastMapper::SavedGradientsInput
vtkImageData * SavedGradientsInput
Definition: vtkFixedPointVolumeRayCastMapper.h:423
vtkFixedPointVolumeRayCastMapper::SavedParametersMTime
vtkTimeStamp SavedParametersMTime
Definition: vtkFixedPointVolumeRayCastMapper.h:421
vtkFixedPointVolumeRayCastMapper::GradientNormal
unsigned short ** GradientNormal
Definition: vtkFixedPointVolumeRayCastMapper.h:438
vtkFixedPointVolumeRayCastMapper::ComputeMatrices
void ComputeMatrices(double inputOrigin[3], double inputSpacing[3], int inputExtent[6], vtkRenderer *ren, vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkFixedPointVolumeRayCastMapper::LookupColorUC
void LookupColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index, unsigned char color[4])
Definition: vtkFixedPointVolumeRayCastMapper.h:642
vtkFixedPointVolumeRayCastMapper::VoxelsToViewTransform
vtkTransform * VoxelsToViewTransform
Definition: vtkFixedPointVolumeRayCastMapper.h:391
vtkFixedPointVolumeRayCastMapper::FixedPointIncrement
void FixedPointIncrement(unsigned int position[3], unsigned int increment[3])
Definition: vtkFixedPointVolumeRayCastMapper.h:555
vtkFixedPointVolumeRayCastMapper::LookupAndCombineIndependentColorsUC
void LookupAndCombineIndependentColorsUC(unsigned short *colorTable[4], unsigned short *scalarOpacityTable[4], unsigned short index[4], float weights[4], int components, unsigned char color[4])
Definition: vtkFixedPointVolumeRayCastMapper.h:682
vtkFixedPointVolumeRayCastMapper::WorldToVoxelsMatrix
vtkMatrix4x4 * WorldToVoxelsMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:384
vtkFixedPointVolumeRayCastMapper::SpaceLeapFilter
vtkVolumeRayCastSpaceLeapingImageFilter * SpaceLeapFilter
Definition: vtkFixedPointVolumeRayCastMapper.h:507
vtkFixedPointVolumeRayCastMapper::PerVolumeInitialization
void PerVolumeInitialization(vtkRenderer *, vtkVolume *)
vtkFixedPointVolumeRayCastMapper::New
static vtkFixedPointVolumeRayCastMapper * New()
vtkFixedPointVolumeRayCastMapper::ClipRayAgainstVolume
int ClipRayAgainstVolume(double rayStart[3], double rayEnd[3], float rayDirection[3], double bounds[6])
vtkFixedPointVolumeRayCastMapper::CreateCanonicalView
void CreateCanonicalView(vtkVolume *volume, vtkImageData *image, int blend_mode, double viewDirection[3], double viewUp[3])
vtkFixedPointVolumeRayCastMapper::GetRowBounds
int * GetRowBounds()
Definition: vtkFixedPointVolumeRayCastMapper.h:262
vtkFixedPointVolumeRayCastMapper::RenderTimeTable
float * RenderTimeTable
Definition: vtkFixedPointVolumeRayCastMapper.h:399
vtkFixedPointVolumeRayCastMapper::PerImageInitialization
int PerImageInitialization(vtkRenderer *, vtkVolume *, int, double *, double *, int *)
vtkFixedPointVolumeRayCastMapper::FixedPointCroppingRegionPlanes
unsigned int FixedPointCroppingRegionPlanes[6]
Definition: vtkFixedPointVolumeRayCastMapper.h:476
vtkFixedPointVolumeRayCastMapper::RayCastImage
vtkFixedPointRayCastImage * RayCastImage
Definition: vtkFixedPointVolumeRayCastMapper.h:394
vtkFixedPointVolumeRayCastMapper::TransformedClippingPlanes
float * TransformedClippingPlanes
Definition: vtkFixedPointVolumeRayCastMapper.h:498
vtkFixedPointVolumeRayCastMapper::RenderVolumeTable
vtkVolume ** RenderVolumeTable
Definition: vtkFixedPointVolumeRayCastMapper.h:400
vtkFixedPointVolumeRayCastMapper::UpdateMinMaxVolume
void UpdateMinMaxVolume(vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::FixedPointVolumeRayCastMapper_CastRays
friend VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void *arg)
vtkFixedPointVolumeRayCastMapper::PreviousScalars
vtkDataArray * PreviousScalars
Definition: vtkFixedPointVolumeRayCastMapper.h:458
vtkFixedPointVolumeRayCastMapper::MinMaxVolumeSize
int MinMaxVolumeSize[4]
Definition: vtkFixedPointVolumeRayCastMapper.h:504
vtkFixedPointVolumeRayCastMapper::GetGradientNormal
unsigned short ** GetGradientNormal()
Definition: vtkFixedPointVolumeRayCastMapper.h:267
vtkFixedPointVolumeRayCastMapper::RenderRendererTable
vtkRenderer ** RenderRendererTable
Definition: vtkFixedPointVolumeRayCastMapper.h:401
vtkFixedPointVolumeRayCastMapper::OldSampleDistance
float OldSampleDistance
Definition: vtkFixedPointVolumeRayCastMapper.h:363
vtkFixedPointVolumeRayCastMapper::ShiftVectorDown
void ShiftVectorDown(unsigned int in[3], unsigned int out[3])
Definition: vtkFixedPointVolumeRayCastMapper.h:599
vtkFixedPointVolumeRayCastMapper::UpdateColorTable
int UpdateColorTable(vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::NumTransformedClippingPlanes
int NumTransformedClippingPlanes
Definition: vtkFixedPointVolumeRayCastMapper.h:497
vtkFixedPointVolumeRayCastMapper::ContiguousGradientMagnitude
unsigned char * ContiguousGradientMagnitude
Definition: vtkFixedPointVolumeRayCastMapper.h:441
vtkFixedPointVolumeRayCastMapper::ClipRayAgainstClippingPlanes
int ClipRayAgainstClippingPlanes(double rayStart[3], double rayEnd[3], int numClippingPlanes, float *clippingPlanes)
vtkFixedPointVolumeRayCastMapper::GetNumberOfThreads
int GetNumberOfThreads()
Set/Get the number of threads to use.
vtkFixedPointVolumeRayCastMapper::UpdateGradients
int UpdateGradients(vtkVolume *vol)
vtkFixedPointVolumeRayCastMapper::CurrentScalars
vtkDataArray * CurrentScalars
Definition: vtkFixedPointVolumeRayCastMapper.h:457
vtkFixedPointVolumeRayCastMapper::LockSampleDistanceToInputSpacing
vtkTypeBool LockSampleDistanceToInputSpacing
Definition: vtkFixedPointVolumeRayCastMapper.h:360
vtkFixedPointVolumeRayCastMapper::CroppingRegionMask
unsigned int CroppingRegionMask[27]
Definition: vtkFixedPointVolumeRayCastMapper.h:477
vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC
void LookupDependentColorUC(unsigned short *colorTable, unsigned short *scalarOpacityTable, unsigned short index[4], int components, unsigned char color[4])
Definition: vtkFixedPointVolumeRayCastMapper.h:655
vtkFixedPointVolumeRayCastMapper::CheckIfCropped
int CheckIfCropped(unsigned int pos[3])
Definition: vtkFixedPointVolumeRayCastMapper.h:707
vtkFixedPointVolumeRayCastMapper::NumberOfGradientSlices
int NumberOfGradientSlices
Definition: vtkFixedPointVolumeRayCastMapper.h:443
vtkFixedPointVolumeRayCastMapper::VoxelsToViewMatrix
vtkMatrix4x4 * VoxelsToViewMatrix
Definition: vtkFixedPointVolumeRayCastMapper.h:383
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:40
vtkMultiThreader
A class for performing multithreaded execution.
Definition: vtkMultiThreader.h:72
vtkPiecewiseFunction
Defines a 1D piecewise function.
Definition: vtkPiecewiseFunction.h:50
vtkPlaneCollection
maintain a list of planes
Definition: vtkPlaneCollection.h:35
vtkRayCastImageDisplayHelper
helper class that draws the image to the screen
Definition: vtkRayCastImageDisplayHelper.h:29
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:95
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:71
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkTimerLog
Timer support and logging.
Definition: vtkTimerLog.h:94
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
vtkVolumeMapper
Abstract class for a volume mapper.
Definition: vtkVolumeMapper.h:37
vtkVolumeMapper::CroppingRegionFlags
int CroppingRegionFlags
Cropping variables, and a method for converting the world coordinate cropping region planes to voxel ...
Definition: vtkVolumeMapper.h:300
vtkVolumeRayCastSpaceLeapingImageFilter
Builds the space leaping data structure.
Definition: vtkVolumeRayCastSpaceLeapingImageFilter.h:31
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkX3D::dir
@ dir
Definition: vtkX3D.h:324
vtkX3D::alpha
@ alpha
Definition: vtkX3D.h:250
vtkX3D::color
@ color
Definition: vtkX3D.h:221
vtkX3D::image
@ image
Definition: vtkX3D.h:374
vtkX3D::position
@ position
Definition: vtkX3D.h:261
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkX3D::offset
@ offset
Definition: vtkX3D.h:438
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
VTKKW_FP_SCALE
#define VTKKW_FP_SCALE
Definition: vtkFixedPointVolumeRayCastMapper.h:72
VTKKW_FP_SHIFT
#define VTKKW_FP_SHIFT
Definition: vtkFixedPointVolumeRayCastMapper.h:69
vtkFPVRCMSwitchOnDataType
VTK_THREAD_RETURN_TYPE vtkFPVRCMSwitchOnDataType(void *arg)
FixedPointVolumeRayCastMapper_CastRays
VTK_THREAD_RETURN_TYPE FixedPointVolumeRayCastMapper_CastRays(void *arg)
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkVolumeMapper.h