Mango software tool

Mango is a software tool for parallel segmentation and network generation and the pre and post-processing and analysis of associated data. The capabilities of mango include image enhancement, various segmentation methods, cluster identification and removal, euclidean distance transform, medial axis generation, grain identification and characterisation and pore-throat and grain-contact network generation. CT projection data reconstruction and registration (see Software features below) has also become part of mango, as well as many other modules providing functionality for various other data types like electron microscope images and FIB image series.

The core of the software is written in C++ and uses MPI for parallelisation. The source code of mango exceeds half a million lines of code. We work routinely on 2048 cube voxel datasets (8.6 billion voxels), as well as on larger datasets around 35 billion voxels, using the NCI supercomputer. The XCT in our Department is the main source of tomographic data which we analyse with mango. However, any 3D data (eg. synchrotron and other techniques) can be used as input.

The project started in 2000 and is still under active code development. If you have further questions, or you would like to trial the software academically please contact the team:

Software features

Image enhancement

The original image at the left and the filtered image at the right. The image is a spirulus shell taken with our XCT

Most data sets suffer from a number of noise artifacts and it is therefore prudent to carry out image enhancement processing prior to segmentation.

In our experience, a combination of an anisotropic diffusion filter followed by an unsharp mask leads to good results. The anisotropic diffusion filter removes 'Salt and Pepper' noise but preserves edges and the unsharp mask sharpens the image.


The segmented image on the right was generated using our 'Converging Active Contours' method

Image segmentation is the process of converting a multiphase dataset into one of two or more phases. Typically, a grey level image is devided into a low and high phase object. This seemingly simple process proves to be quite challenging. In order to produce satisfactory segmentations, more sophisticated methods, such as the watershed transform (applied to the gradient image), need to be used.

Sheppard A, Sok R, Averdunk H Techniques for image enhancement and segmentation of tomographic images of porus materials Physica A: Statistical mechanics and its applications 339 (2004) 145-151

Medial axis

A medial axis (colored) of a subset of a bead-pack (grey)

The medial axis is a topological skeleton which represents the shape of an object. In voxelated space, it can be generated by homotopic thinning. The medial axis can be used to create a network of an object.

In the image to the right the different colors of the medial axis voxels represent the distance to the nearest voxel of the other phase.

Grain partitioning

A partitioning of a subset of a sand grain pack.

The watershed transform, when applied to the euclidean distance map of an object, can be used for the purpose of grain partitioning. This works fairly well for 'sphere-like' objects like sand or rice grains.

One of the drawbacks of the watershed transform is oversegmentation and usually a merging step needs to be carried out to achieve the desired result.

Network generation

The image shows part of a network generated from a hip bone

Currently mango can generate networks using a medial axis or a watershed partitioning.

A pore-throat network (ie. the network of the void space of an object) is usually generated from the medial axis whereas a grain-contact network is typically created from the grain partitioning.


Image Registration refers to the geometric alignment of two images of the same object. The two images may be acquired in different orientations, at different resolutions, in different states (dry and flooded) or by different imaging apparatus (3D micro-CT and 2D SEM). Once multiple images are geometrically aligned, the information from all sources can be correlated to resolve ambiguities which cannot be resolved through the examination of the individual images alone.

For example, reservoir rock can contain sub-micron scale-pores which are currently not resolvable using micro-CT. These sub-micron porous regions are impossible to distinguish from a variety of similarly-attentuating non-porous minerals. One method for identifying the sub-micron porous regions is to micro-CT-image the rock when flooded with an X-ray attenuating fluid. All porous regions then become clearly distinguishable from the non-porous regions. Furthermore, when the dry-image is registered with the wet-image, the intensities in the two images can be correlated to give a quantitative association between attenuation and porosity.


The Mango reconstruction module gives the ability to start the data processing pipeline from raw cone-beam X-ray projection data from a variety of acquisition trajectories. The functionality ranges from state-of-the art software alignment algorithms to reconstruction for helical trajectories based on the Katsevich inversion formula. Combining these tools, we have demonstrated micro-CT imaging at cone-angles exceeding 50 degrees; resulting in an order of magnitude shorter acquisition time over conventional micro-CT systems using circular trajectories and Feldkamp type reconstruction.

T. Varslot, A. Kingston, G. Myers, and A. P. Sheppard, High-resolution helical cone-beam micro-CT with theoretically-exact reconstruction from experimental data, Medical Physics, vol 38(10), doi:10.1118/1.3633900 (18 pages), 2011.

A. Kingston, A. Sakellariou, T. Varslot, G. Myers, and A. Sheppard, Reliable automatic alignment of tomographic projection data by passive auto-focus, Medical Physics, vol 38, 4934 (12 pages), doi:10.1118/1.3609096, 2011.


Sheppard, Adrian profile
Head of Department

Updated:  15 June 2016/ Responsible Officer:  Head of Department/ Page Contact:  Physics Webmaster