[Paraview-developers] Visual Bookmarking in ParaView - Lookmarks

Stanton, Eric T etstant at sandia.gov
Tue Mar 8 17:31:56 EST 2005


This is to inform you all of a new feature I've checked into ParaView
called Lookmarks. They provide users with a one-click way to save and
recreate views of their data. They capture the state of the filters in
the source window that are "contributing" to the current view. They make
use of the session state mechanism already in ParaView but with added
benefits. 

A note to those that have alread tried out lookmarks - If you've been
getting a vtk error when trying to revisit a lookmark you created, or
experienced problems when dragging a lookmark to a different location,
these bugs have since been fixed. Try updating your source.

User Interface Notes - The Lookmark Manager, which is where the user
interacts with Lookmarks, is located in the "Window" menu of the main
ParaView window. It is here that you can create, rename, annotate,
organize (into hierarchies using folders and the drag-and-drop
mechanism), update, remove, and save Lookmarks. 

Interchangeable Readers - One added benefit is that Lookmarks can be
"applied" to different datasets that are of similar geometry and
point/cell variables. Under the current scheme (which might be changing
here shortly), to visit a lookmark and have it use the dataset from
which it was created, click on the lookmark's thumbnail with "Lock To
Dataset" turned ON. Otherwise, the dataset currently being viewed in
ParaView will be used (without changing the current timestep or camera
properties).

Some notes on the code - I am about to commit some major changes to the
Lookmark classes such as having vtkPVLookmark inherit from vtkKWLookmark
(and removing the vtkKWLookmark data structure from
vtkPVLookmarkManager) and moving the ViewLookmark functionality from
vtkPVLookmarkManager to vtkPVLookmark where it makes more sense. So the
following notes on the classes are based on those changes:

vtkPVLookmarkManager - This provides callbacks to the interface, stores
lookmarks and folders, and has some drag-and-drop code
vtkPVLookmark - This will have the ViewLookmark code currently in
vtkPVLookmarkManager. It creates the thumbnail from the render window,
and maintains a collection of pvsources (filters) that make up the
lookmark (this is so that if a lookmark is generated multiple times, we
can remove the preexisting filters from the Source Window)
vtkKWLookmark - A composite of vtkKWWidgets to make up the lookmark
widget displayed in the lookmark manager. Also includes drag-and-drop
callbacks and renaming code.
vtkKWLookmarkFolder - Like the vtkKWLookmark it contains a checkbutton,
labeledframe, renaming functionality, and drag-and-drop callbacks. Other
vtkKWLookmark and vtkKWLookmarkFOlders can be packed into its internal
frame
vtkXMLLookmarkElement - Inherits from vtkXMLDataElement. Modifies
PrintXML so that it encodes special characters in the attribute values
of the xml tags. 
vtkPVWindow - Maintains a pointer to the vtkPVLookmarkManager

Future Code Changes:
- After the changes mentioned above, I'd like to add a
vtkPVLookmarkFolder that maintains a vector of the lookmark widgets it
contains. Then, vtkPVLookmarkManager would only need to know about the
root-most vtkKWLookmarkFolder and can traverse the tree hierarchy from
there. This allows us to remove the Location var from vtkKWLookmark and
vtkKWLookmarkFolder and vtkPVLookmarkManager::PackBasedOn...(),
vtkPVLookmarkManager::Increment...() and
vtkPVLookmarkManager::Decrement...() code which is pretty messy
- Also, I'd like to use the readers.xml and filters.xml files to
generate the code that performs the parsing of the session state file.
This way when new readers and pvwidgets are added, Lookmarks are ensured
to still work.

Current Limitations - Does not currently support Sources like cones and
cylinders but only readers in readers.xml (or ones that make use of
vtkPVWidgets in the same way). Will fix this shortly. 

Further documentation - Look in the Lookmark Manager's "Help" menu for a
quick start guide and a more extensive user's manual.

Feedback - I'd appreciate any general comments on the idea of lookmarks,
or specific ones on code improvements. And of course if you run into any
problems when using lookmarks, please let me know.

Thanks,

Eric Stanton
Sandia National Laboratories
Data Analysis and Visualization



More information about the Paraview-developers mailing list