Volume

This visualisation shows a volume rendering of the loaded data in the 3D window. This is different from a surface display in that it potentially uses the whole data set to produce each image, assigning each voxel material properties (for instance colour and opacity) from a transfer function (or 'colour map') based on the underlying data value at each voxel.

In order to produce reasonably fast, interactive volume renderings, most of the visualisation is handled by transferring the 3D data to a graphics card, and this must support at least OpenGL 3.0 in order for this visualisation to be enabled. However, the required graphics memory is limited as much as possible by normally only storing a single byte of data for each voxel in the data set, such that it should be possible to visualise even high resolution micro CT data sets with only moderately capable graphics cards such as are found in most modern computers. If stradview can not fit the data in the available graphics memory, it will try to reduce the resolution of the data set until it is able to do so.

The resolution of the volume rendering is automatically lowered when any of the controls on this page are being moved, or when the viewpoint in the 3D window is being changed using the mouse, to ensure that the update is fast enough to be responsive. The visualisation is then re-created at the user-specified resolution once the change is completed, i.e. the slider is dropped or the mouse button released. If the display is not sufficiently interactive, then try specifying a lower resolution during interaction.

For 8-bit data (such as is loaded from most image types other than TIFF), this is directly loaded to the graphics memory. For 16-bit data (such as is typically used in CT and other DICOM image formats), the data is first windowed, as in the image and reslice windows, and only this windowed brightness data is stored for use in volume rendering. A consequence of this is that the windowing levels (range or contrast of the data) strongly affect the type and quality of the volume rendering. For DICOM CT data (i.e. which displays the data units as 'HU'), these are automatically adjusted when you select default colour maps, but for other data sets these will need to be appropriately set.

When the loaded data is not a set of evenly spaced, parallel images, it is internally re-sliced in the same way as in the reslice window, and this resliced data set is used for volume rendering. Note that the reslice window can also perform slab rendering, which is a type of volume rendering, in that it can create maximum or minimum intensity or average data: this is not possible using the volume rendering in the 3D window.

Usually, selecting a default colour map, possibly adjusting the windowing of the data, and appropriate setting of the overall translucency, will be enough to give a reasonable result. More detailed explanations below cover the overall settings, detailed control of the colour map, cropping of data to remove any parts which are obscuring the visualisation, and combining volume and surface renderings.

General control of volume rendering

The quality of the volume rendering (after any dynamic update) can be changed from 'very low, linear' to 'very high, cubic', where the first term corresponds to the depth sampling during volume rendering, and the second to the type of interpolation. Cubic interpolation takes up to twice as long and in some cases does not show much difference over linear interpolation for this visualisation. However, it is useful where the data is poorly sampled, for instance CT data with a large slice spacing, or low resolution compared to the complexity of the data. The highest 'very high, cubic' increases the sampling resolution substantially, which is only required when the colour map changes very quickly with data value.

The 'overall translucency' slider changes the relative visibility of data displayed with different opacities, without affecting the colour map. This can be used to quickly reveal the more translucent parts (a low value on this slider) or to only show the opaque parts (a high value). The default colour maps are designed such that various levels of overall translucency are all useful.

The 'gradient noise threshold' slider controls the level at which discontinuities in data value are treated as surface boundaries, as a percentage of the maximum (windowed) data range. This affects two aspects of the volume rendering. Firstly, it controls which gradients in the data are shaded according to the lighting direction. Secondly, it allows the volume rendering to detect if an intermediate data value is really just a transition from one material to another with a very different data value, and make such a value translucent. This has the effect of dramatically increasing contrast between different materials, and can be seen as a much easier to use alternative to 2D (gradient and data value) transfer functions. The easiest way to set this is to reduce the value until just before you start to see noise in the rendering. Setting this to 100 disables the use of gradient shading.

The 'front face translucency' slider can be used to increase translucency for data below the gradient noise threshold and also gradients which are in the view direction. This results in an effect much like the clear phong shader for surfaces, which allows hidden surfaces and details to be more clearly seen.

