Skip to main content

Python module to read Hamamatsu DCIMG files

Project description

dcimg

This module provides the DCIMGFile class for accessing Hamamatsu DCIMG files.

Installation

pip install dcimg

Documentation

The DCIMGFile class provides an interface for reading 3D Hamamatsu DCIMG files.

Usage is pretty straightforward. First of all, create a DCIMGFile object:

>>> my_file = DCIMGFile('input_file.dcimg')
>>> my_file
    <DCIMGFile shape=2450x2048x2048 dtype=<class 'numpy.uint16'> file_name=input_file.dcimg>

Image data can then be accessed using NumPy's basic indexing:

>>> my_file[-10, :5, :5]
array([[101, 104, 100,  99,  89],
       [103, 102, 103,  99, 102],
       [101, 104,  99, 108,  98],
       [102, 111,  99, 111,  95],
       [103,  98,  99, 104, 106]], dtype=uint16)

Other convenience methods for accessing image data are: zslice, zslice_idx, frame and whole.

DCIMGFile supports context managers:

with DCIMGFile('input_file.dcimg') as f:
     a = f[800, ...]

For further details refer to: https://lens-biophotonics.github.io/dcimg/

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

dcimg-0.6.0.post1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

dcimg-0.6.0.post1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file dcimg-0.6.0.post1.tar.gz.

File metadata

  • Download URL: dcimg-0.6.0.post1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for dcimg-0.6.0.post1.tar.gz
Algorithm Hash digest
SHA256 10274111137e0473e4dab6f723a21a33164f50a0a8ac0129ba8229ff98daa2d9
MD5 5fb295fa477aa39617b3117936d5feab
BLAKE2b-256 fc77be95224f25c8187764dc70520c2f6ad1b8650d4f5ea80aaa16d43e8763db

See more details on using hashes here.

File details

Details for the file dcimg-0.6.0.post1-py3-none-any.whl.

File metadata

  • Download URL: dcimg-0.6.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for dcimg-0.6.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 835fd033901df8c2c03cc1bc44c88c6fe08697c7d730c048094f68f9a104f498
MD5 93c07c9ebcf37ee653d4b49559dcd07d
BLAKE2b-256 b4e5a1ac11815ec15800a1a44e3387d2212a47a0b42901cca6524a08511a1610

See more details on using hashes here.

Supported by

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