roifile
Read and write ImageJ ROI format
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a specific and well-defined problem for anyone working with ImageJ ROI files in Python. The permissive BSD-3-Clause license poses no restrictions. Install it if you need to read, write, or manipulate ImageJ annotations programmatically.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.12 or later; numpy must be installed as a runtime dependency.
- Low install friction with a single runtime dependency (numpy).
- Active maintenance with a release 15 days old; the package has been in development since 2020 and currently supports Python 3.12–3.15.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2026-07-30 (15 days) · last repo commit 2026-07-30 · 89 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 119,765 downloads/mo, #12,056 on PyPI
Alternatives
Verify before relying
pip install roifile
from roifile import ImagejRoi
roi = ImagejRoi.frompoints([[1.1, 2.2], [3.3, 4.4]])
roi.tofile('output.roi')
roi_read = ImagejRoi.fromfile('output.roi')
print(roi_read.coordinates())- Whether optional dependencies (tifffile, imagecodecs, matplotlib) are required for specific use cases or fully optional
- Performance characteristics when handling large ROI collections or complex geometric shapes
What it is and what it does
Roifile is a Python library for working with ImageJ ROI files, an undocumented format used by ImageJ to store regions of interest, geometric shapes, paths, and text annotations for image overlays. It lets you read ROI data from .roi files, ZIP archives, or embedded in TIFF metadata; create new ROI objects programmatically from coordinate arrays; modify ROI properties like type, size, and labels; and write the results back to disk or TIFF files. The package depends only on numpy at runtime, with optional support for tifffile (to embed ROIs in TIFF files), imagecodecs (for certain image types), and matplotlib (for plotting overlays).
The library is designed for scientific and image-analysis workflows where you need to programmatically manipulate or batch-process ImageJ annotations. It includes a command-line viewer to inspect ROI files and full round-trip support—you can read a ROI, modify it, and write it back with the same format and properties preserved. The format itself has limitations: integer coordinates are constrained to the range -5000..60536, and the implementation follows ImageJ's Java reference implementation for compatibility.
Use it for
- Batch convert or migrate ImageJ ROI annotations between .roi, ZIP, and TIFF formats
- Programmatically create geometric annotations (points, polygons, paths) and embed them in TIFF images for ImageJ
- Read and modify ROI metadata (names, types, display properties) in automated image-processing pipelines
- Extract coordinate data from ImageJ overlays for downstream analysis or visualization in other tools
- View and inspect ROI file contents from the command line without opening ImageJ
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a specific and well-defined problem for anyone working with ImageJ ROI files in Python. The permissive BSD-3-Clause license poses no restrictions. Install it if you need to read, write, or manipulate ImageJ annotations programmatically.
Install
roifile on PyPI
Before you install
Low install friction with a single runtime dependency (numpy). Active maintenance with a release 15 days old; the package has been in development since 2020 and currently supports Python 3.12–3.15.
Requires Python 3.12 or later; numpy must be installed as a runtime dependency.
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install roifile
from roifile import ImagejRoi
roi = ImagejRoi.frompoints([[1.1, 2.2], [3.3, 4.4]])
roi.tofile('output.roi')
roi_read = ImagejRoi.fromfile('output.roi')
print(roi_read.coordinates())
Verify before relying
- Whether optional dependencies (tifffile, imagecodecs, matplotlib) are required for specific use cases or fully optional
- Performance characteristics when handling large ROI collections or complex geometric shapes
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 119,765 / month, #12,056 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15 |
Evidence: roifile-2026.7.30-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “imagej roi format reader”
- roifileRead, write, create, and plot ImageJ ROI format files, which store…
- google-meridianMeridian is a Bayesian marketing mix modeling (MMM) framework that…
- mcap-protobuf-supportAdds protobuf message deserialization support to the Python MCAP file…
Give your agent the search over MCP, or paste the wish link into any chat.
More Graphics packages
Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.
Install it if you need to work with images in Python—it is the de facto standard for this task.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.
PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.
The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.
pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.
Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.
Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.
See also tifffile · ImageIO · large-image · fabio · cellpose · spatial_image · imagesize · PIMS