Multi-image Analysis GUI
User Guide
Developer Guide

Developer Tools

The Developer Tools package contains example plugin code.

Java Plugin API

A Mango plugin is an implementation of an interface from the Mango Plugin API.

Atlas. The Atlas plugin interface can be used to map coordinates to labels. These labels appear in the toolbox and are updated as the user moves the mouse cursor within the viewer.

Atlas data that is organized according to the FSL atlas specification can also be loaded. In this case, the atlas is converted to an Atlas plugin internally. See this page for more information about creating FSL-style atlases.

EditableHeader. The EditableHeader plugin interface can be used to support the Edit Header feature for a header type plugin.

ImageLoader. The ImageLoader plugin interface can be used to provide access to a web-based library of files. Plugins of this type can appear in the Open Online Image toolbox dialog and the Load Online Overlay and Load Online ROI viewer dialogs.

MangoPlugin. The MangoPlugin interface is a general-purpose plugin and provides access to image data and viewer UI control. It can be used for performing calculations, creating ROIs, making graphs, writing files, etc. Plugins of this type will appear in the viewer Plugins menu.

ReadableHeader. The ReadableHeader plugin interface can be used to load image data from a header format unknown to the application.

SurfaceFormat. The SurfaceFormat plugin interface can be used to save and load surface data that could be used with other surface rendering applications. Files of any format that have an installed plugin can be loaded via the surface viewer build dialog. All installed formats will also be listed as an option in the Export menu.

SurfacePlugin. The SurfacePlugin interface is a general-purpose plugin and provides access to surface data and surface viewer UI control. Plugins of this type will appear in the surface viewer Plugins menu.

WritableHeader. The WritableHeader plugin interface extends ReadableHeader and can be used to both read and write an unknown header format. Plugins of this type will appear as an option in the Save As dialog.

Python Script API

In addition to the Java API described above, a Python API is also available. Scripts can be written (or recorded via the GUI) in Python, then played back using the Script Manager. Click here to learn more about using scripts in Mango.

Open Source Projects

Papaya. A pure JavaScript medical research image viewer based on Mango. Visit the Papaya page for more information.

Daikon. A pure JavaScript DICOM reader. Visit the Daikon GitHub site for more information.

Papaya-Builder. A build tool for customizing Papaya. Visit the Papaya-Builder GitHub site for more information.

GIFTI-IO. A GIFTI reader/writer implementation in Java. Visit the GIFTI-IO GitHub site for source code and example usage.

Custom Protocol

Create a link using the custom protocol mango:// to open files directly in the desktop version of Mango. Click here for more information.

For example, mango://rii.uthscsa.edu/mango/data/sample_image.nii.gz.

What about native code?

It's possible to incorporate native compiled libraries into Mango plugins using the Java Native Interface (JNI). This works particularly well since image and surface data in Mango are stored as native arrays. For more information, see the developer tools package. It contains example code describing how to build a native plugin.