A Python module for interacting with IFCB data.
Project description
libifcb
An optimised, native Python library for working with IFCB data. Implements lazy-loading wherever possible and maintains open file pointers for speedy access. Returns standard Pillow image objects for further processing.
Example
from libifcb import ROIReader
import json
sample = ROIReader("testdata/D20140117T003426_IFCB014.hdr", "testdata/D20140117T003426_IFCB014.adc", "testdata/D20140117T003426_IFCB014.roi")
print(json.dumps(sample.header, indent=4)) # We can read the header, with cleaned variable names, as a dictionary
for trigger in sample.triggers:
print(json.dumps(trigger.raw, indent=4)) # We can also dump raw trigger data as dictionaries
print(str(len(sample1.rois)) + " ROIs") # How many actual ROIs did we get?
sample.rois[1899].image.save("testout/D20140117T003426_IFCB014_02177.png") # This list only contains valid ROIs - indexes will not match with other software!
sample.rows[2176].image.save("testout/D20140117T003426_IFCB014_02177.tiff") # ADC row indexes start from one, but we start from zero to be pythonic - This will return None types for 0-ROI triggers!
sample.triggers[2102].rois[0].image.save("testout/D20140117T003426_IFCB014_02177.jpeg") # As do trigger indexes, this is trigger #2103
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
libifcb-0.7.tar.gz
(10.3 kB
view details)
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
libifcb-0.7-py3-none-any.whl
(8.3 kB
view details)
File details
Details for the file libifcb-0.7.tar.gz.
File metadata
- Download URL: libifcb-0.7.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5466a68af00783d3112f6662aa11b4d4d70b56b437837fb3564d9f3b1d29744
|
|
| MD5 |
4199fae1263600c8c659a09c7c7c7fc2
|
|
| BLAKE2b-256 |
fbca0e1ee2d3a972ed4176c7cb72d6ef52c93e8605e66f53594d94cc55212c26
|
File details
Details for the file libifcb-0.7-py3-none-any.whl.
File metadata
- Download URL: libifcb-0.7-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f247d511fd07701ceced4f98f06c1eae9442a59b59fbabd87960bddb15a8302
|
|
| MD5 |
32dce4495e5886392c00cb4e957f59f0
|
|
| BLAKE2b-256 |
5e20a47865835ebac2500bd73f2eb07c8f8e2dbace5a2e50dd5c4a72d0bd9fa0
|