Organization of .roi files

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)

FieldMeaning
schemaName, versionIdentify the current UMIT_ROI format and its validation rules.
createdOn, modifiedOnCreation and last-change times.
imageInfoSource filename, optional UMT entry name, Y-X image size, and pixel coordinate system.
viewImage origin and optional pixels-per-millimetre calibration.
statsImageOptional displayed image used to calculate saved statistics, with frame/event view context.
ROIsStructure array containing one record per ROI.

Each ROI entry

Field/groupMeaning
name, type, color, notesUnique display name, rectangle/ellipse/polygon/polyshape type, RGB color, and optional notes.
DOC, modifiedOnDate of creation and most recent change.
geometryThe polyshape, X-Y vertices, original ROI type, and type-specific parameters needed to reconstruct the editable shape.
maskY-X pixel mask. Its size must match imageInfo.imageSizeYX.
statsPixel 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.


Back to top

Copyright © LabeoTech 2023. This work is licensed under the GNU General Public License, Version 3.0.