Hardware-Assisted Visibility Sorting unstructured grid mapper, OpenGL implementation.
More...
|
virtual int | IsA (const char *type) |
|
vtkOpenGLHAVSVolumeMapper * | NewInstance () const |
|
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
|
virtual void | Render (vtkRenderer *ren, vtkVolume *vol) |
|
virtual void | ReleaseGraphicsResources (vtkWindow *) |
|
virtual void | SetGPUDataStructures (bool) |
|
|
virtual bool | SupportedByHardware (vtkRenderer *r) |
|
vtkHAVSVolumeMapper * | NewInstance () const |
|
virtual void | SetPartiallyRemoveNonConvexities (bool) |
|
virtual bool | GetPartiallyRemoveNonConvexities () |
|
virtual void | SetLevelOfDetailTargetTime (float) |
|
virtual float | GetLevelOfDetailTargetTime () |
|
virtual void | SetLevelOfDetail (bool) |
|
virtual bool | GetLevelOfDetail () |
|
void | SetLevelOfDetailMethod (int) |
|
virtual int | GetLevelOfDetailMethod () |
|
void | SetLevelOfDetailMethodField () |
|
void | SetLevelOfDetailMethodArea () |
|
virtual void | SetKBufferSize (int) |
|
virtual int | GetKBufferSize () |
|
void | SetKBufferSizeTo2 () |
|
void | SetKBufferSizeTo6 () |
|
virtual bool | SupportedByHardware (vtkRenderer *vtkNotUsed(r)) |
|
virtual bool | GetGPUDataStructures () |
|
vtkUnstructuredGridVolumeMapper * | NewInstance () const |
|
virtual void | SetBlendMode (int) |
|
void | SetBlendModeToComposite () |
|
void | SetBlendModeToMaximumIntensity () |
|
virtual int | GetBlendMode () |
|
virtual void | SetInputData (vtkUnstructuredGridBase *) |
|
virtual void | SetInputData (vtkDataSet *) |
|
vtkUnstructuredGridBase * | GetInput () |
|
vtkAbstractVolumeMapper * | NewInstance () const |
|
const char * | GetScalarModeAsString () |
|
vtkDataSet * | GetDataSetInput () |
|
vtkDataObject * | GetDataObjectInput () |
|
virtual double * | GetBounds () |
|
virtual void | GetBounds (double bounds[6]) |
|
virtual void | SetScalarMode (int) |
|
virtual int | GetScalarMode () |
|
void | SetScalarModeToDefault () |
|
void | SetScalarModeToUsePointData () |
|
void | SetScalarModeToUseCellData () |
|
void | SetScalarModeToUsePointFieldData () |
|
void | SetScalarModeToUseCellFieldData () |
|
virtual void | SelectScalarArray (int arrayNum) |
|
virtual void | SelectScalarArray (const char *arrayName) |
|
virtual char * | GetArrayName () |
|
virtual int | GetArrayId () |
|
virtual int | GetArrayAccessMode () |
|
virtual float | GetGradientMagnitudeScale () |
|
virtual float | GetGradientMagnitudeBias () |
|
virtual float | GetGradientMagnitudeScale (int) |
|
virtual float | GetGradientMagnitudeBias (int) |
|
vtkAbstractMapper3D * | NewInstance () const |
|
double | GetLength () |
|
int | GetNumberOfClippingPlanes () |
|
double * | GetCenter () |
|
void | GetCenter (double center[3]) |
|
virtual int | IsARayCastMapper () |
|
virtual int | IsARenderIntoImageMapper () |
|
void | GetClippingPlaneInDataCoords (vtkMatrix4x4 *propMatrix, int i, double planeEquation[4]) |
|
vtkAbstractMapper * | NewInstance () const |
|
virtual unsigned long | GetMTime () |
|
void | SetClippingPlanes (vtkPlanes *planes) |
|
void | ShallowCopy (vtkAbstractMapper *m) |
|
virtual double | GetTimeToDraw () |
|
void | AddClippingPlane (vtkPlane *plane) |
|
void | RemoveClippingPlane (vtkPlane *plane) |
|
void | RemoveAllClippingPlanes () |
|
virtual void | SetClippingPlanes (vtkPlaneCollection *) |
|
virtual vtkPlaneCollection * | GetClippingPlanes () |
|
vtkAlgorithm * | NewInstance () const |
|
int | HasExecutive () |
|
vtkExecutive * | GetExecutive () |
|
virtual void | SetExecutive (vtkExecutive *executive) |
|
virtual int | ModifyRequest (vtkInformation *request, int when) |
|
vtkInformation * | GetInputPortInformation (int port) |
|
vtkInformation * | GetOutputPortInformation (int port) |
|
int | GetNumberOfInputPorts () |
|
int | GetNumberOfOutputPorts () |
|
void | UpdateProgress (double amount) |
|
vtkInformation * | GetInputArrayInformation (int idx) |
|
void | RemoveAllInputs () |
|
vtkDataObject * | GetOutputDataObject (int port) |
|
virtual void | RemoveInputConnection (int port, vtkAlgorithmOutput *input) |
|
virtual void | RemoveInputConnection (int port, int idx) |
|
virtual void | RemoveAllInputConnections (int port) |
|
int | GetNumberOfInputConnections (int port) |
|
int | GetTotalNumberOfInputConnections () |
|
vtkAlgorithmOutput * | GetInputConnection (int port, int index) |
|
vtkAlgorithm * | GetInputAlgorithm (int port, int index, int &algPort) |
|
vtkAlgorithm * | GetInputAlgorithm (int port, int index) |
|
vtkExecutive * | GetInputExecutive (int port, int index) |
|
vtkInformation * | GetInputInformation (int port, int index) |
|
vtkInformation * | GetOutputInformation (int port) |
|
virtual void | UpdateInformation () |
|
virtual void | UpdateDataObject () |
|
virtual void | PropagateUpdateExtent () |
|
virtual void | UpdateWholeExtent () |
|
void | ConvertTotalInputToPortConnection (int ind, int &port, int &conn) |
|
int | SetUpdateExtentToWholeExtent (int port) |
|
int | SetUpdateExtentToWholeExtent () |
|
void | SetUpdateExtent (int port, int extent[6]) |
|
virtual int | ProcessRequest (vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) |
|
int | ProcessRequest (vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo) |
|
virtual int | ComputePipelineMTime (vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, unsigned long *mtime) |
|
virtual vtkInformation * | GetInformation () |
|
virtual void | SetInformation (vtkInformation *) |
|
virtual void | Register (vtkObjectBase *o) |
|
virtual void | UnRegister (vtkObjectBase *o) |
|
virtual void | SetAbortExecute (int) |
|
virtual int | GetAbortExecute () |
|
virtual void | AbortExecuteOn () |
|
virtual void | AbortExecuteOff () |
|
virtual void | SetProgress (double) |
|
virtual double | GetProgress () |
|
void | SetProgressText (const char *ptext) |
|
virtual char * | GetProgressText () |
|
virtual unsigned long | GetErrorCode () |
|
virtual void | SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name) |
|
virtual void | SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) |
|
virtual void | SetInputArrayToProcess (int idx, vtkInformation *info) |
|
virtual void | SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName) |
|
vtkDataObject * | GetInputDataObject (int port, int connection) |
|
virtual void | SetInputConnection (int port, vtkAlgorithmOutput *input) |
|
virtual void | SetInputConnection (vtkAlgorithmOutput *input) |
|
virtual void | AddInputConnection (int port, vtkAlgorithmOutput *input) |
|
virtual void | AddInputConnection (vtkAlgorithmOutput *input) |
|
virtual void | SetInputDataObject (int port, vtkDataObject *data) |
|
virtual void | SetInputDataObject (vtkDataObject *data) |
|
virtual void | AddInputDataObject (int port, vtkDataObject *data) |
|
virtual void | AddInputDataObject (vtkDataObject *data) |
|
vtkAlgorithmOutput * | GetOutputPort (int index) |
|
vtkAlgorithmOutput * | GetOutputPort () |
|
vtkAlgorithm * | GetInputAlgorithm () |
|
vtkExecutive * | GetInputExecutive () |
|
vtkInformation * | GetInputInformation () |
|
virtual void | Update (int port) |
|
virtual void | Update () |
|
virtual void | SetReleaseDataFlag (int) |
|
virtual int | GetReleaseDataFlag () |
|
void | ReleaseDataFlagOn () |
|
void | ReleaseDataFlagOff () |
|
int | UpdateExtentIsEmpty (vtkInformation *pinfo, vtkDataObject *output) |
|
int | UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType) |
|
void | SetUpdateExtent (int port, int piece, int numPieces, int ghostLevel) |
|
void | SetUpdateExtent (int piece, int numPieces, int ghostLevel) |
|
void | SetUpdateExtent (int extent[6]) |
|
int * | GetUpdateExtent () |
|
int * | GetUpdateExtent (int port) |
|
void | GetUpdateExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1) |
|
void | GetUpdateExtent (int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1) |
|
void | GetUpdateExtent (int extent[6]) |
|
void | GetUpdateExtent (int port, int extent[6]) |
|
int | GetUpdatePiece () |
|
int | GetUpdatePiece (int port) |
|
int | GetUpdateNumberOfPieces () |
|
int | GetUpdateNumberOfPieces (int port) |
|
int | GetUpdateGhostLevel () |
|
int | GetUpdateGhostLevel (int port) |
|
void | SetProgressObserver (vtkProgressObserver *) |
|
virtual vtkProgressObserver * | GetProgressObserver () |
|
vtkObject * | NewInstance () const |
|
virtual void | DebugOn () |
|
virtual void | DebugOff () |
|
bool | GetDebug () |
|
void | SetDebug (bool debugFlag) |
|
virtual void | Modified () |
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
|
vtkCommand * | GetCommand (unsigned long tag) |
|
void | RemoveObserver (vtkCommand *) |
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
|
void | RemoveObservers (const char *event, vtkCommand *) |
|
int | HasObserver (unsigned long event, vtkCommand *) |
|
int | HasObserver (const char *event, vtkCommand *) |
|
void | RemoveObserver (unsigned long tag) |
|
void | RemoveObservers (unsigned long event) |
|
void | RemoveObservers (const char *event) |
|
void | RemoveAllObservers () |
|
int | HasObserver (unsigned long event) |
|
int | HasObserver (const char *event) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
int | InvokeEvent (unsigned long event, void *callData) |
|
int | InvokeEvent (const char *event, void *callData) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
const char * | GetClassName () const |
|
virtual void | Delete () |
|
virtual void | FastDelete () |
|
void | Print (ostream &os) |
|
void | SetReferenceCount (int) |
|
void | PrintRevisions (ostream &) |
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
|
int | GetReferenceCount () |
|
|
static vtkOpenGLHAVSVolumeMapper * | New () |
|
static int | IsTypeOf (const char *type) |
|
static vtkOpenGLHAVSVolumeMapper * | SafeDownCast (vtkObjectBase *o) |
|
static vtkHAVSVolumeMapper * | New () |
|
static int | IsTypeOf (const char *type) |
|
static vtkHAVSVolumeMapper * | SafeDownCast (vtkObjectBase *o) |
|
static int | IsTypeOf (const char *type) |
|
static vtkUnstructuredGridVolumeMapper * | SafeDownCast (vtkObjectBase *o) |
|
static int | IsTypeOf (const char *type) |
|
static vtkAbstractVolumeMapper * | SafeDownCast (vtkObjectBase *o) |
|
static int | IsTypeOf (const char *type) |
|
static vtkAbstractMapper3D * | SafeDownCast (vtkObjectBase *o) |
|
static int | IsTypeOf (const char *type) |
|
static vtkAbstractMapper * | SafeDownCast (vtkObjectBase *o) |
|
static vtkDataArray * | GetScalars (vtkDataSet *input, int scalarMode, int arrayAccessMode, int arrayId, const char *arrayName, int &cellFlag) |
|
static vtkAbstractArray * | GetAbstractScalars (vtkDataSet *input, int scalarMode, int arrayAccessMode, int arrayId, const char *arrayName, int &cellFlag) |
|
static vtkAlgorithm * | New () |
|
static int | IsTypeOf (const char *type) |
|
static vtkAlgorithm * | SafeDownCast (vtkObjectBase *o) |
|
static vtkInformationIntegerKey * | INPUT_IS_OPTIONAL () |
|
static vtkInformationIntegerKey * | INPUT_IS_REPEATABLE () |
|
static vtkInformationInformationVectorKey * | INPUT_REQUIRED_FIELDS () |
|
static vtkInformationStringVectorKey * | INPUT_REQUIRED_DATA_TYPE () |
|
static vtkInformationInformationVectorKey * | INPUT_ARRAYS_TO_PROCESS () |
|
static vtkInformationIntegerKey * | INPUT_PORT () |
|
static vtkInformationIntegerKey * | INPUT_CONNECTION () |
|
static vtkInformationIntegerKey * | CAN_PRODUCE_SUB_EXTENT () |
|
static vtkInformationIntegerKey * | CAN_HANDLE_PIECE_REQUEST () |
|
static void | SetDefaultExecutivePrototype (vtkExecutive *proto) |
|
static int | IsTypeOf (const char *type) |
|
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
|
static vtkObject * | New () |
|
static void | BreakOnError () |
|
static void | SetGlobalWarningDisplay (int val) |
|
static void | GlobalWarningDisplayOn () |
|
static void | GlobalWarningDisplayOff () |
|
static int | GetGlobalWarningDisplay () |
|
static int | IsTypeOf (const char *name) |
|
static vtkObjectBase * | New () |
|
|
virtual vtkObjectBase * | NewInstanceInternal () const |
|
| vtkOpenGLHAVSVolumeMapper () |
|
| ~vtkOpenGLHAVSVolumeMapper () |
|
virtual int | FillInputPortInformation (int port, vtkInformation *info) |
|
virtual void | Initialize (vtkRenderer *ren, vtkVolume *vol) |
|
virtual void | InitializeLookupTables (vtkVolume *vol) |
|
void | InitializeGPUDataStructures () |
|
void | InitializeShaders () |
|
void | DeleteShaders () |
|
void | InitializeFramebufferObject () |
|
void | RenderHAVS (vtkRenderer *ren) |
|
void | SetupFBOZBuffer (int screenWidth, int screenHeight, float depthNear, float depthFar, float *zbuffer) |
|
void | SetupFBOMRT () |
|
void | DrawFBOInit (int screenWidth, int screenHeight, float depthNear, float depthFar) |
|
void | DrawFBOGeometry () |
|
void | DrawFBOFlush (int screenWidth, int screenHeight, float depthNear, float depthFar) |
|
void | DrawBlend (int screenWidth, int screenHeight, float depthNear, float depthFar) |
|
void | CheckOpenGLError (const char *str) |
|
| vtkHAVSVolumeMapper () |
|
| ~vtkHAVSVolumeMapper () |
|
void | InitializePrimitives (vtkVolume *vol) |
|
void | InitializeScalars () |
|
void | InitializeLevelOfDetail () |
|
void | InitializeLookupTables (vtkVolume *vol) |
|
void | FRadixSort (vtkHAVSSortedFace *array, vtkHAVSSortedFace *temp, int lo, int up) |
|
void | FRadix (int byte, int len, vtkHAVSSortedFace *source, vtkHAVSSortedFace *dest, int *count) |
|
void | UpdateLevelOfDetail (float targetTime) |
|
void | PartialVisibilitySort (float *eye) |
|
bool | CheckInitializationError () |
|
| vtkUnstructuredGridVolumeMapper () |
|
| ~vtkUnstructuredGridVolumeMapper () |
|
| vtkAbstractVolumeMapper () |
|
| ~vtkAbstractVolumeMapper () |
|
| vtkAbstractMapper3D () |
|
| ~vtkAbstractMapper3D () |
|
| vtkAbstractMapper () |
|
| ~vtkAbstractMapper () |
|
| vtkAlgorithm () |
|
| ~vtkAlgorithm () |
|
virtual int | FillOutputPortInformation (int port, vtkInformation *info) |
|
virtual void | SetNumberOfInputPorts (int n) |
|
virtual void | SetNumberOfOutputPorts (int n) |
|
int | InputPortIndexInRange (int index, const char *action) |
|
int | OutputPortIndexInRange (int index, const char *action) |
|
int | GetInputArrayAssociation (int idx, vtkInformationVector **inputVector) |
|
virtual vtkExecutive * | CreateDefaultExecutive () |
|
virtual void | ReportReferences (vtkGarbageCollector *) |
|
virtual void | SetNumberOfInputConnections (int port, int n) |
|
int | GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector) |
|
int | GetInputArrayAssociation (int idx, vtkDataObject *input) |
|
vtkDataArray * | GetInputArrayToProcess (int idx, vtkInformationVector **inputVector) |
|
vtkDataArray * | GetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association) |
|
vtkDataArray * | GetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector) |
|
vtkDataArray * | GetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association) |
|
vtkDataArray * | GetInputArrayToProcess (int idx, vtkDataObject *input) |
|
vtkDataArray * | GetInputArrayToProcess (int idx, vtkDataObject *input, int &association) |
|
vtkAbstractArray * | GetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector) |
|
vtkAbstractArray * | GetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association) |
|
vtkAbstractArray * | GetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector) |
|
vtkAbstractArray * | GetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association) |
|
vtkAbstractArray * | GetInputAbstractArrayToProcess (int idx, vtkDataObject *input) |
|
vtkAbstractArray * | GetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association) |
|
vtkInformation * | GetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector) |
|
virtual void | SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input) |
|
void | SetInputDataInternal (int port, vtkDataObject *input) |
|
void | AddInputDataInternal (int port, vtkDataObject *input) |
|
virtual void | SetErrorCode (unsigned long) |
|
| vtkObject () |
|
virtual | ~vtkObject () |
|
virtual void | RegisterInternal (vtkObjectBase *, int check) |
|
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
|
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
|
void | InternalReleaseFocus () |
|
| vtkObjectBase () |
|
virtual | ~vtkObjectBase () |
|
virtual void | CollectRevisions (ostream &) |
|
| vtkObjectBase (const vtkObjectBase &) |
|
void | operator= (const vtkObjectBase &) |
|
Hardware-Assisted Visibility Sorting unstructured grid mapper, OpenGL implementation.
vtkHAVSVolumeMapper is a class that renders polygonal data (represented as an unstructured grid) using the Hardware-Assisted Visibility Sorting (HAVS) algorithm. First the unique triangles are sorted in object space, then they are sorted in image space using a fixed size A-buffer implemented on the GPU called the k-buffer. The HAVS algorithm excels at rendering large datasets quickly. The trade-off is that the algorithm may produce some rendering artifacts due to an insufficient k size (currently 2 or 6 is supported) or read/write race conditions.
A built in level-of-detail (LOD) approach samples the geometry using one of two heuristics (field or area). If LOD is enabled, the amount of geometry that is sampled and rendered changes dynamically to stay within the target frame rate. The field sampling method generally works best for datasets with cell sizes that don't vary much in size. On the contrary, the area sampling approach gives better approximations when the volume has a lot of variation in cell size.
The HAVS algorithm uses several advanced features on graphics hardware. The k-buffer sorting network is implemented using framebuffer objects (FBOs) with multiple render targets (MRTs). Therefore, only cards that support these features can run the algorithm (at least an ATI 9500 or an NVidia NV40 (6600)).
- Attention
- Several issues had to be addressed to get the HAVS algorithm working within the vtk framework. These additions forced the code to forsake speed for the sake of compliance and robustness.
-
The HAVS algorithm operates on the triangles that compose the mesh. Therefore, before rendering, the cells are decomposed into unique triangles and stored on the GPU for efficient rendering. The use of GPU data structures is only recommended if the entire geometry can fit in graphics memory. Otherwise this feature should be disabled.
-
Another new feature is the handling of mixed data types (eg., polygonal data with volume data). This is handled by reading the z-buffer from the current window and copying it into the framebuffer object for off-screen rendering. The depth test is then enabled so that the volume only appears over the opaque geometry. Finally, the results of the off-screen rendering are blended into the framebuffer as a transparent, view-aligned texture.
-
Instead of using a preintegrated 3D lookup table for storing the ray integral, this implementation uses partial pre-integration. This improves the performance of dynamic transfer function updates by avoiding a costly preprocess of the table.
-
A final change to the original algorithm is the handling of non-convexities in the mesh. Due to read/write hazards that may create undesired artifacts with non-convexities when using a inside/outside toggle in the fragment program, another approach was employed. To handle non-convexities, the fragment shader determines if a ray-gap is larger than the max cell size and kill the fragment if so. This approximation performs rather well in practice but may miss small non-convexities.
-
For more information on the HAVS algorithm see:
-
"Hardware-Assisted Visibility Sorting for Unstructured Volume
Rendering" by S. P. Callahan, M. Ikits, J. L. D. Comba, and C. T. Silva, IEEE Transactions of Visualization and Computer Graphics; May/June 2005.
-
For more information on the Level-of-Detail algorithm, see:
-
"Interactive Rendering of Large Unstructured Grids Using Dynamic
Level-of-Detail" by S. P. Callahan, J. L. D. Comba, P. Shirley, and C. T. Silva, Proceedings of IEEE Visualization '05, Oct. 2005.
- Acknowledgments:
- This code was developed by Steven P. Callahan under the supervision of Prof. Claudio T. Silva. The code also contains contributions from Milan Ikits, Linh Ha, Huy T. Vo, Carlos E. Scheidegger, and Joao L. D. Comba.
- Acknowledgments:
- The work was supported by grants, contracts, and gifts from the National Science Foundation, the Department of Energy, the Army Research Office, and IBM.
- Acknowledgments:
- The port of HAVS to VTK and ParaView has been primarily supported by Sandia National Labs.
Definition at line 128 of file vtkOpenGLHAVSVolumeMapper.h.