Metadata-Version: 2.4
Name: dcimg
Version: 0.7.0
Summary: Python module to read Hamamatsu DCIMG files
Author-email: Giacomo Mazzamuto <mazzamuto@lens.unifi.it>
License-Expression: MIT
Project-URL: Homepage, https://github.com/lens-biophotonics/dcimg
Keywords: dcimg,image,files,hamamatsu
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Provides-Extra: dev
Requires-Dist: pip-tools; extra == "dev"
Provides-Extra: test
Requires-Dist: ddt; extra == "test"
Provides-Extra: doc
Requires-Dist: numpydoc; extra == "doc"
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: sphinx_rtd_theme; extra == "doc"
Dynamic: license-file

# dcimg

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

## Installation
```bash
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:

```python
>>> 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:

```python
>>> 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:
```python
with DCIMGFile('input_file.dcimg') as f:
     a = f[800, ...]
```

To access the whole file as a Dask Array, use `as_dask_array()`:
```python
my_file = DCIMGFile('input_file.dcimg')
da = my_file.as_dask_array()
```
For further details refer to:
https://lens-biophotonics.github.io/dcimg/
