vtkGPUVolumeRayCastMapper Class Reference

#include <vtkGPUVolumeRayCastMapper.h>

Inheritance diagram for vtkGPUVolumeRayCastMapper:

Inheritance graph
[legend]
Collaboration diagram for vtkGPUVolumeRayCastMapper:

Collaboration graph
[legend]

List of all members.


Detailed Description

Ray casting performed on the GPU.

vtkGPUVolumeRayCastMapper is a volume mapper that performs ray casting on the GPU using fragment programs.

Events:
vtkCommand::VolumeMapperRenderEndEvent vtkCommand::VolumeMapperRenderStartEvent
Examples:
vtkGPUVolumeRayCastMapper (Examples)
Tests:
vtkGPUVolumeRayCastMapper (Tests)

Definition at line 42 of file vtkGPUVolumeRayCastMapper.h.


Public Types

typedef vtkVolumeMapper Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void CreateCanonicalView (vtkRenderer *ren, vtkVolume *volume, vtkImageData *image, int blend_mode, double viewDirection[3], double viewUp[3])
void SetMaskInput (vtkImageData *mask)
virtual vtkImageDataGetMaskInput ()
void Render (vtkRenderer *, vtkVolume *)
virtual void GPURender (vtkRenderer *, vtkVolume *)
void ReleaseGraphicsResources (vtkWindow *)
virtual void GetReductionRatio (double ratio[3])=0
virtual void SetAutoAdjustSampleDistances (int)
virtual int GetAutoAdjustSampleDistances ()
virtual void AutoAdjustSampleDistancesOn ()
virtual void AutoAdjustSampleDistancesOff ()
virtual void SetSampleDistance (float)
virtual float GetSampleDistance ()
virtual void SetImageSampleDistance (float)
virtual float GetImageSampleDistance ()
virtual void SetMinimumImageSampleDistance (float)
virtual float GetMinimumImageSampleDistance ()
virtual void SetMaximumImageSampleDistance (float)
virtual float GetMaximumImageSampleDistance ()
virtual void SetFinalColorWindow (float)
virtual float GetFinalColorWindow ()
virtual void SetFinalColorLevel (float)
virtual float GetFinalColorLevel ()
virtual void SetMaxMemoryInBytes (vtkIdType)
virtual vtkIdType GetMaxMemoryInBytes ()
virtual void SetMaxMemoryFraction (float)
virtual float GetMaxMemoryFraction ()
virtual void SetReportProgress (bool)
virtual bool GetReportProgress ()
virtual int IsRenderSupported (vtkRenderWindow *vtkNotUsed(window), vtkVolumeProperty *vtkNotUsed(property))
virtual void SetMaskBlendFactor (float)
virtual float GetMaskBlendFactor ()

Static Public Member Functions

static vtkGPUVolumeRayCastMapperNew ()
static int IsTypeOf (const char *type)
static vtkGPUVolumeRayCastMapperSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkGPUVolumeRayCastMapper ()
 ~vtkGPUVolumeRayCastMapper ()
int ValidateRender (vtkRenderer *, vtkVolume *)
void CanonicalViewRender (vtkRenderer *, vtkVolume *)
virtual void PreRender (vtkRenderer *ren, vtkVolume *vol, double datasetBounds[6], double scalarRange[2], int numberOfScalarComponents, unsigned int numberOfLevels)=0
virtual void RenderBlock (vtkRenderer *ren, vtkVolume *vol, unsigned int level)=0
virtual void PostRender (vtkRenderer *ren, int numberOfScalarComponents)=0
void SetCellFlag (int cellFlag)
virtual void ClipCroppingRegionPlanes ()
virtual vtkImageDataGetTransformedInput ()
void SetTransformedInput (vtkImageData *)
virtual void SetAMRMode (int)
virtual int GetAMRMode ()
virtual void AMRModeOn ()
virtual void AMRModeOff ()

