Skip to content

How To Build Papaya

RII-Mango edited this page Apr 9, 2017 · 16 revisions


The releases folder contains various pre-built versions of Papaya (e.g., with an atlas or without). However, you can customize a build of Papaya further by using A complete list of options can be found on the Papaya Builder project page. See below for a few example uses.

To produce the standard build, which includes JQuery and DICOM support:

Minimal Build

This is the smallest build and does not contain JQuery or DICOM support. (Papaya still requires JQuery, but if you page already loads it, you can remove it from the Papaya build.) -nojquery -nodicom

Adding Atlases

To add the default Talairach/MNI atlas: -atlas

To add your own atlas (see the Atlases section for more information): -atlas myAtlas.xml

Adding Images to the File Menu

To add custom images to the File menu: -images path/to/myImage.nii.gz

Building for Local Usage

In order to produce a web page that will automatically load an image when opened locally (as opposed to a web server), you must use the local option. When building for local usage, image data is Base64-encoded and stored in a JavaScript file.

(More images can always be added to the viewer regardless if the page loaded via a web server or locally; this option only applies to making the viewer automatically load an image when the page loads locally, since the browser forbids JavaScript from seeing local file references that the user has not explicitly allowed via a file dialog or drag-and-drop.)

To encode image data so that it can load locally, specify the local option: -images path/to/myImage.nii.gz -local

To create a single HTML file that contains all JavaScript, CSS, and image data (useful for sharing): -singlefile -images path/to/myImage.nii.gz -local

To configure the web page to load encoded image automatically, use the encodedImages parameter:

params["encodedImages"] = ["myImage"];

Mango Front End

The application Mango contains a front end GUI for papaya-builder. It can be found in the Image menu. Learn more about it here.

You can’t perform that action at this time.