The 'overall wetness' slider controls how data is displayed which is translucent because it is in a transition region from one material to another (due to the gradient noise threshold setting). When set to zero, transitions are completely translucent. When set to a higher value, specular reflections only are visible, which creates an effect similar to the material being covered in a layer of water.

The following two buttons allow opening of other controls which affect some aspects of volume rendering as well. If the data is 16-bit, then both the windowing and filtering can be changed by pressing 'input data' which opens the Image display dialog. Increasing the image filter extent value can remove low levels of noise in the volume rendering and is a good idea if the resolution had to be reduced.

Also, many of the graphics controls, accessed using the 'lighting' button, affect the lighting and shadows in volume rendering. In particular, turning off 'radiant shadows' gives a more traditional, less realistic, volume rendering. Setting 'ambient' to 100 in addition to disabling shadows turns off all shading effects, just leaving material colour and translucency values. The 'Occlusion' setting controls the spread of the shadow from the front light, which results in a similar effect to ambient occlusion of surfaces. It also controls the blurring of the shadow from the side light.

The lighting rotation and position controls also allow the location of the light to be altered so different features can be highlighted. The light can be moved right around to the back of the data so that it is shining towards the viewer, by either rotating full left or right. This can effectively highlight more transparent sections, however the rendering will be somewhat slower when using a forward-facing light, particularly if the light balance is set such that some front lighting is still enabled.

Control of the colour map

Detailed control of the transfer function (colour map) requires the setting of up to ten colours, with associated data values, translucency (alpha) and material parameters. The visualisation result can be quite sensitive to the exact setting of all these. The first selection box allows them all to be set to various default values, mostly designed for CT and micro-CT data. If the data is recognised as being in Hounsfield Units (HU), then this option also automatically alters the windowing. These default settings ensure that the whole range of the 'overall translucency' slider should give useful visualisations.

Fine control is possible by changing the material, opacity or data value of any of the ten rows. Clicking the button on the left enables that row in the current colour map. When enabled, clicking on the material sphere image brings up the material selector. This allows you to change colour, metallic, roughness and anisotropy values independently, or by selecting a pre-defined material type. New materials can also be saved to this list: by default, these are stored in the 'materials' sub-directory of the application data folder. These materials will be available whenever you run Stradview and can also be selected from the draw task page. The opacity of this material and which data value it is applied to are controlled by the following sliders.

Any of these rows can be set to have any other values, they do not have to be in order, and the enabled rows do not have to be contiguous. The 'sort' buttons can be used to tidy up the ordering, but this does not affect the actual colour map at all. On the other hand, the 'flip' buttons invert the material value sliders for all rows. This does have a significant impact on the colour map. Note that, for 16-bit data, the data values are all relative to the extent of the current windowing function, so it makes sense to adjust the windowing before fine tuning the colour map.

Having created a new colour map, this will be saved with the data file when it is next saved. However it is also possible to use the 'save' button to store just these parameters to a volume rendering configuration file. The default location for these is in the 'volumes' sub-directory of the application data folder. Any files found here will be added to the overall selection box, after the default settings, when stradview is started. This allows you to apply a good set of parameters to another data set.

Since it is difficult to set the colour map accurately just using these controls, two additional visualisations are available to help.

Firstly, clicking the 'show colours on image data' checkbox will show the colours, at the corresponding data values, on the images and reslices in all windows. The alpha (transparency) values are ignored for this purpose. This should allow a much easier matching up of a specific colour with a specific range of data values that you want to cover particular features in the image data.

Secondly, when the volume visualisation page is selected, and a data set is loaded, the lower visualisation window displays an approximate histogram of all the data values in the data set, over the whole range of these data values. Superimposed on top of this are the extent of the current windowing function (for 16-bit data) and also the colours and opacities of the colour map. A small circle is drawn for the edge of the window and also for each enabled row in the colour map. Clicking and dragging this left and right will change the data value to which this point corresponds. Clicking and dragging up and down will change the alpha value to which this point corresponds. However, the other material parameters can only be changed by clicking on the material sphere image.

