-
Notifications
You must be signed in to change notification settings - Fork 209
How To Build Papaya
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 papaya-builder.sh. 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:
papaya-builder.shThis 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.)
papaya-builder.sh -nojquery -nodicomTo add the default Talairach/MNI atlas:
papaya-builder.sh -atlasTo add your own atlas (see the Atlases section for more information):
papaya-builder.sh -atlas myAtlas.xmlTo add custom images to the File menu:
papaya-builder.sh -images path/to/myImage.nii.gzIn 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:
papaya-builder.sh -images path/to/myImage.nii.gz -localTo create a single HTML file that contains all JavaScript, CSS, and image data (useful for sharing):
papaya-builder.sh -singlefile -images path/to/myImage.nii.gz -localTo configure the web page to load encoded image automatically, use the encodedImages parameter:
params["encodedImages"] = ["myImage"];The application Mango contains a front end GUI for papaya-builder. It can be found in the Image menu. Learn more about it here.