Granite SDB Plugin for ParaView
The Granite Plugin for ParaView is designed to provide interoperability between the ParaView/VTK framework and the UNH Granite Scientific Database System. It extends ParaView by providing multi-featured Reader and Writer modules to accomplish this functionality.
Example images and videos can be seen at the author's blog.
Specific features are as follows:
- Opens standard Granite XFDL files to visualize uniform rectilinear data
- Opens ParaView created Granite XFDL files to visualize non-uniform rectilinear data
- Opens standard multi-resolution Granite XFDL files to visualize multi-resolution uniform rectilinear data in a streaming overlapping AMR fashion
- For single resolution data, allows data extents to be user specified pre-read, to visualize a specific VOI (volume of interest)
- Writes uniform and non-uniform rectilinear data sets (VTK, DICOM, binary, etc) to Granite XFDL/BIN files
- Supports resampling output data so data extents match the spatial bounds
- Supports writing uniform rectilinear data sets to Granitemulti-resolution XFDL/BIN files and directory structures at a specified number of resolution levels and steps per level
- Supports the following custom meta-data tags for increased functionality with ParaView:
- CustomParaViewOrigin - Spatial origin on axes (3 doubles)
- CustomParaViewSpacing - Spacing/magnification of data against spatial coordinates per axis (3 doubles)
- CustomParaViewGrid - Spatial coordinate arrays per axis representing the spacing of each point lattice in a non-uniform rectilinear grid (3 double arrays)
- CustomParaViewType - VTK data type to be used for this dataset. vtkImageData for uniform rectilinear (default if not specified), or vtkRectilinearGrid for non-uniform rectilinear data
- "Array.Component" formatting for attribute names. Since VTK supports the concept of multiple arrays of data, each having its own components, the plugin will emulate importing this information from Granite by parsing dots found in component names into "Array.Component" - e.g. "VectorVel.x", "VectorVel.y", "VectorVel.z", "temperature.amount" would create two arrays, one named "VectorVel" with 3 components "x", "y", and "z", and one array "temperature" with a single component "amount"
- Directly interfaces with Granite library via JNI, andallows standard command-line arguments to be specified within GUI for the Java VM (memory allocation, debugging, garbage collection, etc)
- Allows the number of AMR subdivisions to be specified
- Adheres to (mostly) all VTK standards and implementation requirements for maximum compatibility with all filters, mappers, and other ParaView functionality
- Supports data sets as large as ParaView and physical memory permits
- Successfully tested on all major platforms (Windows, Linux, OSX)
- ParaView source (verified with 4.2.0)
- CMake (verified with 3.0.2)
- Qt libraries (verified with 4.8.6 - version 5 has issues with CMake)
- Java JDK of matching architecture as C++ build configuration (32/64) (verified with 22.214.171.1240)
- CMake supported build environment (Make, Visual Studio, Xcode, etc)
- Compiler supporting C++11 standard (Preconfigured to set gcc and VC for correct standard. Other compilers may need additional switches in Cmakelists.txt)
- POSIX compliant OS (Pre-compiler adjusts for Windows libraries)
After ensuring all requirements are installed, perform the following steps:
- Ensure a system restart has occurred since Qt installation
- Copy "Granite" directory from this package in its entirety to the "Plugins" directory in the ParaView source
- Execute CMake GUI. Select ParaView source directory, and a choose a new target build directory (different than source)
- Run Configure in CMake. Will likely require location of QMake executable. Choose from Qt installation, and configure any further desired options. Run Configure again until no errors are returned. Then run Generate.
- Open generated project in build directory using specified IDE/compiler. Build "ParaView" and "Granite" projects.
- Before executing ParaView, ensure the following have been added into your system path:
- Qt bin directory (contains Qt dynamic link libraries)
- jre/bin/client directory of the JDK installation (contains jvm.dll). NOTE: This is the biggest area where the plugin can fail - you must be sure to choose the JDK installation that matches the architecture of the build, and you must include the directory containing jvm.dll in your path - due to Java restrictions, you cannot simply copy jvm.dll to the directory containing paraview.exe - the plugin will fail
- Run ParaView, then navigate to Tools->Manage Plugins. Expand "Granite" plugin (if it is not listed, there was an error above, do not manually specify a DLL/XML file). Select "Auto Load" and "Load Selected". Close Plugin Manager
- Navigate to Edit->Settings->Granite Settings, and specify the path and filename of granite.jar. Quit ParaView.
- Installation complete. When running ParaView for normal use, specify the "--enable-streaming" switch for AMR support.
Note: After activating the plugin, if ParaView will not load, displays a "T()" error, or crashes, double check step 6b above.
- The core VTK AMR code currently only supports cell data. The Granite plugin adjusts for this by loading point data into the cell arrays - however, this leads to blockier visualization. Partial compensation for this effect can be achieved by adding a cell-to-point data filter on the output - however, due to interpolation, the quality of multi-resolution rendering is always impacted
- Due to relative path limitations in Granite, Linux has issues opening MR datasets that are not in the current working directory
- Writing multiresolution datasets that generate very low resolution resolution levels (e.g. too many levels, too large of steps) will not re-open in ParaView
- Multiresolution datasets only support uniform rectilinear data, and a single component
- Plugin will read and write all components as floats, regardless of what format they are written as in Granite binary file. This can lead to larger file sizes if writing from char/short datasets
- Plugin will display a "Queue Empty" error message after showing all blocks of the highest resolution in a multiresolution dataset. This error does not impact functionality, and can be ignored
- VOI extents UI fields will not automatically update to the extents of the dataset upon opening a new XFDL file - they will read 0. To overcome this, the Granite plugin will only use VOI extents if one of the fields is updated from 0 to another value.