https://github.com/wimpomp/ndbioimage
Bio image reading, metadata and some affine registration.
Science Score: 39.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
Found 1 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.1%) to scientific vocabulary
Repository
Bio image reading, metadata and some affine registration.
Basic Info
- Host: GitHub
- Owner: wimpomp
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Size: 35 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
ndbioimage
Exposes (bio) images as a numpy ndarray-like object, but without loading the whole image into memory, reading from the file only when needed. Some metadata is read and stored in an ome structure. Additionally, it can automatically calculate an affine transform that corrects for chromatic aberrations etc. and apply it on the fly to the image.
Currently, it supports imagej tif files, czi files, micromanager tif sequences and anything bioformats can handle.
Installation
One of:
pip install ndbioimage
pip install ndbioimage[bioformats]
pip install ndbioimage[write]
pip install ndbioimage[bioformats, write]
- bioformats: use bio-formats as fallback when other readers cannot open a file.
- write: write an image file into a mp4 or mkv file. Work in progress! Make sure ffmpeg is installed.
Usage
Python
- Reading an image file and plotting the frame at channel=2, time=1
import matplotlib.pyplot as plt
from ndbioimage import Imread
with Imread('image_file.tif', axes='ctyx', dtype=int) as im:
plt.imshow(im[2, 1])
- Showing some image metadata
from ndbioimage import Imread
from pprint import pprint
with Imread('image_file.tif') as im:
pprint(im)
- Slicing the image without loading the image into memory
from ndbioimage import Imread
with Imread('image_file.tif', axes='cztyx') as im:
sliced_im = im[1, :, :, 100:200, 100:200]
sliced_im is an instance of Imread which will load any image data from file only when needed
- Converting (part) of the image to a numpy ndarray
from ndbioimage import Imread
import numpy as np
with Imread('image_file.tif', axes='cztyx') as im:
array = np.asarray(im[0, 0])
Command line
ndbioimage --help: show help
ndbioimage image: show metadata about image
ndbioimage image -w {name}.tif -r: copy image into image.tif (replacing {name} with image), while registering channels
ndbioimage image -w image.mp4 -C cyan lime red copy image into image.mp4 (z will be max projected), make channel colors cyan lime and red
Adding more formats
Readers for image formats subclass AbstractReader. When an image reader is imported, Imread will automatically recognize it and use it to open the appropriate file format. Image readers are required to implement the following methods:
- staticmethod canopen(path): return True if path can be opened by this reader
- __frame__(self, c, z, t): return the frame at channel=c, z-slice=z, time=t from the file
Optional methods: - get_ome: reads metadata from file and adds them to an OME object imported from the ome-types library - open(self): maybe open some file handle - close(self): close any file handles
Optional fields: - priority (int): Imread will try readers with a lower number first, default: 99 - donotpickle (strings): any attributes that should not be included when the object is pickled, for example: any file handles
TODO
- more image formats
Owner
- Login: wimpomp
- Kind: user
- Repositories: 5
- Profile: https://github.com/wimpomp
GitHub Events
Total
- Push event: 26
- Fork event: 1
- Create event: 1
Last Year
- Push event: 26
- Fork event: 1
- Create event: 1
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Wim Pomp | w****p@n****l | 58 |
| wimpomp | 5****p | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total 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
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
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 359 last-month
- cargo 4,749 total
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 64
- Total maintainers: 2
pypi.org: ndbioimage
Bio image reading, metadata and some affine registration.
- Documentation: https://ndbioimage.readthedocs.io/
- License: GPL-3.0-or-later
-
Latest release: 2025.8.0
published 11 months ago
Rankings
Maintainers (1)
crates.io: ndbioimage
Read bio image formats using the bio-formats java package.
- Homepage: https://github.com/wimpomp/ndbioimage/tree/rs
- Documentation: https://docs.rs/ndbioimage/
- License: MIT
-
Latest release: 2025.8.0
published 11 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- JPype1 *
- SimpleITK-SimpleElastix *
- czifile 2019.7.2
- imagecodecs *
- lxml *
- numpy *
- ome-types ^0.4.0
- pandas *
- parfor >=2023.10.1
- pint *
- pytest *
- python ^3.8
- pyyaml *
- scikit-image *
- tifffile *
- tiffwrite *
- tqdm *