If you click somewhere else on this histogram, and the current windowing function extends beyond the range of the data, it will be automatically limited to the actual data range.

Cropping the data used in volume rendering

There is often data surrounding a volume rendering which gets in the way of something else you want to visualise. Equally, sometimes it is useful to see something in the middle of the volume which is obscured. There are two different ways to crop (i.e. remove) data from the volume rendering.

Simple cropping by limiting the data in each of the x, y (within the images) or z (between the images) directions is achieved by dragging each of the two sliders after the corresponding labels. The first is the minimum and the second the maximum value to display, relative to the original extent of the data. These sliders are never allowed to cross each other. The 'to reslice' checkbox also allows you to crop the volume rendering to the current positon of the reslice plane. Which side of the reslice to show data is determined by the orientation of the reslice: if you want to change this, just click any of the 'Rotate' buttons twice to flip the reslice.

More local cropping can be achieved by first positioning a landmark within the data, then choosing the landmark using 'to landmark'. The following 'within radius' slider controls how far from this landmark that the volume rendering is displayed. Checking 'Show data outside radius' instead makes all the data within the sphere transparent and displays data outside the sphere.

Much more complex data cropping is possible by first defining a surface (or surfaces) within the data. This works in exactly the same way as the surface-based cropping in the reslice and orthographic windows. The 'to surface' selector box can be used to determine which object to use for the cropping. This selector also has an option for cropping to '(all)', which uses all 3D surfaces, or '(none)', which results in all of the data being shown. The 'show data outside surface' option displays data outside of the current crop selection, rather than inside.

There are two more checkboxes which refine how this cropping is performed. Normally, any voxel outside the cropped surface is simply set to zero before rendering. However, the 'antialias' checkbox allows voxels to be partially set to zero according to how much of the surface actually intersects with each voxel, which can reduce voxel patterns in the rendering. The 'use alpha' checkbox performs cropping by setting up an additional 'alpha' translucency volume and not changing the data. This takes up more graphics memory, but guarantees that the data colour is not affected by the cropping. The appropriate setting will depend on what you are trying to achieve in the visualisation.

These options allow easy removal of extraneous features, for instance by defining a contour in the first and last image and interpolating a surface between them. Alternatively, you could automatically extract contours for the body and constrain the volume rendering to be inside it. Or you could create a surface for the CT table and specifically exclude this from the volume display.

Combined volume rendering and surface rendering

Volume and surface visualisation can in some cases be combined into the same visualisation. In fact, so long as an object is completely opaque (alpha value set to maximum), and so long as the corresponding visualisation display control is selected, it will be displayed with the volume. So images are displayed as long as the opacity (set in either the reslice or ortho visualisation tasks) is 1.0, and the 'show frame' tool is selected. Surfaces are displayed so long as they have been created, the 'O' slider is at maximum and the 'show contours and objects' tool is selected. 3D landmarks and other markers can also be displayed. The only exception is for reslices, which can not be displayed at the same time as the volume visualisation, even if they are opaque.

Note that, since the surface has to be completely opaque to be displayed with the volume, the 'clear phong' shader in the graphics settings does not work in conjunction with volume display.

When surfaces are displayed on their own, radiant shadowing is calculated from surface to surface. Equally, volume rendering calculates shadows based on the volume data. When they are combined, the surface is first drawn without any shadowing, then the volume rendering is calculated off screen, taking note of where the surfaces are, then a shadow from the volume rendering is projected onto the surface before the volume rendering itself is combined with the now shadowed surface. This works well presuming that the opaque surface is largely behind some part of the volume rendered image, but less well if the surface is all at the front. However, in that case there would be little point in adding the volume rendering to the display, since it would be largely obscured by the (opaque) surface.