Organization of .roi files
A .roi file saves regions of interest created or loaded in DataViewer. It contains ROI geometry, masks, names, colors, measurements, and enough image context to validate or scale the regions when they are loaded again.
Top-level structure (version 1)
| Field | Meaning |
|---|---|
| schemaName, version | Identify the current UMIT_ROI format and its validation rules. |
| createdOn, modifiedOn | Creation and last-change times. |
| imageInfo | Source filename, optional UMT entry name, Y-X image size, and pixel coordinate system. |
| view | Image origin and optional pixels-per-millimetre calibration. |
| statsImage | Optional displayed image used to calculate saved statistics, with frame/event view context. |
| ROIs | Structure array containing one record per ROI. |
Each ROI entry
| Field/group | Meaning |
|---|---|
| name, type, color, notes | Unique display name, rectangle/ellipse/polygon/polyshape type, RGB color, and optional notes. |
| DOC, modifiedOn | Date of creation and most recent change. |
| geometry | The polyshape, X-Y vertices, original ROI type, and type-specific parameters needed to reconstruct the editable shape. |
| mask | Y-X pixel mask. Its size must match imageInfo.imageSizeYX. |
| stats | Pixel count, area, centroid, distance from origin, and spatial mean/standard deviation/median/minimum/maximum calculated from the saved statistics image. |
Save and load
Use the Save and Load controls in the DataViewer ROIs tab. Loading can replace the current ROI list or append to it. If image sizes differ, the app presents the supported compatibility/scaling choice and then rebuilds the ROI identities.
For MATLAB workflows, use createROIFile, createROIEntry, saveROIFile, loadROIFile, and validateROIFile. Direct field editing can leave geometry, masks, and statistics inconsistent.
Older ROI files may need migration
Version 1 validation does not treat an unversioned previous-release ROI structure as current. Use the controlled load/migration path rather than renaming or hand-editing fields.
See ROI management for drawing, editing, Boolean operations, Allen Atlas placement, and export.