A BioIO reader plugin for reading ND2 images.
Project description
bioio-nd2
A BioIO reader plugin for reading nd2 (Nikon microscope) files using nd2
Documentation
See the full documentation on our GitHub pages site - the generic use and installation instructions there will work for this package.
Information about the base reader this package relies on can be found in the bioio-base repository here
Installation
Stable Release: pip install bioio-nd2
Development Head: pip install git+https://github.com/bioio-devs/bioio-nd2.git
Example Usage (see full documentation for more examples)
Install bioio-nd2 alongside bioio:
pip install bioio bioio-nd2
This example shows a simple use case for just accessing the pixel data of the image
by explicitly passing this Reader into the BioImage. Passing the Reader into
the BioImage instance is optional as bioio will automatically detect installed
plug-ins and auto-select the most recently installed plug-in that supports the file
passed in.
from bioio import BioImage
import bioio_nd2
img = BioImage("my_file.nd2", reader=bioio_nd2.Reader)
img.data
Multi-Well Plate & Well Assignment Support (ND2)
bioio-nd2 includes support for mapping ND2 XY stage positions to
multi-well plate positions (e.g. A1, B3, H12). This is primarily
intended for experiments acquired using Nikon’s XYPosLoop functionality
on multi-well plates.
⚠️ If the ND2 file does not contain XY position metadata (
XYPosLoop), no well mapping is performed androw/columnwill beNone.
A standard 96-well plate geometry is available as PLATE_96
from bioio import BioImage
import bioio_nd2
from bioio_nd2.plates import PLATE_96
img = BioImage(
"my_file.nd2",
reader=bioio_nd2.Reader,
plate=PLATE_96,
)
img.set_scene(0)
img.reader.row # e.g. "B"
img.reader.column # e.g. "3"
Custom Plate Geometries
Users may define their own plate geometry and pass it to the reader.
from bioio import BioImage
import bioio_nd2
from bioio_nd2.plates import Plate, WellAssignmentMode
custom_plate = Plate(
name="custom_96",
rows=list("ABCDEFGH")[::-1],
cols=[str(i) for i in range(1, 13)],
plate_width_mm=126.6,
plate_height_mm=85.7,
a1_offset_mm=(14.3, 11.36),
well_spacing_um=9000.0,
well_radius_um=6210.0 / 2,
assignment_mode=WellAssignmentMode.CLOSEST,
)
img = BioImage(
"my_file.nd2",
reader=bioio_nd2.Reader,
plate=custom_plate,
)
Controlling well assignment strictness
The plate definition includes a well assignment mode that controls how strictly stage positions must correspond to a physical well.
Available modes:
| Mode | Behavior |
|---|---|
CLOSEST |
Always assign the nearest well (most permissive) |
WITHIN_WELL |
Assign only if position falls within the well radius |
HALF_SPACING |
Assign only if within half the inter-well spacing |
In strict modes, scenes that fall outside the allowed region will have
row / column set to None.
Issues
Click here to view all open issues in bioio-devs organization at once or check this repository's issue tab.
Development
See CONTRIBUTING.md for information related to developing the code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bioio_nd2-1.6.2.tar.gz.
File metadata
- Download URL: bioio_nd2-1.6.2.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edf22d88c38113aef1b6ace62f6a2ea780993ad178d69212c5b7e63e8426444a
|
|
| MD5 |
8d01d40d1efb6cb0020c6d0ade62d0b5
|
|
| BLAKE2b-256 |
a52f41ea1e064ff70aa4e8309518803b8da642917df0feb90e5a79690a00823f
|
Provenance
The following attestation bundles were made for bioio_nd2-1.6.2.tar.gz:
Publisher:
ci.yml on bioio-devs/bioio-nd2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioio_nd2-1.6.2.tar.gz -
Subject digest:
edf22d88c38113aef1b6ace62f6a2ea780993ad178d69212c5b7e63e8426444a - Sigstore transparency entry: 870934005
- Sigstore integration time:
-
Permalink:
bioio-devs/bioio-nd2@b2e777262ee3ec4807358ac3b1dcbbb1cffb0611 -
Branch / Tag:
refs/tags/v1.6.2 - Owner: https://github.com/bioio-devs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@b2e777262ee3ec4807358ac3b1dcbbb1cffb0611 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bioio_nd2-1.6.2-py3-none-any.whl.
File metadata
- Download URL: bioio_nd2-1.6.2-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47d200636ecef867843e7d32d18a237ce5523676b9826e3355e559e20bb8c351
|
|
| MD5 |
9057f0dbe78601498ea1197baabbe970
|
|
| BLAKE2b-256 |
c8aa09963be88f796f0bcd62ad50210ad312fd8b2a576476b59f5f5e11bba01a
|
Provenance
The following attestation bundles were made for bioio_nd2-1.6.2-py3-none-any.whl:
Publisher:
ci.yml on bioio-devs/bioio-nd2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioio_nd2-1.6.2-py3-none-any.whl -
Subject digest:
47d200636ecef867843e7d32d18a237ce5523676b9826e3355e559e20bb8c351 - Sigstore transparency entry: 870934009
- Sigstore integration time:
-
Permalink:
bioio-devs/bioio-nd2@b2e777262ee3ec4807358ac3b1dcbbb1cffb0611 -
Branch / Tag:
refs/tags/v1.6.2 - Owner: https://github.com/bioio-devs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@b2e777262ee3ec4807358ac3b1dcbbb1cffb0611 -
Trigger Event:
push
-
Statement type: