VTK
|
Ray casting performed on the GPU. More...
#include <vtkGPUVolumeRayCastMapper.h>
Ray casting performed on the GPU.
vtkGPUVolumeRayCastMapper is a volume mapper that performs ray casting on the GPU using fragment programs.
Definition at line 40 of file vtkGPUVolumeRayCastMapper.h.
Reimplemented from vtkVolumeMapper.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
Definition at line 44 of file vtkGPUVolumeRayCastMapper.h.
anonymous enum |
Definition at line 166 of file vtkGPUVolumeRayCastMapper.h.
vtkGPUVolumeRayCastMapper::vtkGPUVolumeRayCastMapper | ( | ) | [protected] |
vtkGPUVolumeRayCastMapper::~vtkGPUVolumeRayCastMapper | ( | ) | [protected] |
static vtkGPUVolumeRayCastMapper* vtkGPUVolumeRayCastMapper::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkAlgorithm.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
static int vtkGPUVolumeRayCastMapper::IsTypeOf | ( | const char * | name | ) | [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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkVolumeMapper.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
virtual int vtkGPUVolumeRayCastMapper::IsA | ( | const char * | name | ) | [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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkVolumeMapper.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
static vtkGPUVolumeRayCastMapper* vtkGPUVolumeRayCastMapper::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkVolumeMapper.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
virtual vtkObjectBase* vtkGPUVolumeRayCastMapper::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkVolumeMapper.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
Reimplemented from vtkVolumeMapper.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
void vtkGPUVolumeRayCastMapper::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.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
virtual void vtkGPUVolumeRayCastMapper::SetAutoAdjustSampleDistances | ( | int | ) | [virtual] |
If AutoAdjustSampleDistances is on, the the ImageSampleDistance will be varied to achieve the allocated render time of this prop (controlled by the desired update rate and any culling in use).
virtual int vtkGPUVolumeRayCastMapper::GetAutoAdjustSampleDistances | ( | ) | [virtual] |
If AutoAdjustSampleDistances is on, the the ImageSampleDistance will be varied to achieve the allocated render time of this prop (controlled by the desired update rate and any culling in use).
virtual void vtkGPUVolumeRayCastMapper::AutoAdjustSampleDistancesOn | ( | ) | [virtual] |
If AutoAdjustSampleDistances is on, the the ImageSampleDistance will be varied to achieve the allocated render time of this prop (controlled by the desired update rate and any culling in use).
virtual void vtkGPUVolumeRayCastMapper::AutoAdjustSampleDistancesOff | ( | ) | [virtual] |
If AutoAdjustSampleDistances is on, the the ImageSampleDistance will be varied to achieve the allocated render time of this prop (controlled by the desired update rate and any culling in use).
virtual void vtkGPUVolumeRayCastMapper::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. Initial value is 1.0.
virtual float vtkGPUVolumeRayCastMapper::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. Initial value is 1.0.
virtual void vtkGPUVolumeRayCastMapper::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 vtkGPUVolumeRayCastMapper::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 vtkGPUVolumeRayCastMapper::SetMinimumImageSampleDistance | ( | float | ) | [virtual] |
This is the minimum image sample distance allow when the image sample distance is being automatically adjusted.
virtual float vtkGPUVolumeRayCastMapper::GetMinimumImageSampleDistance | ( | ) | [virtual] |
This is the minimum image sample distance allow when the image sample distance is being automatically adjusted.
virtual void vtkGPUVolumeRayCastMapper::SetMaximumImageSampleDistance | ( | float | ) | [virtual] |
This is the maximum image sample distance allow when the image sample distance is being automatically adjusted.
virtual float vtkGPUVolumeRayCastMapper::GetMaximumImageSampleDistance | ( | ) | [virtual] |
This is the maximum image sample distance allow when the image sample distance is being automatically adjusted.
virtual void vtkGPUVolumeRayCastMapper::SetFinalColorWindow | ( | float | ) | [virtual] |
Set/Get the window / level applied to the final color. This allows brightness / contrast adjustments on the final image. window is the width of the window. level is the center of the window. Initial window value is 1.0 Initial level value is 0.5 window cannot be null but can be negative, this way values will be reversed. |window| can be larger than 1.0 level can be any real value.
virtual float vtkGPUVolumeRayCastMapper::GetFinalColorWindow | ( | ) | [virtual] |
Set/Get the window / level applied to the final color. This allows brightness / contrast adjustments on the final image. window is the width of the window. level is the center of the window. Initial window value is 1.0 Initial level value is 0.5 window cannot be null but can be negative, this way values will be reversed. |window| can be larger than 1.0 level can be any real value.
virtual void vtkGPUVolumeRayCastMapper::SetFinalColorLevel | ( | float | ) | [virtual] |
Set/Get the window / level applied to the final color. This allows brightness / contrast adjustments on the final image. window is the width of the window. level is the center of the window. Initial window value is 1.0 Initial level value is 0.5 window cannot be null but can be negative, this way values will be reversed. |window| can be larger than 1.0 level can be any real value.
virtual float vtkGPUVolumeRayCastMapper::GetFinalColorLevel | ( | ) | [virtual] |
Set/Get the window / level applied to the final color. This allows brightness / contrast adjustments on the final image. window is the width of the window. level is the center of the window. Initial window value is 1.0 Initial level value is 0.5 window cannot be null but can be negative, this way values will be reversed. |window| can be larger than 1.0 level can be any real value.
virtual void vtkGPUVolumeRayCastMapper::SetMaxMemoryInBytes | ( | vtkIdType | ) | [virtual] |
Maximum size of the 3D texture in GPU memory. Will default to the size computed from the graphics card. Can be adjusted by the user.
virtual vtkIdType vtkGPUVolumeRayCastMapper::GetMaxMemoryInBytes | ( | ) | [virtual] |
Maximum size of the 3D texture in GPU memory. Will default to the size computed from the graphics card. Can be adjusted by the user.
virtual void vtkGPUVolumeRayCastMapper::SetMaxMemoryFraction | ( | float | ) | [virtual] |
Maximum fraction of the MaxMemoryInBytes that should be used to hold the texture. Valid values are 0.1 to 1.0.
virtual float vtkGPUVolumeRayCastMapper::GetMaxMemoryFraction | ( | ) | [virtual] |
Maximum fraction of the MaxMemoryInBytes that should be used to hold the texture. Valid values are 0.1 to 1.0.
virtual void vtkGPUVolumeRayCastMapper::SetReportProgress | ( | bool | ) | [virtual] |
Tells if the mapper will report intermediate progress. Initial value is true. As the progress works with a GL blocking call (glFinish()), this can be useful for huge dataset but can slow down rendering of small dataset. It should be set to true for big dataset or complex shading and streaming but to false for small datasets.
virtual bool vtkGPUVolumeRayCastMapper::GetReportProgress | ( | ) | [virtual] |
Tells if the mapper will report intermediate progress. Initial value is true. As the progress works with a GL blocking call (glFinish()), this can be useful for huge dataset but can slow down rendering of small dataset. It should be set to true for big dataset or complex shading and streaming but to false for small datasets.
virtual int vtkGPUVolumeRayCastMapper::IsRenderSupported | ( | vtkRenderWindow * | vtkNotUsedwindow, |
vtkVolumeProperty * | vtkNotUsedproperty | ||
) | [inline, virtual] |
Based on hardware and properties, we may or may not be able to render using 3D texture mapping. This indicates if 3D texture mapping is supported by the hardware, and if the other extensions necessary to support the specific properties are available.
Definition at line 131 of file vtkGPUVolumeRayCastMapper.h.
void vtkGPUVolumeRayCastMapper::CreateCanonicalView | ( | vtkRenderer * | ren, |
vtkVolume * | volume, | ||
vtkImageData * | image, | ||
int | blend_mode, | ||
double | viewDirection[3], | ||
double | viewUp[3] | ||
) |
void vtkGPUVolumeRayCastMapper::SetMaskInput | ( | vtkImageData * | mask | ) |
Optionally, set a mask input. This mask may be a binary mask or a label map. This must be specified via SetMaskType. If the mask is a binary mask, the volume rendering is confined to regions within the binary mask. The binary mask is assumed to have a datatype of UCHAR and values of 255 (inside) and 0 (outside). The mask may also be a label map. The label map is allowed to contain only 3 labels (values of 0, 1 and 2) and must have a datatype of UCHAR. In voxels with label value of 0, the color transfer function supplied by component 0 is used. In voxels with label value of 1, the color transfer function supplied by component 1 is used and blended with the transfer function supplied by component 0, with the blending weight being determined by MaskBlendFactor. In voxels with a label value of 2, the color transfer function supplied by component 2 is used and blended with the transfer function supplied by component 0, with the blending weight being determined by MaskBlendFactor.
virtual vtkImageData* vtkGPUVolumeRayCastMapper::GetMaskInput | ( | ) | [virtual] |
Optionally, set a mask input. This mask may be a binary mask or a label map. This must be specified via SetMaskType. If the mask is a binary mask, the volume rendering is confined to regions within the binary mask. The binary mask is assumed to have a datatype of UCHAR and values of 255 (inside) and 0 (outside). The mask may also be a label map. The label map is allowed to contain only 3 labels (values of 0, 1 and 2) and must have a datatype of UCHAR. In voxels with label value of 0, the color transfer function supplied by component 0 is used. In voxels with label value of 1, the color transfer function supplied by component 1 is used and blended with the transfer function supplied by component 0, with the blending weight being determined by MaskBlendFactor. In voxels with a label value of 2, the color transfer function supplied by component 2 is used and blended with the transfer function supplied by component 0, with the blending weight being determined by MaskBlendFactor.
virtual void vtkGPUVolumeRayCastMapper::SetMaskType | ( | int | ) | [virtual] |
Set the mask type, if mask is to be used. See documentation for SetMaskInput(). The default is a LabelMapMaskType.
virtual int vtkGPUVolumeRayCastMapper::GetMaskType | ( | ) | [virtual] |
Set the mask type, if mask is to be used. See documentation for SetMaskInput(). The default is a LabelMapMaskType.
Set the mask type, if mask is to be used. See documentation for SetMaskInput(). The default is a LabelMapMaskType.
Set the mask type, if mask is to be used. See documentation for SetMaskInput(). The default is a LabelMapMaskType.
virtual void vtkGPUVolumeRayCastMapper::SetMaskBlendFactor | ( | float | ) | [virtual] |
Tells how much mask color transfer function is used compared to the standard color transfer function when the mask is true. This is relevant only for the label map mask. 0.0 means only standard color transfer function. 1.0 means only mask color transfer function. The default value is 1.0.
virtual float vtkGPUVolumeRayCastMapper::GetMaskBlendFactor | ( | ) | [virtual] |
Tells how much mask color transfer function is used compared to the standard color transfer function when the mask is true. This is relevant only for the label map mask. 0.0 means only standard color transfer function. 1.0 means only mask color transfer function. The default value is 1.0.
void vtkGPUVolumeRayCastMapper::Render | ( | vtkRenderer * | , |
vtkVolume * | |||
) | [virtual] |
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Initialize rendering for this volume.
Implements vtkVolumeMapper.
virtual void vtkGPUVolumeRayCastMapper::GPURender | ( | vtkRenderer * | , |
vtkVolume * | |||
) | [inline, virtual] |
Handled in the subclass - the actual render method
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
Definition at line 195 of file vtkGPUVolumeRayCastMapper.h.
void vtkGPUVolumeRayCastMapper::ReleaseGraphicsResources | ( | vtkWindow * | ) | [inline, virtual] |
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being consumed by this mapper. The parameter window could be used to determine which graphic resources to release.
Reimplemented from vtkVolumeMapper.
Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.
Definition at line 201 of file vtkGPUVolumeRayCastMapper.h.
virtual void vtkGPUVolumeRayCastMapper::GetReductionRatio | ( | double | ratio[3] | ) | [pure virtual] |
Return how much the dataset has to be reduced in each dimension to fit on the GPU. If the value is 1.0, there is no need to reduce the dataset.
Implemented in vtkOpenGLGPUVolumeRayCastMapper.
int vtkGPUVolumeRayCastMapper::ValidateRender | ( | vtkRenderer * | , |
vtkVolume * | |||
) | [protected] |
void vtkGPUVolumeRayCastMapper::CanonicalViewRender | ( | vtkRenderer * | , |
vtkVolume * | |||
) | [protected] |
virtual void vtkGPUVolumeRayCastMapper::PreRender | ( | vtkRenderer * | ren, |
vtkVolume * | vol, | ||
double | datasetBounds[6], | ||
double | scalarRange[2], | ||
int | numberOfScalarComponents, | ||
unsigned int | numberOfLevels | ||
) | [protected, pure virtual] |
Implemented in vtkOpenGLGPUVolumeRayCastMapper.
virtual void vtkGPUVolumeRayCastMapper::RenderBlock | ( | vtkRenderer * | ren, |
vtkVolume * | vol, | ||
unsigned int | level | ||
) | [protected, pure virtual] |
Implemented in vtkOpenGLGPUVolumeRayCastMapper.
virtual void vtkGPUVolumeRayCastMapper::PostRender | ( | vtkRenderer * | ren, |
int | numberOfScalarComponents | ||
) | [protected, pure virtual] |
Implemented in vtkOpenGLGPUVolumeRayCastMapper.
void vtkGPUVolumeRayCastMapper::SetCellFlag | ( | int | cellFlag | ) | [protected] |
Called by the AMR Volume Mapper. Set the flag that tells if the scalars are on point data (0) or cell data (1).
virtual void vtkGPUVolumeRayCastMapper::SetAMRMode | ( | int | ) | [protected, virtual] |
Set the mapper in AMR Mode or not. Initial value is false. Called only by the vtkKWAMRVolumeMapper
virtual int vtkGPUVolumeRayCastMapper::GetAMRMode | ( | ) | [protected, virtual] |
Set the mapper in AMR Mode or not. Initial value is false. Called only by the vtkKWAMRVolumeMapper
virtual void vtkGPUVolumeRayCastMapper::AMRModeOn | ( | ) | [protected, virtual] |
Set the mapper in AMR Mode or not. Initial value is false. Called only by the vtkKWAMRVolumeMapper
virtual void vtkGPUVolumeRayCastMapper::AMRModeOff | ( | ) | [protected, virtual] |
Set the mapper in AMR Mode or not. Initial value is false. Called only by the vtkKWAMRVolumeMapper
virtual void vtkGPUVolumeRayCastMapper::ClipCroppingRegionPlanes | ( | ) | [protected, virtual] |
Compute the cropping planes clipped by the bounds of the volume. The result is put into this->ClippedCroppingRegionPlanes. NOTE: IT WILL BE MOVED UP TO vtkVolumeMapper after bullet proof usage in this mapper. Other subclasses will use the ClippedCroppingRegionsPlanes members instead of CroppingRegionPlanes.
virtual vtkImageData* vtkGPUVolumeRayCastMapper::GetTransformedInput | ( | ) | [protected, virtual] |
void vtkGPUVolumeRayCastMapper::SetTransformedInput | ( | vtkImageData * | ) | [protected] |
float vtkGPUVolumeRayCastMapper::SampleDistance [protected] |
Definition at line 248 of file vtkGPUVolumeRayCastMapper.h.
float vtkGPUVolumeRayCastMapper::ImageSampleDistance [protected] |
Definition at line 251 of file vtkGPUVolumeRayCastMapper.h.
Definition at line 252 of file vtkGPUVolumeRayCastMapper.h.
Definition at line 253 of file vtkGPUVolumeRayCastMapper.h.
Definition at line 254 of file vtkGPUVolumeRayCastMapper.h.
int vtkGPUVolumeRayCastMapper::SmallVolumeRender [protected] |
Definition at line 256 of file vtkGPUVolumeRayCastMapper.h.
double vtkGPUVolumeRayCastMapper::BigTimeToDraw [protected] |
Definition at line 257 of file vtkGPUVolumeRayCastMapper.h.
double vtkGPUVolumeRayCastMapper::SmallTimeToDraw [protected] |
Definition at line 258 of file vtkGPUVolumeRayCastMapper.h.
float vtkGPUVolumeRayCastMapper::FinalColorWindow [protected] |
Definition at line 260 of file vtkGPUVolumeRayCastMapper.h.
float vtkGPUVolumeRayCastMapper::FinalColorLevel [protected] |
Definition at line 261 of file vtkGPUVolumeRayCastMapper.h.
vtkIdType vtkGPUVolumeRayCastMapper::MaxMemoryInBytes [protected] |
Definition at line 263 of file vtkGPUVolumeRayCastMapper.h.
float vtkGPUVolumeRayCastMapper::MaxMemoryFraction [protected] |
Definition at line 264 of file vtkGPUVolumeRayCastMapper.h.
Definition at line 268 of file vtkGPUVolumeRayCastMapper.h.
Definition at line 269 of file vtkGPUVolumeRayCastMapper.h.
int vtkGPUVolumeRayCastMapper::AMRMode [protected] |
Definition at line 276 of file vtkGPUVolumeRayCastMapper.h.
int vtkGPUVolumeRayCastMapper::CellFlag [protected] |
Definition at line 280 of file vtkGPUVolumeRayCastMapper.h.
double vtkGPUVolumeRayCastMapper::ClippedCroppingRegionPlanes[6] [protected] |
Definition at line 293 of file vtkGPUVolumeRayCastMapper.h.
bool vtkGPUVolumeRayCastMapper::ReportProgress [protected] |
Definition at line 294 of file vtkGPUVolumeRayCastMapper.h.
vtkImageData* vtkGPUVolumeRayCastMapper::MaskInput [protected] |
Definition at line 295 of file vtkGPUVolumeRayCastMapper.h.
float vtkGPUVolumeRayCastMapper::MaskBlendFactor [protected] |
Definition at line 296 of file vtkGPUVolumeRayCastMapper.h.
int vtkGPUVolumeRayCastMapper::MaskType [protected] |
Definition at line 297 of file vtkGPUVolumeRayCastMapper.h.
vtkImageData* vtkGPUVolumeRayCastMapper::TransformedInput [protected] |
Definition at line 298 of file vtkGPUVolumeRayCastMapper.h.
vtkImageData* vtkGPUVolumeRayCastMapper::LastInput [protected] |
This is needed only to check if the input data has been changed since the last Render() call.
Definition at line 305 of file vtkGPUVolumeRayCastMapper.h.