Difference between revisions of "ParaView Plugin"

From VistrailsWiki
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 8: Line 8:


== Download ==
== Download ==
*The patches for ParaView that are required for the plugin to work are available [http://downloads.sourceforge.net/vistrails/VisTrails_ParaView_Patches-0.1.tar.gz here] under the [http://www.opensource.org/licenses/bsd-license.php BSD] license.
*The platform independent source code to the VisTrails plugin for ParaView is available for [http://downloads.sourceforge.net/vistrails/VisTrails_ParaView_Plugin-0.12-r709.tar.gz download from SourceForge] under the [http://www.opensource.org/licenses/gpl-2.0.php GPL v2]


==Installation==
Binary packages for Mac and Windows are already included in ParaView-3.8.0 for Mac (10.5+) and Windows (32bit and 64bit).
There are three components to the VisTrails plugin for ParaView. First, a patch to the ParaView source code is required, since ParaView does not provide the necessary access to its undo stack by default. Second, there is a plugin for ParaView that will capture the actions that the user performs. Third, there is a version of VisTrails that has been adapted to interface with the ParaView plugin.


==== ParaView Patch ====
Get ParaView Binaries [http://www.paraview.org/paraview/resources/software.html here].
Since access to the data structures required by the plugin are not provided by default in ParaView, it must be patched and compiled from source for the VisTrails plugin to work.  The source code is not included in the plugin distribution, but can be downloaded from [http://www.paraview.org/paraview/resources/software.html here].
Since there has been development on the undo stack in ParaView since the latest official release, there are two patches available inside the VisTrails_ParaView_Patches.tar.gz file:
* ParaView-3.4.0.patch, for the latest release
* ParaView-dev.patch, for the current cvs version
These patches can be applied from within the ParaView source code directory with (use [http://www.cygwin.com Cygwin] on Windows):
patch -p0 < .../VisTrails_ParaView_Patches/ParaView-xxx.patch
If the patch fails, try running dos2unix or unix2dos on the .patch files to convert the line endings to the correct format for your system.


The BULID_SHARED_LIBS CMake variable must be set to ON, and ParaView can then be compiled as normal.
On Linux, you have to install it from source. The files are available for download from SourceForge under the [http://www.opensource.org/licenses/gpl-2.0.php GPL v2] and the instructions are below:


==== Plugin ====
* [https://downloads.sourceforge.net/project/vistrails/ParaView%20Plugin/v1.0-beta/VisTrails_ParaView_Plugin-src-1.0-beta.tar.gz Platform independent source code (version 1.0-beta)]
The source code to the ParaView plugin is located in the 'plugins' subdirectory of the distribution. The plugin, like ParaView itself, uses CMake to generate Visual Studio project files and make files.  You may need to set the ParaView_DIR CMake variable to point to your ParaView source directory. The plugin can then be compiled, which creates 'VisTrails.dll' on Windows, a 'libVisTrails.so' on Linux, or a 'libVisTrails.dylib' on Mac.  These can be loaded manually from within ParaView, or it can be copied to the ParaView plugins directory so it automatically gets loaded on startup.


==== VisTrails ====
== Documentation ==
A version of VisTrails that has been adapted to run along side ParaView is located in the 'vistrails' subdirectory of the distribution.  [http://www.python.org Python 2.5], [http://trolltech.com/products QT], and [http://www.riverbankcomputing.co.uk/software/pyqt/intro PyQT] are required to run VisTrails.  No compiling is necessary, though the 'vistrails' directory must be copied from the distribution directory to the ParaView 'plugins' directory so the plugin can find it.  The ParaView directory structure may look like this on Windows:
A [http://downloads.sourceforge.net/project/vistrails/ParaView%20Plugin/v1.0-beta/vistrails-paraview-usersguide-1.0-beta-rev1291.pdf Users guide] is also available for download.
.../paraview.exe
.../plugins/VisTrails.dll
.../plugins/vistrails/


== Installation on Mac OS X ==
==Installation==
=== Requirements ===
There are two components to the VisTrails plugin for ParaView. First, there is a plugin for ParaView that will capture the actions that the user performs.  Second, there is a version of VisTrails that has been adapted to interface with the ParaView plugin. The installers for Mac and Windows contain both components and they will replace the current installation of the plugin in ParaView.
* Python2.5
* Qt4.4 or above
* PyQt4 and sip
=== Building the plugin lib ===
Follow the same instructions above to build the plugin library (libVisTrails.dylib).
Run "make install" on paraview build if you haven't already (this is for building the bundle)


=== Including the plugin in the Paraview Bundle ===
== Enabling the Plugin ==
'''These instructions are only necessary if you plan to redistribute the paraview bundle with the plugin'''
After installing ParaView 3.8.0, the plugin should start automatically.


'''Before running the provided scripts, make sure to change them according to your environment, for example, path to Qt libs'''
If you built it from source:
*  Start ParaView 3.8.0
* Go to the Menu Tools > Manage Plugins
* Select '''VisTrailsPlugin''' in the Local Plugins Panel
* Check the Auto Load checkbox if you want the plugin to initialize automatically with ParaView (see Figure below)
* Click on Load Selected
[[Image:ParaViewPluginManager.png|640px|center]]
==== Building from Source ====
Make sure to set the correct version of the python executable and libs.
The BUILD_SHARED_LIBS CMake variable must be set to ON, and ParaView can then be compiled as normal.


* Run install_name_tool on libVisTrails.dylib to make the links point to the libs in the bundle. There's a python [http://www.sci.utah.edu/~emanuele/files/fix_plugin_lib.py script] to do that on a single step.
==== Plugin ====
  Run '''python fix_plugin_lib.py ./ ''' in the directory where the lib file is
The source code to the ParaView plugin is located in the 'plugins' subdirectory of the source distribution. The plugin, like ParaView itself, uses CMake to generate Visual Studio project files and make files. You may need to set the ParaView_DIR CMake variable to point to your ParaView build directoryThe plugin can then be compiled, which creates 'VisTrailsPlugin.dll' on Windows, a 'libVisTrailsPlugin.so' on Linux, or a 'libVisTrailsPlugin.dylib' on Mac.  These can be loaded manually from within ParaView, or it can be copied to the ParaView plugins directory so it automatically gets loaded on startup.


==== Copy the missing files to the bundle ====
==== VisTrails ====
* python executable (use the same used by the Paraview/PyQt4 building process):
A version of VisTrails that has been adapted to run along side ParaView is located in the 'vistrails' subdirectory of the distribution.  [http://www.python.org Python 2.5 or 2.6], [http://trolltech.com/products QT], and [http://www.riverbankcomputing.co.uk/software/pyqt/intro PyQT] are required to run VisTrails. No compiling is necessary, though the 'vistrails' directory must be copied from the distribution directory to the ParaView 'plugins' directory so the plugin can find it. The ParaView directory structure may look like this on Windows:
  cp /Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/python
.../paraview.exe
  install_name_tool -change /Library/Frameworks/Python.framework/Versions/2.5/Python @executable_path/../Frameworks/Python.framework/Python /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/python
.../VisTrailsPlugin.dll
* sip
.../vistrails/
  cp /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/sip.so /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/site-packages
  install_name_tool -change /Library/Frameworks/Python.framework/Versions/2.5/Python @executable_path/../Frameworks/Python.framework/Python /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/site-packages/sip.so
 
* PyQt python modules and libs
  mkdir /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/PyQt4
  cp /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyQt4/Qt.so /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/PyQt4
  cp /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyQt4/QtCore.so /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/PyQt4
  cp /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyQt4/QtGui.so /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/PyQt4
  cp /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyQt4/QtNetwork.so /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/PyQt4
  cp /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyQt4/*.py /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/PyQt4
  cp -r /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyQt4/uic /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/PyQt4
 
Download [http://www.sci.utah.edu/~emanuele/files/fix_pyqt_libs.py fix_pyqt_libs.py] and run as follows:
  python fix_pyqt_libs.py /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/lib/python2.5/PyQt4
 
* Qt plugin libs
  cp -r /path/to/your/qt/install/plugins/imageformats /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/
  touch /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/Resources/qt.conf
 
Download [http://www.sci.utah.edu/~emanuele/files/fix_qtplugin_libs.py fix_qtplugin_libs.py] and run as follows: 
  python fix_qtplugin_libs.py /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/imageformats
 
* Finally copy vistrails plugin and lib to bundle
  mkdir /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/plugins
  cp -r path/to/vistrails /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/plugins
  cp path/to/libVisTrails.dylib /path/to/ParaView-3.4.0_build/paraview-3.4.0/paraview.app/Contents/MacOS/plugins


== Usage ==
== Usage ==

Latest revision as of 12:39, 21 September 2010

Introduction

ParaView small.png

The VisTrails plugin for ParaView incorporates the provenance management capabilities of VisTrails into ParaView. All of the actions a user performs while building and modifying a pipeline in ParaView are captured by the plugin. This allows navigation of all of the pipeline versions that have previously been explored.

Please direct questions and bug reports to paraview@vistrails.com.


Download

Binary packages for Mac and Windows are already included in ParaView-3.8.0 for Mac (10.5+) and Windows (32bit and 64bit).

Get ParaView Binaries here.

On Linux, you have to install it from source. The files are available for download from SourceForge under the GPL v2 and the instructions are below:

Documentation

A Users guide is also available for download.

Installation

There are two components to the VisTrails plugin for ParaView. First, there is a plugin for ParaView that will capture the actions that the user performs. Second, there is a version of VisTrails that has been adapted to interface with the ParaView plugin. The installers for Mac and Windows contain both components and they will replace the current installation of the plugin in ParaView.

Enabling the Plugin

After installing ParaView 3.8.0, the plugin should start automatically.

If you built it from source:

  • Start ParaView 3.8.0
  • Go to the Menu Tools > Manage Plugins
  • Select VisTrailsPlugin in the Local Plugins Panel
  • Check the Auto Load checkbox if you want the plugin to initialize automatically with ParaView (see Figure below)
  • Click on Load Selected
ParaViewPluginManager.png

Building from Source

Make sure to set the correct version of the python executable and libs. The BUILD_SHARED_LIBS CMake variable must be set to ON, and ParaView can then be compiled as normal.

Plugin

The source code to the ParaView plugin is located in the 'plugins' subdirectory of the source distribution. The plugin, like ParaView itself, uses CMake to generate Visual Studio project files and make files. You may need to set the ParaView_DIR CMake variable to point to your ParaView build directory. The plugin can then be compiled, which creates 'VisTrailsPlugin.dll' on Windows, a 'libVisTrailsPlugin.so' on Linux, or a 'libVisTrailsPlugin.dylib' on Mac. These can be loaded manually from within ParaView, or it can be copied to the ParaView plugins directory so it automatically gets loaded on startup.

VisTrails

A version of VisTrails that has been adapted to run along side ParaView is located in the 'vistrails' subdirectory of the distribution. Python 2.5 or 2.6, QT, and PyQT are required to run VisTrails. No compiling is necessary, though the 'vistrails' directory must be copied from the distribution directory to the ParaView 'plugins' directory so the plugin can find it. The ParaView directory structure may look like this on Windows:

.../paraview.exe
.../VisTrailsPlugin.dll
.../vistrails/

Usage

With the VisTrails plugin loaded, ParaView may be used as normal. As the user performs actions, they are recorded by VisTrails in the Provenance Recorder window. ParaView pipelines can be loaded simply by clicking on the desired version. Currently, when data files are loaded in ParaView, VisTrails records the absolute filename. Therefore, whenever the pipeline is replayed, all of the data files must be available in the same location.

The user may load ParaView state files, but state loads cannot be undone. When a pipeline that is higher in the version tree is selected, playback must begin at the root, which may be slow. Like data files, the absolute path of state files are stored by VisTrails, so replaying of the state load requires that the file remains in the same place and unchanged.

VisTrails .vt files can be saved and loaded from the Provenance Recorder window, which will include the current state, as well as all previous states that have been explored. State files can also be saved from ParaView, and loaded into instances that do not have the VisTrails plugin loaded.

Most view state changes are not recorded by the plugin. When loading a .vt file, you may need to 'Zoom To Data' for a good view.

Known Issues

  • Resetting the ParaView state often does not perform a complete reset. The result is that when a number of actions have been performed, there may be errors if a different .vt file is opened. A simple workaround for this issue is to simply restart ParaView before loading a VisTrail file.
  • Occasionally, some actions are not captured by the plugin. This causes VisTrails and ParaView to get out of sync, which can create strange behavior or crashes when browsing the version tree. It is not clear what the root cause of this issue is - it is very inconsistent and difficult to reproduce.
  • The plugin has only been tested with a local ParaView server configuration.
  • When loading ParaView with VisTrails already running, VisTrails captures some of the initialization of ParaView. This is not standard usage, and this has not been seen when the ParaView plugin spawns the VisTrails process itself. However, it is not inconcievable that it could happen. When the Provenance Recorder window opens, it should only have a single empty oval in it. If it has several pipelines already in it, simply create a new VisTrail.
  • Only actions that are placed on the undo stack and state loads are captured. Other actions that may be performed that cannot be undone will not be captured, and will not be replayed correctly when navigating the version tree.