ddd-pylib#

1. Description#

ddd-pylib is a stand-alone Python library exposing a set of image processing and analysis tools, with a focus on 3D images. It is designed to be used in conjunction with other libraries such as :

  • numpy

  • scipy

  • scikit-image

  • xarray

  • pandas

The library exposes its features through a set of operators (an operator == a class) that provide a unified interface for all tasks.

All operators should be able to handle 2D+t and 3D+t images, as long as the axes are properly labeled using xarray. Input images should be encapsulated as follows:

import xarray as xr
import numpy as np

# Create a 3D+t image with shape (t, z, y, x)
img = np.random.rand(10, 5, 100, 100)

# Create an xarray DataArray with labeled axes
da = xr.DataArray(
    img,
    dims=('T', 'Z', 'Y', 'X'),
    attrs={
        "scale": {'T': 1.0, 'Z': 1.0, 'Y': 1.0, 'X': 1.0},
        "units": {'T': 's', 'Z': 'µm', 'Y': 'µm', 'X': 'µm'}
    }
)

2. Examples#

Within the documentation of some operators, you will find examples of how to use them. A folder containing images used in the examples is available at https://sdrive.cnrs.fr/s/4kJsszZE95ComdY.