You can think of the way a data cube is rendered as lines of sight going from every pixel of the display through the data cube and the voxels (visualisation speak for volume element of the data cube) on a line of sight contribute in some way to the colour and intensity of the display pixel. To decide how every voxel contributes, a number of algorithms (called shaders) are available. We are still experimenting with the shaders and suggestions are very welcome.
Below are two lists with the shaders available. Note that some shaders are available only in xray and some only in krot. The first list contains simple shaders. The Voxel sum and the Maximum voxel shaders are useful for exploring the data cube, because they are relatively fast and give a reasonable display of the data.
The second kind of shaders uses an equation of radiative transfer to compute the images. We call these shaders hot gas shaders.
The contribution of a voxel to the pixel on the display is calculated using a simple equation of radiative transfer, where a voxel is partly absorbed by voxels that are in front of it:
where ci is the intensity along a line of sight after adding a new voxel in front, si the intensity of the voxel added, ci-1 the intensity along the line of sight that is behind the voxel that is added, and oi the opacity of the voxel i. This calculation is done `back-to-front', so voxels in the back of the cube are partly obscured by voxels in the front part of the cube.
Note that if you specify an opacity equal to zero, this voxel becomes completely transparent but also invisible. You can use this to make features disappear (eg. noise). The disadvantage is that in order to make the data that you want to see transparent, you also make it barely visible. Consequently, the opacity of data you want to see has to be not too low and as a result one will tend to see only the surface of the emission regions.
There are a few versions of this implemented, differing in whether they do the rendering monochromatically or in colour.
The contribution of a voxel to the colour of the pixel on the display is calculated using the radiative transfer, but for each colour (red, green or blue) separately. This means that if a blue voxel is behind a red one, the blue is still visible. This makes the data appear more transparent. It also means that this shader produces images that are 24-bit deep (one byte for every colour) and to change colours on the display, you will have to manipulate the substances. It also means that to play movies made with this shader, you will have to convert the images to 8 bit. (conv24to8)
The drawback of this shader is that there are only eight substances. This makes the representation of the data to some extent schematic. But it can be useful to display both absorption and emission in a datacube.
A practical disadvantage of this shader is that it is difficult to set the colours and the opacities of the substances exactly as you want, there are many many parameters to set. It takes quite some time to produce reasonable images with this shader.
where o is again the opacity, v the value of the voxel. By setting you can control which parts of the data are visible/opaque. A small value of makes low-level emission already quite opaque, while a large value will show only the brighter voxels. Also, the computation is done on the floating point data, not on colours (hence the mono). This increases the dynamic range of the image very much. Images produced by this shaders are floating point.
An option offered with this shader that the intensity can be transformed before rendering, according to a similar function as above: