https://github.com/cgohlke/oiffile

Read Olympus image files (OIF and OIB).

https://github.com/cgohlke/oiffile

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.6%) to scientific vocabulary

Keywords

fluorescence-microscopy-imaging format-reader image life-sciences-image olympus python
Last synced: 5 months ago · JSON representation

Repository

Read Olympus image files (OIF and OIB).

Basic Info
Statistics
  • Stars: 13
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
fluorescence-microscopy-imaging format-reader image life-sciences-image olympus python
Created almost 6 years ago · Last pushed 10 months ago
Metadata Files
Readme License

README.rst

..
  This file is generated by setup.py

Read Olympus image files (OIF and OIB)
======================================

Oiffile is a Python library to read image and metadata from Olympus Image
Format files. OIF is the native file format of the Olympus FluoView(tm)
software for confocal microscopy.

There are two variants of the format:

- OIF (Olympus Image File) is a multi-file format that includes a main setting
  file (.oif) and an associated directory with data and setting files (.tif,
  .bmp, .txt, .pty, .roi, and .lut).

- OIB (Olympus Image Binary) is a compound document file, storing OIF and
  associated files within a single file.

:Author: `Christoph Gohlke `_
:License: BSD-3-Clause
:Version: 2025.5.10

Quickstart
----------

Install the oiffile package and all dependencies from the
`Python Package Index `_::

    python -m pip install -U "oiffile[all]"

View image and metadata stored in an OIF or OIB file::

    python -m oiffile file.oif

See `Examples`_ for using the programming interface.

Source code and support are available on
`GitHub `_.

Requirements
------------

This revision was tested with the following requirements and dependencies
(other versions may work):

- `CPython `_ 3.10.11, 3.11.9, 3.12.10, 3.13.3 64-bit
- `NumPy `_ 2.2.5
- `Tifffile `_ 2025.5.10

Revisions
---------

2025.5.10

- Remove doctest command line option.
- Support Python 3.14.

2025.1.1

- Improve type hints.
- Drop support for Python 3.9, support Python 3.13.

2024.5.24

- Support NumPy 2.
- Fix docstring examples not correctly rendered on GitHub.

2023.8.30

- Fix linting issues.
- Add py.typed marker.
- Drop support for Python 3.8 and numpy < 1.22 (NEP29).

2022.9.29

- Switch to Google style docstrings.

2022.2.2

- Add type hints.
- Add main function.
- Add FileSystemAbc abstract base class.
- Remove OifFile.tiffs (breaking).
- Drop support for Python 3.7 and numpy < 1.19 (NEP29).

2021.6.6

- Fix unclosed file warnings.

2020.9.18

- Remove support for Python 3.6 (NEP 29).
- Support os.PathLike file names.
- Fix unclosed files.

2020.1.18

- Fix indentation error.

2020.1.1

- Support multiple image series.
- Parse shape and dtype from settings file.
- Remove support for Python 2.7 and 3.5.
- Update copyright.

Notes
-----

No specification document is available.

Tested only with files produced on Olympus FV1000 hardware.

Examples
--------

Read the image from an OIB file as numpy array:

.. code-block:: python

    >>> image = imread('test.oib')
    >>> image.shape
    (3, 256, 256)
    >>> image[:, 95, 216]
    array([820,  50, 436], dtype=uint16)

Read the image from a single TIFF file in an OIB file:

.. code-block:: python

    >>> from tifffile import natural_sorted
    >>> with OifFile('test.oib') as oib:
    ...     filename = natural_sorted(oib.glob('*.tif'))[0]
    ...     image = oib.asarray(filename)
    ...
    >>> filename
    'Storage00001/s_C001.tif'
    >>> print(image[95, 216])
    820

Access metadata and the OIB main file:

.. code-block:: python

    >>> with OifFile('test.oib') as oib:
    ...     oib.axes
    ...     oib.shape
    ...     oib.dtype
    ...     dataname = oib.mainfile['File Info']['DataName']
    ...
    'CYX'
    (3, 256, 256)
    dtype('uint16')
    >>> dataname
    'Cell 1 mitoEGFP.oib'

Extract the OIB file content to an OIF file and associated data directory:

.. code-block:: python

    >>> import tempfile
    >>> tempdir = tempfile.mkdtemp()
    >>> oib2oif('test.oib', location=tempdir)
    Saving ... done.

Read the image from the extracted OIF file:

.. code-block:: python

    >>> image = imread(f'{tempdir}/{dataname[:-4]}.oif')
    >>> image[:, 95, 216]
    array([820,  50, 436], dtype=uint16)

Read OLE compound file and access the 'OibInfo.txt' settings file:

.. code-block:: python

    >>> with CompoundFile('test.oib') as com:
    ...     info = com.open_file('OibInfo.txt')
    ...     len(com.files())
    ...
    14
    >>> info = SettingsFile(info, 'OibInfo.txt')
    >>> info['OibSaveInfo']['Version']
    '2.0.0.0'

Owner

  • Name: Christoph Gohlke
  • Login: cgohlke
  • Kind: user
  • Location: Irvine, California

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
  • Push event: 2
  • Create event: 2
Last Year
  • Issues event: 1
  • Watch event: 1
  • Push event: 2
  • Create event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 62
  • Total Committers: 1
  • Avg Commits per committer: 62.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 12
  • Committers: 1
  • Avg Commits per committer: 12.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Christoph Gohlke c****e@u****u 62
Committer Domains (Top 20 + Academic)
uci.edu: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 0
  • Average time to close issues: 11 months
  • Average time to close pull requests: N/A
  • Total issue authors: 3
  • Total pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • LibbyLi667 (1)
  • dkermany (1)
  • Czaki (1)
Pull Request Authors
Top Labels
Issue Labels
question (2)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 2,779 last-month
  • Total dependent packages: 6
    (may contain duplicates)
  • Total dependent repositories: 4
    (may contain duplicates)
  • Total versions: 18
  • Total maintainers: 1
pypi.org: oiffile

Read Olympus image files (OIF and OIB)

  • Versions: 13
  • Dependent Packages: 4
  • Dependent Repositories: 3
  • Downloads: 2,768 Last month
Rankings
Dependent packages count: 2.3%
Downloads: 5.7%
Dependent repos count: 9.0%
Average: 11.6%
Stargazers count: 18.5%
Forks count: 22.6%
Maintainers (1)
Last synced: 6 months ago
pypi.org: napari-oiffile

A napari plugin for reading files via oiffile

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 11 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 17.7%
Dependent repos count: 21.7%
Forks count: 22.6%
Average: 31.3%
Downloads: 84.3%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: oiffile

Oiffile is a Python library to read image and metadata from Olympus Image Format files. OIF is the native file format of the Olympus FluoView(tm) software for confocal microscopy.

  • Versions: 3
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent packages count: 19.5%
Dependent repos count: 34.0%
Average: 41.4%
Stargazers count: 54.5%
Forks count: 57.4%
Last synced: 6 months ago

Dependencies

setup.py pypi
  • numpy >=1.19.2
  • tifffile >=2021.11.2
pyproject.toml pypi