New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

# Images as stacks: Volumetric data

A description of volumetric data type and how it can be considered as stacks of images

## Volumetric Imaging

Sometimes we wish to recover 3D information about a scene. When collecting a 3D image of an object we need a way to represent this as an image. We are used to 2D data with normal images, but what does a 3D image look like?

Essentially, a 3D image is really just like a 2D image, except that as well as having x and y dimensions, it also has a third z dimension. Therefore, instead of thinking of each pixel as being a small square, you can think of it as being a cube. This is called a voxel, or volume element. This is illustrated in the figure below, which shows a 4x4x3 volume of data, comprising of 48 voxels.

In some situations, we then access the data by providing a set of three coordinates representing the 3 dimensions, e.g. (2, 4, 3) could represent the 2nd column (x direction), 4th row (y direction) and 3rd plane back in the z direction. It is even more common to think of this data as being represented as a set of planes or slices; 2D images stacked on top of one another. This looks like the figure below:

In this case, it is common to specify a slice or plane in the z direction, and then just provide a 2D (x, y) coordinate to index a particular location on the slice. Some data formats, such as those derived from confocal microscopy, naturally lend themselves to this representation, as the data itself is captured as a set of planes through a sample. Each images plane naturally becomes a slice of image data in what is commonly called a 3D stack, as in the figure above.

One feature of volumetric data is that we represent all voxel in the image, even if the space is “empty” – in other words the space around a plant, for example, would still be represented by voxels, even if in real life there is no object volume in this space. This means that even if an object only occupies a small proportion of the voxel data, the data size is still large in storage size, as all the “empty” voxels must also be stored. This is equivalent to having an object occupy only a small space of a 2D image , but still having to store the full resolution of pixels in the data format (in the case of uncompressed images, at least).

In contrast to voxel-based 3D representations, another common way to store 3D object data is as a mesh. Instead of being represented as voxels, this represents the object as a set of coordinates describing it’s surface. Normally, the surface is broken down into triangles (as the simplest shape with a “surface”), and the object is represented as set of 3 coordinates describing the corners of the triangles.