[vtkusers] New Transfer function editing capabilities for ParaView
Biddiscombe, John A.
biddisco at cscs.ch
Tue Dec 17 04:44:32 EST 2013
I am looking for reviewers/testers for a new feature branch for ParaView and VTK which introduces
new capabilities for transfer function editing into ParaView.
When viewing volumetric data, the scalar based opacity editor has been enhanced to support a new editing mode which uses Gaussian functions to represent opacity/transparency. The Gaussians can be sized and reshaped in various ways to make it easier to visualize features quickly. This feature was previously added to support the point sprite representation plugin, but the core support has now been moved into ParaView proper and allows the editing method to be used for other representations.
A second new feature is the ability to enable gradient based opacity editing from the ParaView GIU - this allows one to colour a dataset by scalar, but vary the opacity according to the local gradient of the data at each voxel. The gradient opacity may be edited using either the pre-existing Linear Piecewise, or the new Gaussian based editor.
* 1D gradient opacity editing works with the vtkVolumeRaycastMapper and the vtkTextureMapper3D rendering modes.
The combination of a 1D transfer function editor for scalars and a second one for gradient allows for a large range of new visualizations to be achieved - but the combination of two 1D transfer functions does not allow for arbitrary selections in scalar/gradient space and we have therefore added a 2D transfer function editor which allows rectangular selections to be drawn within the space (where x is used for scalars and y for gradients). Each region drawn in the scalar/gradient space may have its amplitude modulated by a Gaussian, sinusoidal, ramp or uniform function to fully control the visualization.
* The 2D transfer function editing is supported only for the vtkVolumeRaycastMapper rendering mode
A reasonably large number of classes in ParaView/VTK have been modified to support the new features. Most notably
* a new vtkAbstractPiecewiseFunction class has been added which forms the base for the existing vtkPiecewiseFunction and a new vtkGaussianPiewiseFunction class which creates the lookuptables which are edited by the guassian widget.
* Gaussian and 2D transfer function widgets for qt have been added. Much of the original code for these comes from VisIt, though they have been reworked significantly to interface with ParaView. Many thanks for the origin code to the VisIt developers.
* Histogram visualization has been added to the new transfer function widgets for 1D and 2D modes.
* The vtkVolumeRaycastMapper has been extend to support a 2D transfer function lookup.
* vtkImageVolumeRepresenation has been significantly reworked to hide/show transfer functions, histograms and the rest when appropriate.
* the vtkDiscretizableTransferFunction used by ParaView to interact with the lookuptable manager required some changes to hold the gradient lookuptables. a new vtkDiscretizableColortransferFunctionCollection class was added to hold the additional tables etc.
* Where necessary proxy classes have been tweaked to support the new features
A short video introducing some of the features has been uploaded to youtube. We apologies for the brevity of the description included and hope that most of the new capabilities are self explanatory once the user starts to work with them.
http://www.youtube.com/watch?v=gGsc3xSlY6E&feature=c4-overview&list=UUS7l_HIyT0C-GlAv-jgDvQw
Two gerrit topics have been created, for ParaView
http://review.source.kitware.com//t/3737/<http://review.source.kitware.com/t/3737/>
and it requires the updated code from VTK
http://review.source.kitware.com//t/3736/<http://review.source.kitware.com/t/3736/>
There are a number of outstanding bugs/problems with the code.
* Save/restore state and python interface are not working as expected. We hope that someone more familiar with this part of ParaView can easily fix this, as all the proxy classes have been used to hold relevant information so it's all there, just not correctly being picked up by the internals.
* Histograms do not update automatically when visible and the time/data changes due to user interaction/animation, a hook into datachanged is necessary.
* The new transfer function modes/widgets should only be visible when the correct volume rendering mode is enabled. Currently they are accessible for all volume rendering modes but only take effect when the Raycast (1D/2D) or texture mapper (1D) are selected.
* Testing of the new features has not yet been included. One test exists but has not been committed.
* Numerous small code formatting and class naming issues need to be resolved.
We'd very much like to get these new features into future releases of ParaView, but have limited time to continue development and address the bugs mentioned above (and any new ones that are found). We hope that by making these branches available the fixes necessary can be made with the help of the community.
The features have been implemented by Nicholas Waldin (nicholaswaldin at hotmail.com<mailto:nicholaswaldin at hotmail.com>) whilst working as an intern at CSCS under my supervision. Nicholas is currently looking for employment in the field of scientific visualization, if you have anything suitable please contact him.
Yours
JB + Nicholas
--
John Biddiscombe, email:biddisco @.at.@ cscs.ch
http://www.cscs.ch/
CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07
Via Trevano 131, 6900 Lugano, Switzerland | Fax: +41 (91) 610.82.82
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131217/c09f329a/attachment.htm>
More information about the vtkusers
mailing list