Currently neuroglia's calcium module works with extracted fluorescence traces. It would be useful to integrate the ability to extract fluorescence traces for downstream processing.
This could look something like:
from dask.array.image import imread
from neuroglia.calcium import SourceExtraction
image = imread('image.tif')
se = SourceExtraction(method='some_method', *args, **kwargs)
fluorescence_traces = se.transform(image)
Some libraries already exist for this (SIMA, CaImAn, Thunder), but an integrated solution with a consistent API would allow for more efficient processing. Which algorithms to use and how to implement or wrap them are up for discussion. Dask is used in the example above because it would support both in-memory processing of small images and out-of-memory processing of large images, and because it integrates naturally with xarray for downstream analysis.
Currently neuroglia's calcium module works with extracted fluorescence traces. It would be useful to integrate the ability to extract fluorescence traces for downstream processing. This could look something like:
Some libraries already exist for this (SIMA, CaImAn, Thunder), but an integrated solution with a consistent API would allow for more efficient processing. Which algorithms to use and how to implement or wrap them are up for discussion. Dask is used in the example above because it would support both in-memory processing of small images and out-of-memory processing of large images, and because it integrates naturally with xarray for downstream analysis.