{"id":19671202,"url":"https://github.com/cgohlke/roifile","last_synced_at":"2026-01-21T06:43:52.934Z","repository":{"id":50530351,"uuid":"242398547","full_name":"cgohlke/roifile","owner":"cgohlke","description":"Read and write ImageJ ROI format.","archived":false,"fork":false,"pushed_at":"2025-05-10T19:40:48.000Z","size":250,"stargazers_count":82,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-27T19:55:21.459Z","etag":null,"topics":["format-reader","imagej","python","region-of-interest"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/roifile","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgohlke.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-22T19:22:04.000Z","updated_at":"2025-11-06T16:03:24.000Z","dependencies_parsed_at":"2022-09-10T05:50:32.248Z","dependency_job_id":"77f49871-3e2b-4e06-9f6c-c42f3ea0f5d7","html_url":"https://github.com/cgohlke/roifile","commit_stats":{"total_commits":69,"total_committers":2,"mean_commits":34.5,"dds":"0.49275362318840576","last_synced_commit":"c966c36777d4974a93257f03e49046d4b300e1a8"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/cgohlke/roifile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Froifile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Froifile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Froifile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Froifile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgohlke","download_url":"https://codeload.github.com/cgohlke/roifile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Froifile/sbom","scorecard":{"id":272526,"data":{"date":"2025-08-11","repo":{"name":"github.com/cgohlke/roifile","commit":"13cb6a1e5ca156825405f00e44648df749874db6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2025.5.10 not signed: https://api.github.com/repos/cgohlke/roifile/releases/217799099","Warn: release artifact v2025.2.20 not signed: https://api.github.com/repos/cgohlke/roifile/releases/201490309","Warn: release artifact v2024.9.15 not signed: https://api.github.com/repos/cgohlke/roifile/releases/175128992","Warn: release artifact v2024.5.24 not signed: https://api.github.com/repos/cgohlke/roifile/releases/157195799","Warn: release artifact v2024.3.20 not signed: https://api.github.com/repos/cgohlke/roifile/releases/147531290","Warn: release artifact v2025.5.10 does not have provenance: https://api.github.com/repos/cgohlke/roifile/releases/217799099","Warn: release artifact v2025.2.20 does not have provenance: https://api.github.com/repos/cgohlke/roifile/releases/201490309","Warn: release artifact v2024.9.15 does not have provenance: https://api.github.com/repos/cgohlke/roifile/releases/175128992","Warn: release artifact v2024.5.24 does not have provenance: https://api.github.com/repos/cgohlke/roifile/releases/157195799","Warn: release artifact v2024.3.20 does not have provenance: https://api.github.com/repos/cgohlke/roifile/releases/147531290"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T13:44:13.039Z","repository_id":50530351,"created_at":"2025-08-17T13:44:13.039Z","updated_at":"2025-08-17T13:44:13.039Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28628838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["format-reader","imagej","python","region-of-interest"],"created_at":"2024-11-11T17:08:07.554Z","updated_at":"2026-01-21T06:43:52.916Z","avatar_url":"https://github.com/cgohlke.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"..\n  This file is generated by setup.py\n\nRead and write ImageJ ROI format\n================================\n\nRoifile is a Python library to read, write, create, and plot `ImageJ`_ ROIs,\nan undocumented and ImageJ application specific format to store regions of\ninterest, geometric shapes, paths, text, and whatnot for image overlays.\n\n.. _ImageJ: https://imagej.net\n\n:Author: `Christoph Gohlke \u003chttps://www.cgohlke.com\u003e`_\n:License: BSD-3-Clause\n:Version: 2026.1.8\n:DOI: `10.5281/zenodo.6941603 \u003chttps://doi.org/10.5281/zenodo.6941603\u003e`_\n\nQuickstart\n----------\n\nInstall the roifile package and all dependencies from the\n`Python Package Index \u003chttps://pypi.org/project/roifile/\u003e`_::\n\n    python -m pip install -U \"roifile[all]\"\n\nView overlays stored in a ROI, ZIP, or TIFF file::\n\n    python -m roifile file.roi\n\nSee `Examples`_ for using the programming interface.\n\nSource code, examples, and support are available on\n`GitHub \u003chttps://github.com/cgohlke/roifile\u003e`_.\n\nRequirements\n------------\n\nThis revision was tested with the following requirements and dependencies\n(other versions may work):\n\n- `CPython \u003chttps://www.python.org\u003e`_ 3.11.9, 3.12.10, 3.13.11, 3.14.2 64-bit\n- `NumPy \u003chttps://pypi.org/project/numpy\u003e`_ 2.4.0\n- `Tifffile \u003chttps://pypi.org/project/tifffile/\u003e`_ 2025.12.20 (optional)\n- `Matplotlib \u003chttps://pypi.org/project/matplotlib/\u003e`_ 3.10.8 (optional)\n\nRevisions\n---------\n\n2026.1.8\n\n- Improve code quality.\n- Drop support for Python 3.10.\n\n2025.12.12\n\n- Move tests to separate module.\n\n2025.5.10\n\n- Support Python 3.14.\n\n2025.2.20\n\n- Drop support for Python 3.9.\n\n2024.9.15\n\n- …\n\nRefer to the CHANGES file for older revisions.\n\nNotes\n-----\n\nThe ImageJ ROI format cannot store integer coordinate values outside the\nrange of -5000..60536.\n\nRefer to the ImageJ `RoiDecoder.java\n\u003chttps://github.com/imagej/ImageJ/blob/master/ij/io/RoiDecoder.java\u003e`_\nsource code for a reference implementation.\n\nOther Python packages handling ImageJ ROIs:\n\n- `ijpython_roi \u003chttps://github.com/dwaithe/ijpython_roi\u003e`_\n- `read-roi \u003chttps://github.com/hadim/read-roi/\u003e`_\n- `napari_jroitools \u003chttps://github.com/jayunruh/napari_jroitools\u003e`_\n\nExamples\n--------\n\nCreate a new ImagejRoi instance from an array of x, y coordinates:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e roi = ImagejRoi.frompoints([[1.1, 2.2], [3.3, 4.4], [5.5, 6.6]])\n    \u003e\u003e\u003e roi.roitype = ROI_TYPE.POINT\n    \u003e\u003e\u003e roi.options |= ROI_OPTIONS.SHOW_LABELS\n\nExport the instance to an ImageJ ROI formatted byte string or file:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e out = roi.tobytes()\n    \u003e\u003e\u003e out[:4]\n    b'Iout'\n    \u003e\u003e\u003e roi.tofile('_test.roi')\n\nRead the ImageJ ROI from the file and verify the content:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e roi2 = ImagejRoi.fromfile('_test.roi')\n    \u003e\u003e\u003e roi2 == roi\n    True\n    \u003e\u003e\u003e roi.roitype == ROI_TYPE.POINT\n    True\n    \u003e\u003e\u003e roi.subpixelresolution\n    True\n    \u003e\u003e\u003e roi.coordinates()\n    array([[1.1, 2.2],\n           [3.3, 4.4],\n           [5.5, 6.6]], dtype=float32)\n    \u003e\u003e\u003e roi.left, roi.top, roi.right, roi.bottom\n    (1, 2, 7, 8)\n    \u003e\u003e\u003e roi2.name = 'test'\n\nPlot the ROI using matplotlib:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e roi.plot()\n\nWrite the ROIs to a ZIP file:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e roiwrite('_test.zip', [roi, roi2], mode='w')\n\nRead the ROIs from the ZIP file:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e rois = roiread('_test.zip')\n    \u003e\u003e\u003e assert len(rois) == 2 and rois[0] == roi and rois[1].name == 'test'\n\nWrite the ROIs to an ImageJ formatted TIFF file:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import numpy\n    \u003e\u003e\u003e import tifffile\n    \u003e\u003e\u003e tifffile.imwrite(\n    ...     '_test.tif',\n    ...     numpy.zeros((9, 9), 'u1'),\n    ...     imagej=True,\n    ...     metadata={'Overlays': [roi.tobytes(), roi2.tobytes()]},\n    ... )\n\nRead the ROIs embedded in an ImageJ formatted TIFF file:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e rois = roiread('_test.tif')\n    \u003e\u003e\u003e assert len(rois) == 2 and rois[0] == roi and rois[1].name == 'test'\n\nView the overlays stored in a ROI, ZIP, or TIFF file from a command line::\n\n    python -m roifile _test.roi\n\nFor an advanced example, see `roifile_demo.py` in the source distribution.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgohlke%2Froifile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgohlke%2Froifile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgohlke%2Froifile/lists"}