PyoFormats: Simple wrapper for python-bioformats
Project description
PyoFormats
Simple wrapper for python-formats
Example
from pyoformats import read
# start JVM
read.JVM().start()
# displays names and shapes of all available series in file
read.file_info("test.msr")
# get series count of file
n_series = read.series_count("test.msr")
# returns 5d numpy array of image in series
my_image = read.image_5d("test.msr", series=1)
# read only certain z-slices. (Note, also channels and frames can be selected)
my_image = read.image_5d("test.msr", series=1, zslices=[2, 3, 5, 8, 13])
# get physical pixel sizes
xyz_sizes = read.pixel_sizes_xyz("test.msr", series=0)
# get physical pixel units
xyz_sizes = read.pixel_sizes_xyz_units("test.msr", series=0)
# iterate over all series and extract name and pixel data
for s, data in read.image_5d_iterator("test.msr"):
print(s, data.shape)
# at end of script
read.JVM().shutdown()
Installation
Detailed How-To for installing dependencies (Windows/ MacOS)
Before you install the pyformats Python package, check out detailed instructions for installing dependencies.
pyoformats directly from gitlab
pip install git+https://git.ist.ac.at/csommer/pyoformats.git
or local
git clone https://git.ist.ac.at/csommer/pyoformats.git
cd pyoformats
pip install -e .
Dependencies
- numpy
- javabridge
- python-bioformats
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyoformats-1.1.0.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for pyoformats-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97e10dc852fa01e898f235ee06a889df0233e23032516eecaf325a7e91c93a99 |
|
MD5 | 45d3439f620a3f9311f48554a4d118e8 |
|
BLAKE2b-256 | 7319b36b732bc42a6b87b5b41fd97dc7ec211f05434a4ad214146a2a04cca862 |