Tomviz Interface Polish and Improvements

April 6, 2017

Tomviz is an open source, cross platform software application developed to run on Windows, macOS, and Linux. It makes use of Qt 5 for much of its desktop integration, and inherits many of its icons from ParaView which is one of its major dependencies. Over the last few months we have been focusing on a number of updates to our user interface in order to present a polished interface on all of our supported platforms. We have also been looking at general integration with our supported operating systems.

Running CPU-intensive Tasks in Background Threads

We have done a lot of work in the Tomviz interface to run anything longer running/CPU intensive in background threads. This starts from right after a file is loaded into memory, where the 3D scene is displayed while the application calculates the binned histogram values in the background. These are then shown once they are available, and you are able to interact with your data and begin exploring it. We added this feature early on, along with caching of loaded data histograms so that they can be shown instantly when switching between data. This could of course be made even faster by multithreading the code run in the background thread.

The Tomviz pipeline is composed of three basic building blocks – data sources, data operators, and visualization modules. The data operations represent some of the most (potentially) time consuming tasks, and so were moved into a background thread in order to keep our user interface responsive. They operate on a data source in place, and can transform the data in various ways that can take fractions of a second up to hours. They are written in C++ or Python, and now benefit from a significant array of features that enable you to observe them as they execute. The updated data is brought into the main graphical thread once all operations have completed.

Pipeline Interaction

As our pipeline has grown in complexity we have made a number of enhancements to make it easier to work with. The context menu (seen when right-clicking on pipeline objects) now contains a number of useful entries tailored to what was selected. You can for example show/hide visualization modules (even selecting multiple entries), delete items, view the source code of a Python-based operator, or clone a data source.

Most operations can be performed while the pipeline is executing in a background thread, and the execution of the pipeline is displayed enabling you to see at a glance which operations completed successfully, which one is currently operating, and whether any failed. We will continue to improve the pipeline interface, and add features that make it easier to interact with larger pipelines.

Updated Icons

We have been working with our graphic designer and discussing ideas for updated icons in the Tomviz, CMB, and base ParaView application. We had a desire to move towards simpler icons that used flat shading, and easily recognizable visual cues. We also wanted to replace a number of icons that had been added in a fairly ad-hoc way as requirements cropped up for new icons. Another driver was the need for larger icons to support high resolution and retina displays on macOS when using Qt 5.

Retina Displays

Support for retina displays is something we had been wanting to add for quite some time, and it made its first appearance in Tomviz’s 0.9.3 release. The macOS APIs present a legacy API that tells applications they have exactly half of the pixels in width and height as are actually available, using fast hardware scaling to fill the actual pixels on the display. This works but usually results in a fuzzy looking image, especially when compared to full resolution applications where double sized icons are preferred for example.

This situation is quite a lot worse when considering our OpenGL rendering where the context is only aware of the low resolution surface, which is upscaled. The rendering widgets used to display the visuals rendered by VTK needed to be augmented in order to request and consistently use the native resolution to define the size of the render surface, as well as for mouse interactions. The new QVTKOpenGLWidget was developed to integrate better with Qt 5, and uses QOpenGLWidget as its base class to create the OpenGL context etc. We used the Qt APIs to get the native resolution where appropriate, and ensure this information is consistently passed to our OpenGL render windows, interactors, etc.

Signed Applications

We have also been wanting to sign application binaries for quite some time. Our 1.0.0 release was the first to feature signed application bundles for macOS, which is the operating system that needed this support the most due to recent changes in how the operating system treats unsigned binaries. We would like to extend this to Windows in the future, and look at ways to make packaging easier on Linux. Our 1.0 release also features cryptographic hashes for all downloadable installers/source code, with a PGP signature, for anyone who would like to verify the integrity of these files.

Closing Thoughts

There were many other improvements made to the user interface as we prepared our 1.0 release, and we have been collecting bug reports since the last release. We would like to thank our growing community for all of the feedback, and our collaborators at Cornell University and Michigan. As you start using Tomviz we would love to hear your feedback.

The Tomviz project is developed as part of a collaboration between Kitware and Cornell University under DOE Office of Science contract DE-SC0011385. This is a community project, and we are very pleased to take input and contributions from all in the community.

2 comments to Tomviz Interface Polish and Improvements

  1. Retinal display? Darn it, the future is now — straight into my eyeballs. Off to trash my Mac Retina Display 🙂

    1. What can I say, we live in the future now! I am not a Mac guy, I guess you are telling me it is just retina rather than retinal with a little of your own “je ne sais quoi” 😉 I will get that fixed up, thanks Seb

Leave a Reply