1.1.1. What is VolumeViz

VolumeViz is an Open Inventor extension for visualizing volume data.

VolumeViz is a separately licensed extension. You must have a VolumeViz license string in addition to your Open Inventor license string. You will also need a VolumeVizLDM license string to use the optional Large Data Management (LDM) file format. The VolumeViz extension includes user protection under license for Landmark U.S Patent Number 6,765,570.

In this chapter we assume you are already familiar with core Open Inventor features. You should already know how to create an Open Inventor scene graph, view and light a scene, position and rotate objects in the scene, select objects in a scene and so on. If you are just getting started with Open Inventor you should read Volume 1 of this document or at least read the Open Inventor Fast Start tutorial included in the SDK installation. In this chapter we will focus on the unique features of VolumeViz and how they work with core Open Inventor. We will also assume that you have some familiarity with volume data concepts so we can focus on how to use VolumeViz features effectively.

How to use this chapter:

If you are new to VolumeViz, you might want to read the chapter through from start to finish. It starts with an overview of all the powerful features in VolumeViz, so you can see the tools that are available for building your application. If you are in a hurry and already know Open Inventor, you might jump directly to the “quick start” section, which is intended to help you get an initial image of your data on the screen quickly. The rest of the chapter explains the VolumeViz features in, more or less, order of increasing complexity. If you are already somewhat familiar with VolumeViz, you can use the overview section Section 1.1.2, “VolumeViz Features” as an index to help you find information about the “next” feature you want to implement. The features are organized in related groups such as clipping and interaction.

Volume data:

Volume data is a three-dimensional set of data values on a 3D grid. The data elements are called voxels (volume elements) and they are located on the grid points. The diagram below shows a volume data set with uniformly spaced voxels. The coordinate system is right-handed, just like the default coordinate system in Open Inventor. In this chapter we will normally use “IJK coordinates” when we are talking about the voxel coordinate system, in other words specifying the location of a voxel within the volume. These coordinates are integer and range from zero to NumVoxels-1 on each axis. So voxel [0,0,0] is the lower, left back corner of the volume. The number of voxels on each axis defines the “size” of the volume. This is a fixed property of the volume.

We will use “XYZ coordinates” when we are talking about the Open Inventor 3D world coordinate system. These are floating point coordinates as usual. The volume has an “extent” in XYZ coordinates, like any geometry. However unlike point, line and polygon geometry, the extent of the volume in 3D space can be modified by the application. The ratio of extent to size on each axis defines the “voxel size” or “voxel spacing”. Voxels do not need to be uniformly spaced.

Typically each voxel has an associated scalar value, either integer or floating point. However voxels may also contain an RGBA color value or a boolean value (for mask volumes).

Volume data set – a 3D grid of voxels

Volume visualization is used in a wide variety of applications including medical imaging, oil exploration, nondestructive testing, meteorology, molecular modeling, failure analysis, fluid dynamics, electronics, magnetism, and more. A major source of volume data is medical and industrial scanners, such as the CT (computed tomography) machine shown below. Other scanner technologies generating volume data include MRI, ultrasound, and confocal microscopy. Medical and industrial image data are usually considered to be a “stack” of individual images. Each image represents a thin slice of the scanned part and is composed of pixels (picture elements). These images may be viewed separately as shown here:

Phillips CT scanner (source: Wikimedia Commons)

Figure 1.1. Phillips CT scanner (source: Wikimedia Commons)

2D CT images (source: US Navy)

Figure 1.2. 2D CT images (source: US Navy)

But when considered as a volume data set, much more powerful visualization techniques are possible:

VolumeViz rendering

Figure 1.3. VolumeViz rendering

Another major source of volume data is 3D seismic surveys such as the marine survey shown below. Seismic imaging uses sound waves reflected from different layers of rock to map out the structure of formations deep below the ground and locate deposits of oil and gas. By (loose) analogy to medical data, seismic data can be considered to be a “stack” of individual seismic “lines”. Each line contains some number of “traces” and each trace contains some number of “samples”, where each sample is the reflected intensity value recorded at a particular time. Individual lines may be viewed separately as shown here:

Marine seismic survey (source: The Open University)

Figure 1.4. Marine seismic survey (source: The Open University)

2D seismic visualization (source: USGS)

Figure 1.5. 2D seismic visualization (source: USGS)

But when considered as a volume data set, much more powerful visualization techniques are possible:

VolumeViz rendering (data courtesy CGG Veritas)

Figure 1.6. VolumeViz rendering (data courtesy CGG Veritas)

Volume visualization in many industries (but especially in oil and gas) is very data intensive. Often it is not possible to load all the data into system memory, either because a single volume is very large or because multiple volumes must be loaded for blending or time series visualization. VolumeViz provides a powerful and efficient solution called LDM (Large Data Management. The LDM system manages volume data in small chunks called “tiles” allowing efficient random access to any part of the volume; manages multiple versions of the data at different resolution levels allowing rendering to adapt to the available memory and performance; and provides asynchronous, adaptive data loading using multiple threads. The benefits of LDM include interactive navigation of extremely large data sets and scalable performance.

VolumeViz provides the tools to visualize and explore volume data using a wide variety of techniques. Preliminary exploration is often done using slices, which are planes of voxels extracted from the volume, and opaque subvolumes or “probes” (called volume skin in VolumeViz). VolumeViz also provides a state-of-the-art GPU ray casting algorithm for directly rendering a volume or subvolume. Additionally you can interact with volume data, transform and filter volume data, clip and sculpt volumes and even extend VolumeViz with your own algorithms. VolumeViz automatically takes advantage of the latest graphics hardware features such as programmable shaders and compressed textures to maximize performance and image quality. And VolumeViz automatically manages system memory and texture memory, allowing large volumes to be rendered efficiently.

Because the VolumeViz module is integrated with Open Inventor, you can mix volume rendering and conventional 3D geometry (subject to possible limitations of the hardware) to make a more meaningful image. VolumeViz, like Open Inventor, can also be extended to meet the custom requirements of advanced applications. In addition to the Open Inventor custom node mechanism, VolumeViz provides a framework that allows applications to easily implement custom GLSL shader functions. This framework includes a library of pre-built GLSL shader functions that allows applications to extend or replace specific steps in the rendering process.

VolumeViz uses LDM to manage data internally regardless of the original data format. However it also provides an LDM data file format that is optimized for the LDM data manager and provides other valuable features such as data compression to reduce disk space requirements. A converter utility is provided for converting other formats to LDM data files for efficient access. VolumeViz also supports loading data from application-specific data formats (that may be tiled and multi-resolution) by implementing a custom volume reader class.

VolumeViz provides integrated support for combining rendering and computation. Transforming and filtering volume data can be done at loading time or dynamically at rendering time. The LDM data manager also provides the application with convenient data access queries such as returning data in a subvolume, on a plane or on a line. VolumeViz computing support is based on the Open Inventor Computing Framework, so applications can control where data is stored (CPU or GPU) and implement algorithms using CUDA, OpenCL or GLSL.

The VolumeViz API is provided for C++, Java and C# (.NET) programmers. All the same features are available independent of the application development language. However there are small differences in the API to accommodate the syntax and style of each language. In most cases we will present the blocks of example code in all three languages to avoid confusion. However in the text we will talk about method names using the C++/Java lower case convention, for example “setFilename()”, which is “SetFilename()” in the C# version of the API.