#include <vtkFixedPointVolumeRayCastMapper.h>
Inheritance diagram for vtkFixedPointVolumeRayCastMapper:


This is a software ray caster for rendering volumes in vtkImageData. It works with all input data types and up to four components. It performs composite or MIP rendering, and can be intermixed with geometric data. Space leaping is used to speed up the rendering process. In addition, calculation are performed in 15 bit fixed point precision. This mapper is threaded, and will interleave scan lines across processors.
This mapper is a good replacement for vtkVolumeRayCastMapper EXCEPT:
The vtkVolumeRayCastMapper CANNOT be used in these instances when a vtkFixedPointVolumeRayCastMapper can be used:
This mapper handles all data type from unsigned char through double. However, some of the internal calcultions are performed in float and therefore even the full float range may cause problems for this mapper (both in scalar data values and in spacing between samples).
Space leaping is performed by creating a sub-sampled volume. 4x4x4 cells in the original volume are represented by a min, max, and combined gradient and flag value. The min max volume has three unsigned shorts per 4x4x4 group of cells from the original volume - one reprenting the minumum scalar index (the scalar value adjusted to fit in the 15 bit range), the maximum scalar index, and a third unsigned short which is both the maximum gradient opacity in the neighborhood (an unsigned char) and the flag that is filled in for the current lookup tables to indicate whether this region can be skipped.
Definition at line 99 of file vtkFixedPointVolumeRayCastMapper.h.
Reimplemented from vtkVolumeMapper.
Definition at line 103 of file vtkFixedPointVolumeRayCastMapper.h.
| vtkFixedPointVolumeRayCastMapper::vtkFixedPointVolumeRayCastMapper | ( | ) | [protected] |
| vtkFixedPointVolumeRayCastMapper::~vtkFixedPointVolumeRayCastMapper | ( | ) | [protected] |
| static vtkFixedPointVolumeRayCastMapper* vtkFixedPointVolumeRayCastMapper::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkAlgorithm.
| virtual const char* vtkFixedPointVolumeRayCastMapper::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkVolumeMapper.
| static int vtkFixedPointVolumeRayCastMapper::IsTypeOf | ( | const char * | type | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkVolumeMapper.
| virtual int vtkFixedPointVolumeRayCastMapper::IsA | ( | const char * | type | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkVolumeMapper.
| static vtkFixedPointVolumeRayCastMapper* vtkFixedPointVolumeRayCastMapper::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkVolumeMapper.
| void vtkFixedPointVolumeRayCastMapper::PrintSelf | ( | ostream & | os, | |
| vtkIndent | indent | |||
| ) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkVolumeMapper.
| virtual void vtkFixedPointVolumeRayCastMapper::SetSampleDistance | ( | float | ) | [virtual] |
Set/Get the distance between samples used for rendering when AutoAdjustSampleDistances is off, or when this mapper has more than 1 second allocated to it for rendering.
| virtual float vtkFixedPointVolumeRayCastMapper::GetSampleDistance | ( | ) | [virtual] |
Set/Get the distance between samples used for rendering when AutoAdjustSampleDistances is off, or when this mapper has more than 1 second allocated to it for rendering.
| virtual void vtkFixedPointVolumeRayCastMapper::SetInteractiveSampleDistance | ( | float | ) | [virtual] |
Set/Get the distance between samples when interactive rendering is happening. In this case, interactive is defined as this volume mapper having less than 1 second allocated for rendering. When AutoAdjustSampleDistance is On, and the allocated render time is less than 1 second, then this InteractiveSampleDistance will be used instead of the SampleDistance above.
| virtual float vtkFixedPointVolumeRayCastMapper::GetInteractiveSampleDistance | ( | ) | [virtual] |
Set/Get the distance between samples when interactive rendering is happening. In this case, interactive is defined as this volume mapper having less than 1 second allocated for rendering. When AutoAdjustSampleDistance is On, and the allocated render time is less than 1 second, then this InteractiveSampleDistance will be used instead of the SampleDistance above.
| virtual void vtkFixedPointVolumeRayCastMapper::SetImageSampleDistance | ( | float | ) | [virtual] |
Sampling distance in the XY image dimensions. Default value of 1 meaning 1 ray cast per pixel. If set to 0.5, 4 rays will be cast per pixel. If set to 2.0, 1 ray will be cast for every 4 (2 by 2) pixels. This value will be adjusted to meet a desired frame rate when AutoAdjustSampleDistances is on.
| virtual float vtkFixedPointVolumeRayCastMapper::GetImageSampleDistance | ( | ) | [virtual] |
Sampling distance in the XY image dimensions. Default value of 1 meaning 1 ray cast per pixel. If set to 0.5, 4 rays will be cast per pixel. If set to 2.0, 1 ray will be cast for every 4 (2 by 2) pixels. This value will be adjusted to meet a desired frame rate when AutoAdjustSampleDistances is on.
| virtual void vtkFixedPointVolumeRayCastMapper::SetMinimumImageSampleDistance | ( | float | ) | [virtual] |
This is the minimum image sample distance allow when the image sample distance is being automatically adjusted.
| virtual float vtkFixedPointVolumeRayCastMapper::GetMinimumImageSampleDistance | ( | ) | [virtual] |
This is the minimum image sample distance allow when the image sample distance is being automatically adjusted.
| virtual void vtkFixedPointVolumeRayCastMapper::SetMaximumImageSampleDistance | ( | float | ) | [virtual] |
This is the maximum image sample distance allow when the image sample distance is being automatically adjusted.
| virtual float vtkFixedPointVolumeRayCastMapper::GetMaximumImageSampleDistance | ( | ) | [virtual] |
This is the maximum image sample distance allow when the image sample distance is being automatically adjusted.
| virtual void vtkFixedPointVolumeRayCastMapper::SetAutoAdjustSampleDistances | ( | int | ) | [virtual] |
If AutoAdjustSampleDistances is on, the the ImageSampleDistance and the SampleDistance will be varied to achieve the allocated render time of this prop (controlled by the desired update rate and any culling in use). If this is an interactive render (more than 1 frame per second) the SampleDistance will be increased, otherwise it will not be altered (a binary decision, as opposed to the ImageSampleDistance which will vary continuously).
| virtual int vtkFixedPointVolumeRayCastMapper::GetAutoAdjustSampleDistances | ( | ) | [virtual] |
If AutoAdjustSampleDistances is on, the the ImageSampleDistance and the SampleDistance will be varied to achieve the allocated render time of this prop (controlled by the desired update rate and any culling in use). If this is an interactive render (more than 1 frame per second) the SampleDistance will be increased, otherwise it will not be altered (a binary decision, as opposed to the ImageSampleDistance which will vary continuously).
| virtual void vtkFixedPointVolumeRayCastMapper::AutoAdjustSampleDistancesOn | ( | ) | [virtual] |
If AutoAdjustSampleDistances is on, the the ImageSampleDistance and the SampleDistance will be varied to achieve the allocated render time of this prop (controlled by the desired update rate and any culling in use). If this is an interactive render (more than 1 frame per second) the SampleDistance will be increased, otherwise it will not be altered (a binary decision, as opposed to the ImageSampleDistance which will vary continuously).
| virtual void vtkFixedPointVolumeRayCastMapper::AutoAdjustSampleDistancesOff | ( | ) | [virtual] |
If AutoAdjustSampleDistances is on, the the ImageSampleDistance and the SampleDistance will be varied to achieve the allocated render time of this prop (controlled by the desired update rate and any culling in use). If this is an interactive render (more than 1 frame per second) the SampleDistance will be increased, otherwise it will not be altered (a binary decision, as opposed to the ImageSampleDistance which will vary continuously).
| virtual void vtkFixedPointVolumeRayCastMapper::SetLockSampleDistanceToInputSpacing | ( | int | ) | [virtual] |
Automatically compute the sample distance from the data spacing. When the number of voxels is 8, the sample distance will be roughly 1/200 the average voxel size. The distance will grow proportionally to numVoxels^(1/3) until it reaches 1/2 average voxel size when number of voxels is 1E6. Note that ScalarOpacityUnitDistance is still taken into account and if different than 1, will effect the sample distance.
| virtual int vtkFixedPointVolumeRayCastMapper::GetLockSampleDistanceToInputSpacing | ( | ) | [virtual] |
Automatically compute the sample distance from the data spacing. When the number of voxels is 8, the sample distance will be roughly 1/200 the average voxel size. The distance will grow proportionally to numVoxels^(1/3) until it reaches 1/2 average voxel size when number of voxels is 1E6. Note that ScalarOpacityUnitDistance is still taken into account and if different than 1, will effect the sample distance.
| virtual void vtkFixedPointVolumeRayCastMapper::LockSampleDistanceToInputSpacingOn | ( | ) | [virtual] |
Automatically compute the sample distance from the data spacing. When the number of voxels is 8, the sample distance will be roughly 1/200 the average voxel size. The distance will grow proportionally to numVoxels^(1/3) until it reaches 1/2 average voxel size when number of voxels is 1E6. Note that ScalarOpacityUnitDistance is still taken into account and if different than 1, will effect the sample distance.
| virtual void vtkFixedPointVolumeRayCastMapper::LockSampleDistanceToInputSpacingOff | ( | ) | [virtual] |
Automatically compute the sample distance from the data spacing. When the number of voxels is 8, the sample distance will be roughly 1/200 the average voxel size. The distance will grow proportionally to numVoxels^(1/3) until it reaches 1/2 average voxel size when number of voxels is 1E6. Note that ScalarOpacityUnitDistance is still taken into account and if different than 1, will effect the sample distance.
| void vtkFixedPointVolumeRayCastMapper::SetNumberOfThreads | ( | int | num | ) |
Set/Get the number of threads to use. This by default is equal to the number of available processors detected.
| int vtkFixedPointVolumeRayCastMapper::GetNumberOfThreads | ( | ) |
Set/Get the number of threads to use. This by default is equal to the number of available processors detected.
| virtual void vtkFixedPointVolumeRayCastMapper::SetIntermixIntersectingGeometry | ( | int | ) | [virtual] |
If IntermixIntersectingGeometry is turned on, the zbuffer will be captured and used to limit the traversal of the rays.
| virtual int vtkFixedPointVolumeRayCastMapper::GetIntermixIntersectingGeometry | ( | ) | [virtual] |
If IntermixIntersectingGeometry is turned on, the zbuffer will be captured and used to limit the traversal of the rays.
| virtual void vtkFixedPointVolumeRayCastMapper::IntermixIntersectingGeometryOn | ( | ) | [virtual] |
If IntermixIntersectingGeometry is turned on, the zbuffer will be captured and used to limit the traversal of the rays.
| virtual void vtkFixedPointVolumeRayCastMapper::IntermixIntersectingGeometryOff | ( | ) | [virtual] |
If IntermixIntersectingGeometry is turned on, the zbuffer will be captured and used to limit the traversal of the rays.
| float vtkFixedPointVolumeRayCastMapper::ComputeRequiredImageSampleDistance | ( | float | desiredTime, | |
| vtkRenderer * | ren | |||
| ) |
What is the image sample distance required to achieve the desired time? A version of this method is provided that does not require the volume argument since if you are using an LODProp3D you may not know this information. If you use this version you must be certain that the ray cast mapper is only used for one volume (and not shared among multiple volumes)
| float vtkFixedPointVolumeRayCastMapper::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 provided that does not require the volume argument since if you are using an LODProp3D you may not know this information. If you use this version you must be certain that the ray cast mapper is only used for one volume (and not shared among multiple volumes)
| void vtkFixedPointVolumeRayCastMapper::Render | ( | vtkRenderer * | , | |
| vtkVolume * | ||||
| ) | [virtual] |
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Initialize rendering for this volume.
Implements vtkVolumeMapper.
| unsigned int vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition | ( | float | val | ) | [inline] |
| void vtkFixedPointVolumeRayCastMapper::ToFixedPointPosition | ( | float | in[3], | |
| unsigned int | out[3] | |||
| ) | [inline] |
| unsigned int vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection | ( | float | dir | ) | [inline] |
| void vtkFixedPointVolumeRayCastMapper::ToFixedPointDirection | ( | float | in[3], | |
| unsigned int | out[3] | |||
| ) | [inline] |
| void vtkFixedPointVolumeRayCastMapper::FixedPointIncrement | ( | unsigned int | position[3], | |
| unsigned int | increment[3] | |||
| ) | [inline] |
Definition at line 559 of file vtkFixedPointVolumeRayCastMapper.h.
| void vtkFixedPointVolumeRayCastMapper::GetFloatTripleFromPointer | ( | float | v[3], | |
| float * | ptr | |||
| ) | [inline] |
Definition at line 588 of file vtkFixedPointVolumeRayCastMapper.h.
| void vtkFixedPointVolumeRayCastMapper::GetUIntTripleFromPointer | ( | unsigned int | v[3], | |
| unsigned int * | ptr | |||
| ) | [inline] |
Definition at line 595 of file vtkFixedPointVolumeRayCastMapper.h.
| void vtkFixedPointVolumeRayCastMapper::ShiftVectorDown | ( | unsigned int | in[3], | |
| unsigned int | out[3] | |||
| ) | [inline] |
| int vtkFixedPointVolumeRayCastMapper::CheckMinMaxVolumeFlag | ( | unsigned int | pos[3], | |
| int | c | |||
| ) | [inline] |
Definition at line 610 of file vtkFixedPointVolumeRayCastMapper.h.
References MinMaxVolumeSize, and vtkX3D::offset.
| int vtkFixedPointVolumeRayCastMapper::CheckMIPMinMaxVolumeFlag | ( | unsigned int | pos[3], | |
| int | c, | |||
| unsigned short | maxIdx, | |||
| int | flip | |||
| ) | [inline] |
Definition at line 621 of file vtkFixedPointVolumeRayCastMapper.h.
References MinMaxVolumeSize, and vtkX3D::offset.
| void vtkFixedPointVolumeRayCastMapper::LookupColorUC | ( | unsigned short * | colorTable, | |
| unsigned short * | scalarOpacityTable, | |||
| unsigned short | index, | |||
| unsigned char | color[4] | |||
| ) | [inline] |
Definition at line 647 of file vtkFixedPointVolumeRayCastMapper.h.
References vtkX3D::alpha, and VTKKW_FP_SHIFT.
| void vtkFixedPointVolumeRayCastMapper::LookupDependentColorUC | ( | unsigned short * | colorTable, | |
| unsigned short * | scalarOpacityTable, | |||
| unsigned short | index[4], | |||
| int | components, | |||
| unsigned char | color[4] | |||
| ) | [inline] |
Definition at line 662 of file vtkFixedPointVolumeRayCastMapper.h.
References vtkX3D::alpha, and VTKKW_FP_SHIFT.
| void vtkFixedPointVolumeRayCastMapper::LookupAndCombineIndependentColorsUC | ( | unsigned short * | colorTable[4], | |
| unsigned short * | scalarOpacityTable[4], | |||
| unsigned short | index[4], | |||
| float | weights[4], | |||
| int | components, | |||
| unsigned char | color[4] | |||
| ) | [inline] |
Definition at line 692 of file vtkFixedPointVolumeRayCastMapper.h.
References vtkX3D::alpha, and VTKKW_FP_SHIFT.
| int vtkFixedPointVolumeRayCastMapper::CheckIfCropped | ( | unsigned int | pos[3] | ) | [inline] |
Definition at line 717 of file vtkFixedPointVolumeRayCastMapper.h.
References vtkVolumeMapper::CroppingRegionFlags, and CroppingRegionMask.
| virtual vtkRenderWindow* vtkFixedPointVolumeRayCastMapper::GetRenderWindow | ( | ) | [virtual] |
| virtual vtkFixedPointVolumeRayCastMIPHelper* vtkFixedPointVolumeRayCastMapper::GetMIPHelper | ( | ) | [virtual] |
| virtual vtkFixedPointVolumeRayCastCompositeHelper* vtkFixedPointVolumeRayCastMapper::GetCompositeHelper | ( | ) | [virtual] |
| virtual vtkFixedPointVolumeRayCastCompositeGOHelper* vtkFixedPointVolumeRayCastMapper::GetCompositeGOHelper | ( | ) | [virtual] |
| virtual vtkFixedPointVolumeRayCastCompositeGOShadeHelper* vtkFixedPointVolumeRayCastMapper::GetCompositeGOShadeHelper | ( | ) | [virtual] |
| virtual vtkFixedPointVolumeRayCastCompositeShadeHelper* vtkFixedPointVolumeRayCastMapper::GetCompositeShadeHelper | ( | ) | [virtual] |
| virtual float* vtkFixedPointVolumeRayCastMapper::GetTableShift | ( | ) | [virtual] |
| virtual void vtkFixedPointVolumeRayCastMapper::GetTableShift | ( | float | data[4] | ) | [virtual] |
| virtual float* vtkFixedPointVolumeRayCastMapper::GetTableScale | ( | ) | [virtual] |
| virtual void vtkFixedPointVolumeRayCastMapper::GetTableScale | ( |