Overview
Forum
Mango
iMango
Papaya
Multi-image Analysis GUI
Download
User Guide
Developer Guide
Troubleshooting
Acknowledgements

Mango ROI Format Specification

Mango ROI data is stored in NIFTI image format. Image dimensions, voxel dimensions, orientation, and origin are all based on the original base image. Data type is always 1-byte unsigned integer with each bit representing one of eight ROI mask colors. By default, the ROI is always saved as a single, compressed file. Click here to see a video tutorial of the new ROI format.

In addition to mask data, a Mango ROI may store the vector information of ROI lines and points. This information is stored between the header and image parts of the file according to the NIFTI specification for extension data. The extension code to identify Mango ROI extension data is TBD. These data follow the below specification:


Data are stored in 5 sections: points, axial lines, coronal lines, sagittal lines, and labels. Each section is preceded by a 4-byte size header indicating the number of bytes to follow in that section. Byte order of size fields will match original image byte order. Byte order of stored data is always big endian. If a section contains no data, the size header will still be stored and will contain zero. No extension data is stored if none of the 5 sections contain any data.

Points

Size of section (4 bytes)
Loop for each point
  Identifier (magic number = -9998) (2 bytes)
  ROI color (0 to 7) (2 bytes)
  X (2 bytes)
  Y (2 bytes)
  Z (2 bytes)
End loop

Lines (three sections in this order: axial, coronal, sagittal)

Size of section (4 bytes)
Loop for each line
  Identifier (magic number = -9999) (2 bytes)
  Slice number (2 bytes)
  ROI color (lower byte, 0 to 7) and closed shape flag (upper byte, 0 or 1) (2 bytes)
  Loop for each point
    X (2 bytes)
    Y (2 bytes)
  End loop
End loop

Labels

Size of section (4 bytes)
Vector<String> object data