Annotation Features Added to VTK

At the Direction des Applications Militaires Île-de-France (DIF) of the Commissariat à l’Energie Atomique (CEA), France, an application-specific visualization tool has been developed to post-process the solutions to the numerical simulations calculated at CEA/DIF. On the visualisation side, this tool uses VTK and ParaView server.

One the of the goals of the current collaboration was to add a number of annotation capabilities to VTK, specifically in the following areas:

  1. Extension of the existing axis actor and cube axes actor.
  2. Addition of a new polar axes actor.
  3. Improvement and enhancement of the scalar bar actor.

In this article, we briefly report on these new capabilities, which are available in VTK 5.10.

Cube Axes

Over the past few years, the 3D cartesian axis capabilities available with VisIt have been extended in order to introduce new capabilities; in particular, the ability to display internal grid lines and or translucent cut planes within cube axes actors. In addition, about 30 control parameters regarding bounds, titles, colors, and labels were added to the original classes, as well as a specific 2D mode to handle poor title/label appearance for two-dimensional results. We integrated these changes to the VisIt classes into VTK, attempting to retain the pre-5.10 VTK behaviour by default whenever possible.

 

Specifically, as illustrated here, it is now possible to annotate cube axes with translucent inner planes and inner/outer grids, and to independently control the following settings for each axis:

  • Axes bounds
  • Text and color of each title
  • Text and color of each axis and of its labels
  • Color and display of inner and outer grid lines
  • Color, translucency, and display of internal planes

 
Polar Axes

In the context of this collaboration, we created a polar axes actor, a feature which did not exist in VTK until 5.10. The main goal of this actor is to allow the display of a variable number of radial axes, with respect to user-specified origin and polar angle, along with polar arcs attached to the radial tick marks. We developed this new actor from scratch, based on CEA specifications.

As illustrated here, a number of parameters of the polar axes can be independently tuned, such as:

  • Origin and polar angle
  • Number of ticks and polar arcs (or auto-calculation option)
  • Number, display, color, and length of radial axes
  • Number, display, and color of polar arcs
  • Text attributes of axes and arcs titles and labels
  • Level-of-detail parameters

 
Scalar Bar

The class vtkScalarBarActor in VTK had been extended at CEA into a new class called vtkCEAScalarBarActor, in order to:

  1. Modify the title and label placement within the scalar bar actor, in order to ensure that all text be placed within the interior of the specified 2D actor size.
  2. The addition of optional frame and background color, possibly translucent.

As shown here, we ported these new features into the current VTK scalar bar actor. As a result, we had to modify its default behaviour as it was not ensuring that all text remained within the frame, which lead to visual defects when this option was added. We also used this opportunity to fix title placement behaviour, which was exhibiting collisions with the color bar when placing letters such as ‘q’ or ‘y’. We implemented these changes for both horizontal and vertical bar layout. 

Acknowledgments

This work was made possible thanks to a contract with CEA, Direction des Applications Militaires Île-de-France (DIF), Bruyères-le-Châtel, Bruyères-le-Châtel, 91297 Arpajon, France. We extend special thanks to Daniel Aguilera, Thierry Carrard, and Claire Guilbaud for this fruitful collaboration. We are looking forward to continued collaboration with CEA/DIF in this and other areas of scientific visualization.

Questions or comments are always welcome!