nima_io


Namenima_io JSON
Version 0.3.8 PyPI version JSON
download
home_pageNone
SummaryA project to read microscopy files.
upload_time2024-04-10 14:09:17
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.10
licenseNone
keywords bioimage image analysis metadata open microscopy tiled images
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NImA-io

[![PyPI](https://img.shields.io/pypi/v/nima_io.svg)](https://pypi.org/project/nima_io/)
[![CI](https://github.com/darosio/nima_io/actions/workflows/ci.yml/badge.svg)](https://github.com/darosio/nima_io/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/darosio/nima_io/branch/main/graph/badge.svg?token=OU6F9VFUQ6)](https://codecov.io/gh/darosio/nima_io)
[![RtD](https://readthedocs.org/projects/nima_io/badge/?version=latest)](https://nima-io.readthedocs.io/en/latest/?badge=latest)

<!-- [![RtD](https://readthedocs.org/projects/nima_io/badge/)](https://nima_io.readthedocs.io/) -->

This is a helper library designed for reading microscopy data supported by
[Bioformats](https://www.openmicroscopy.org/bio-formats/) using Python. The
package also includes a command-line interface for assessing differences between
images.

- Version: "0.3.8"

## Installation

You can get the library directly from [PyPI](https://pypi.org/project/nima_io/)
using `pip`:

    pip install nima_io

Alternatively, you can use [pipx](https://pypa.github.io/pipx/) to install it in
an isolated environment:

    pipx install nima_io

To enable auto completion for the `cli` command, follow these steps:

1.  Generate the completion script by running the following command:

        _IMGDIFF_COMPLETE=bash_source imgdiff > ~/.local/bin/imgdiff-complete.bash

2.  Source the generated completion script to enable auto completion:

        source ~/.local/bin/imgdiff-complete.bash

## Usage

You can check out the documentation on <https://darosio.github.io/nima_io> for
up to date usage information and examples.

### CLI

ii provides several command line interface tools for …

    imgdiff --help

### Python

ii can be imported and used as a Python package. The following modules are
available:

    nima_io.read - TODO DESCRIBE

To use nima_io in your python:

    from nima_io import read

## Features / Description

Despite the comprehensive python-bioformats package, Bioformats reading in
Python is not flawless. To assess correct reading and performance, I gathered a
set of test input files from real working data and established various
approaches for reading them:

1. Utilizing the external "showinf" and parsing the generated XML metadata.
2. Employing out-of-the-box python-bioformats.
3. Leveraging bioformats through the Java API.
4. Combining python-bioformats with Java for metadata (Download link: bio-formats 5.9.2).

At present, Solution No. 4 appears to be the most effective.

It's important to note that FEI files are not 100% OME compliant, and
understanding OME metadata can be challenging. For instance, metadata.getXXX is
sometimes equivalent to
metadata.getRoot().getImage(i).getPixels().getPlane(index).

The use of parametrized tests enhances clarity and consistency. The approach of
returning a wrapper to a Bioformats reader enables memory-mapped (a la memmap)
operations.

Notebooks are included in the documentation tutorials to aid development and
illustrate usage. Although there was an initial exploration of the TileStitch
Java class, the decision was made to implement TileStitcher in Python.

Future improvements can be implemented in the code, particularly for the
multichannel OME standard example, which currently lacks obj or resolutionX
metadata. Additionally, support for various instrument, experiment, or plate
metadata can be considered in future updates.

## License

We use a shared copyright model that enables all contributors to maintain the
copyright on their contributions.

All code is licensed under the terms of the [revised BSD license](LICENSE.txt).

## Contributing

If you are interested in contributing to the project, please read our
[contributing](https://darosio.github.io/nima_io/references/contributing.html)
and
[development environment](https://darosio.github.io/nima_io/references/development.html)
guides, which outline the guidelines and conventions that we follow for
contributing code, documentation, and other resources.

### Development

To begin development, follow these steps:

Create an .envrc file with the command:

    echo "layout hatch" > .envrc
    direnv allow

Update and initialize submodules:

    git submodule update --init --recursive

Navigate to the tests/data/ directory:

    cd tests/data/
    git co master

Configure Git Annex for SSH caching:

    git config annex.sshcaching true

Pull the necessary files using Git Annex:

    git annex pull

These commands set up the development environment and fetch the required data for testing.

Modify tests/data.filenames.txt and tests/data.filenames.md5 as needed and run:

    cd tests
    ./data.filenames.sh

### Note

This project was initialized using the [Cookiecutter Python
template](https://github.com/darosio/cookiecutter-python).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nima_io",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "Bioimage, Image Analysis, Metadata, Open Microscopy, Tiled Images",
    "author": null,
    "author_email": "Daniele Arosio <darosio@duck.com>",
    "download_url": "https://files.pythonhosted.org/packages/9f/b5/5b816e57ed52fdda3e199eb4d55c18f1b4b9ecde4d1d6133a05629474ee6/nima_io-0.3.8.tar.gz",
    "platform": null,
    "description": "# NImA-io\n\n[![PyPI](https://img.shields.io/pypi/v/nima_io.svg)](https://pypi.org/project/nima_io/)\n[![CI](https://github.com/darosio/nima_io/actions/workflows/ci.yml/badge.svg)](https://github.com/darosio/nima_io/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/darosio/nima_io/branch/main/graph/badge.svg?token=OU6F9VFUQ6)](https://codecov.io/gh/darosio/nima_io)\n[![RtD](https://readthedocs.org/projects/nima_io/badge/?version=latest)](https://nima-io.readthedocs.io/en/latest/?badge=latest)\n\n<!-- [![RtD](https://readthedocs.org/projects/nima_io/badge/)](https://nima_io.readthedocs.io/) -->\n\nThis is a helper library designed for reading microscopy data supported by\n[Bioformats](https://www.openmicroscopy.org/bio-formats/) using Python. The\npackage also includes a command-line interface for assessing differences between\nimages.\n\n- Version: \"0.3.8\"\n\n## Installation\n\nYou can get the library directly from [PyPI](https://pypi.org/project/nima_io/)\nusing `pip`:\n\n    pip install nima_io\n\nAlternatively, you can use [pipx](https://pypa.github.io/pipx/) to install it in\nan isolated environment:\n\n    pipx install nima_io\n\nTo enable auto completion for the `cli` command, follow these steps:\n\n1.  Generate the completion script by running the following command:\n\n        _IMGDIFF_COMPLETE=bash_source imgdiff > ~/.local/bin/imgdiff-complete.bash\n\n2.  Source the generated completion script to enable auto completion:\n\n        source ~/.local/bin/imgdiff-complete.bash\n\n## Usage\n\nYou can check out the documentation on <https://darosio.github.io/nima_io> for\nup to date usage information and examples.\n\n### CLI\n\nii provides several command line interface tools for \u2026\n\n    imgdiff --help\n\n### Python\n\nii can be imported and used as a Python package. The following modules are\navailable:\n\n    nima_io.read - TODO DESCRIBE\n\nTo use nima_io in your python:\n\n    from nima_io import read\n\n## Features / Description\n\nDespite the comprehensive python-bioformats package, Bioformats reading in\nPython is not flawless. To assess correct reading and performance, I gathered a\nset of test input files from real working data and established various\napproaches for reading them:\n\n1. Utilizing the external \"showinf\" and parsing the generated XML metadata.\n2. Employing out-of-the-box python-bioformats.\n3. Leveraging bioformats through the Java API.\n4. Combining python-bioformats with Java for metadata (Download link: bio-formats 5.9.2).\n\nAt present, Solution No. 4 appears to be the most effective.\n\nIt's important to note that FEI files are not 100% OME compliant, and\nunderstanding OME metadata can be challenging. For instance, metadata.getXXX is\nsometimes equivalent to\nmetadata.getRoot().getImage(i).getPixels().getPlane(index).\n\nThe use of parametrized tests enhances clarity and consistency. The approach of\nreturning a wrapper to a Bioformats reader enables memory-mapped (a la memmap)\noperations.\n\nNotebooks are included in the documentation tutorials to aid development and\nillustrate usage. Although there was an initial exploration of the TileStitch\nJava class, the decision was made to implement TileStitcher in Python.\n\nFuture improvements can be implemented in the code, particularly for the\nmultichannel OME standard example, which currently lacks obj or resolutionX\nmetadata. Additionally, support for various instrument, experiment, or plate\nmetadata can be considered in future updates.\n\n## License\n\nWe use a shared copyright model that enables all contributors to maintain the\ncopyright on their contributions.\n\nAll code is licensed under the terms of the [revised BSD license](LICENSE.txt).\n\n## Contributing\n\nIf you are interested in contributing to the project, please read our\n[contributing](https://darosio.github.io/nima_io/references/contributing.html)\nand\n[development environment](https://darosio.github.io/nima_io/references/development.html)\nguides, which outline the guidelines and conventions that we follow for\ncontributing code, documentation, and other resources.\n\n### Development\n\nTo begin development, follow these steps:\n\nCreate an .envrc file with the command:\n\n    echo \"layout hatch\" > .envrc\n    direnv allow\n\nUpdate and initialize submodules:\n\n    git submodule update --init --recursive\n\nNavigate to the tests/data/ directory:\n\n    cd tests/data/\n    git co master\n\nConfigure Git Annex for SSH caching:\n\n    git config annex.sshcaching true\n\nPull the necessary files using Git Annex:\n\n    git annex pull\n\nThese commands set up the development environment and fetch the required data for testing.\n\nModify tests/data.filenames.txt and tests/data.filenames.md5 as needed and run:\n\n    cd tests\n    ./data.filenames.sh\n\n### Note\n\nThis project was initialized using the [Cookiecutter Python\ntemplate](https://github.com/darosio/cookiecutter-python).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A project to read microscopy files.",
    "version": "0.3.8",
    "project_urls": {
        "Bug Tracker": "https://github.com/darosio/nima_io/issues",
        "Changelog": "https://github.com/darosio/nima_io/blob/main/CHANGELOG.md",
        "Documentation": "https://nima-io.readthedocs.io",
        "Github releases": "https://github.com/darosio/nima_io/releases",
        "Homepage": "https://github.com/darosio/nima_io"
    },
    "split_keywords": [
        "bioimage",
        " image analysis",
        " metadata",
        " open microscopy",
        " tiled images"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2fabb9f571db8b5b79154e8b22a08e2ea3d72944d2d5ed6981ceb0d0db587c4d",
                "md5": "0e1be503a1af0c289e7a289632ef5b73",
                "sha256": "5d22e25d5cf8425fb7250c76daf842aa442386c7b7b7343756a420fd19905653"
            },
            "downloads": -1,
            "filename": "nima_io-0.3.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0e1be503a1af0c289e7a289632ef5b73",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 14561,
            "upload_time": "2024-04-10T14:09:18",
            "upload_time_iso_8601": "2024-04-10T14:09:18.591683Z",
            "url": "https://files.pythonhosted.org/packages/2f/ab/b9f571db8b5b79154e8b22a08e2ea3d72944d2d5ed6981ceb0d0db587c4d/nima_io-0.3.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9fb55b816e57ed52fdda3e199eb4d55c18f1b4b9ecde4d1d6133a05629474ee6",
                "md5": "3c22064d4fecc188b5046a0f518b81f9",
                "sha256": "3f066b6b7be323cf91d51d8ee16cc4bb794c0c86ccfe6b20f9aaf2becca3665b"
            },
            "downloads": -1,
            "filename": "nima_io-0.3.8.tar.gz",
            "has_sig": false,
            "md5_digest": "3c22064d4fecc188b5046a0f518b81f9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 40894,
            "upload_time": "2024-04-10T14:09:17",
            "upload_time_iso_8601": "2024-04-10T14:09:17.268390Z",
            "url": "https://files.pythonhosted.org/packages/9f/b5/5b816e57ed52fdda3e199eb4d55c18f1b4b9ecde4d1d6133a05629474ee6/nima_io-0.3.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-10 14:09:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "darosio",
    "github_project": "nima_io",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nima_io"
}
        
Elapsed time: 0.22555s