Protected Attributes

float SampleDistance
float ImageSampleDistance
float MinimumImageSampleDistance
float MaximumImageSampleDistance
int AutoAdjustSampleDistances
int SmallVolumeRender
double BigTimeToDraw
double SmallTimeToDraw
float FinalColorWindow
float FinalColorLevel
vtkIdType MaxMemoryInBytes
float MaxMemoryFraction
int GeneratingCanonicalView
vtkImageDataCanonicalViewImageData
int AMRMode
int CellFlag
double ClippedCroppingRegionPlanes [6]
bool ReportProgress
vtkImageDataMaskInput
float MaskBlendFactor
vtkImageDataTransformedInput
vtkImageDataLastInput

Member Typedef Documentation

Reimplemented from vtkVolumeMapper.

Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.

Definition at line 46 of file vtkGPUVolumeRayCastMapper.h.


Constructor & Destructor Documentation

vtkGPUVolumeRayCastMapper::vtkGPUVolumeRayCastMapper (  )  [protected]

vtkGPUVolumeRayCastMapper::~vtkGPUVolumeRayCastMapper (  )  [protected]


Member Function Documentation

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.

virtual const char* vtkGPUVolumeRayCastMapper::GetClassName (  )  [virtual]

Reimplemented from vtkVolumeMapper.

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 ( vtkObject o  )  [static]

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 133 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  ) 

virtual vtkImageData* vtkGPUVolumeRayCastMapper::GetMaskInput (  )  [virtual]

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. 0.0 means only standard color transfer function. 1.0 means only mask color tranfer function. Initial 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. 0.0 means only standard color transfer function. 1.0 means only mask color tranfer function. Initial 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

Precondition:
input is up-to-date.

Reimplemented in vtkOpenGLGPUVolumeRayCastMapper.

Definition at line 166 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 172 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.

Precondition:
the calling thread has a current OpenGL context.

mapper_supported: IsRenderSupported(renderer->GetRenderWindow(),0) The computation is based on hardware limits (3D texture indexable size) and MaxMemoryInBytes.

Postcondition:
valid_i_ratio: ratio[0]>0 && ratio[0]<=1.0

valid_j_ratio: ratio[1]>0 && ratio[1]<=1.0

valid_k_ratio: ratio[2]>0 && ratio[2]<=1.0

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]

virtual void vtkGPUVolumeRayCastMapper::RenderBlock ( vtkRenderer ren,
vtkVolume vol,
unsigned int  level 
) [protected, pure virtual]

virtual void vtkGPUVolumeRayCastMapper::PostRender ( vtkRenderer ren,
int  numberOfScalarComponents 
) [protected, pure virtual]

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.

Precondition:
volume_exists: this->GetInput()!=0

valid_cropping: this->Cropping && this->CroppingRegionPlanes[0]<this->CroppingRegionPlanes[1] && this->CroppingRegionPlanes[2]<this->CroppingRegionPlanes[3] && this->CroppingRegionPlanes[4]<this->CroppingRegionPlanes[5])

virtual vtkImageData* vtkGPUVolumeRayCastMapper::GetTransformedInput (  )  [protected, virtual]

void vtkGPUVolumeRayCastMapper::SetTransformedInput ( vtkImageData  )  [protected]


Member Data Documentation

Definition at line 219 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 222 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 223 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 224 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 225 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 227 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 228 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 229 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 231 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 232 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 234 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 235 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 239 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 240 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 247 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 251 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 264 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 266 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 268 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 270 of file vtkGPUVolumeRayCastMapper.h.

Definition at line 275 of file vtkGPUVolumeRayCastMapper.h.

This is needed only to check if the input data has been changed since the last Render() call.

Definition at line 279 of file vtkGPUVolumeRayCastMapper.h.


The documentation for this class was generated from the following file:

Generated on Mon Sep 27 18:26:04 2010 for VTK by  doxygen 1.5.6