Skip to main content

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.8.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libifcb-0.8-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file libifcb-0.8.tar.gz.

File metadata

  • Download URL: libifcb-0.8.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for libifcb-0.8.tar.gz
Algorithm Hash digest
SHA256 ad16ef105ab9aa9b97a4002f086898ca000c7bbdedf93818cadf95e94a2c5e5a
MD5 c835e57a08c59095842a14748675014c
BLAKE2b-256 7d9f34bc24fd802ccb553200b78efa47466883cc80465bba5f4662dc7ae36bae

See more details on using hashes here.

File details

Details for the file libifcb-0.8-py3-none-any.whl.

File metadata

  • Download URL: libifcb-0.8-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for libifcb-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6da53c20abbab386acbf17846c5cec5b0822e9e53bd7dab5971829ced3d9de9d
MD5 3eae2ad0d1b040879d9404a89026a30b
BLAKE2b-256 3fe516a961e6768fa23970a831a6af157d8075b42e36118b1c9a62c680615934

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page