Package: nima_io
NImA-ioThis is a helper library designed for reading microscopy data supported byBioformatsusing Python. The
package also includes a command-line interface for assessing differences between
images.Version: "0.3.4"InstallationYou can get the library directly fromPyPIusingpip:pip install nima_ioAlternatively, you can usepipxto install it in
an isolated environment:pipx install nima_ioTo enable auto completion for theclicommand, follow these steps:Generate the completion script by running the following command:_IMGDIFF_COMPLETE=bash_source imgdiff > ~/.local/bin/imgdiff-complete.bashSource the generated completion script to enable auto completion:source ~/.local/bin/imgdiff-complete.bashUsageYou can check out the documentation onhttps://darosio.github.io/nima_iofor
up to date usage information and examples.CLIii provides several command line interface tools for …imgdiff --helpPythonii can be imported and used as a Python package. The following modules are
available:nima_io.read - TODO DESCRIBETo use nima_io in your python:from nima_io import readFeatures / DescriptionDespite 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:Utilizing the external "showinf" and parsing the generated XML metadata.Employing out-of-the-box python-bioformats.Leveraging bioformats through the Java API.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.LicenseWe use a shared copyright model that enables all contributors to maintain the
copyright on their contributions.All code is licensed under the terms of therevised BSD license.ContributingIf you are interested in contributing to the project, please read ourcontributinganddevelopment environmentguides, which outline the guidelines and conventions that we follow for
contributing code, documentation, and other resources.DevelopmentTo begin development, follow these steps:Create an .envrc file with the command:echo "layout hatch" > .envrc
direnv allowUpdate and initialize submodules:git submodule update --init --recursiveNavigate to the tests/data/ directory:cd tests/data/
git co masterConfigure Git Annex for SSH caching:git config annex.sshcaching truePull the necessary files using Git Annex:git annex pullThese 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.shNoteThis project was initialized using theCookiecutter Python
template.