Skip to main content

A Python module for interacting with IFCB data.

Project description

libifcb

A native Python library for working with IFCB data.

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

#NB: These are not standard python lists. Image data is only extracted when requested. Image data is extracted as PIL images.

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.5.tar.gz (10.0 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.5-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for libifcb-0.5.tar.gz
Algorithm Hash digest
SHA256 37d4281bae1fd20453bdee22c209010730165ac831262510088fb4711a2ef074
MD5 1c1b028edde6ee9ee8be5d4e5c288cbd
BLAKE2b-256 ad15e403b061c00681effbf536dd464d29b82fde4df357d3cd7885f5f0aad884

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for libifcb-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ee73502de9318112f4b74ddbd7092a42063f042df8a8f32cb6a1dffa28c91c3b
MD5 13e185ad670fa47e6df84a1fbf0ae1b2
BLAKE2b-256 78842dfffec4daf6a4d59abe6e9e8f8e8ef4251acef1a661114f808604ce9a7b

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