fmi-faim / faim-ipa

A collection of Image Processing and Analysis (IPA) functions used at the Facility for Advanced Imaging and Microscopy (FAIM)
BSD 3-Clause "New" or "Revised" License
8 stars 6 forks source link

Computation of UIntHistogram #47

Closed tibuch closed 5 months ago

tibuch commented 1 year ago

A remaining question is how to deal with the histograms (UIntHistogram): should we still read all pixel values to create them immediately when processing/stacking the image, or rather delay creation until we actually write the well/field into the zarr store?

Originally posted by @imagejan in https://github.com/fmi-faim/faim-hcs/issues/42#issuecomment-1739095300

tibuch commented 1 year ago

Moving towards a dask array supported (#42) io implementation adds another layer of complexity. In light of this I would perform the histogram computation as an additional step once the ome-zarr is fully written. This would mean that the histogram computation becomes our first processing step working on an ome-zarr file.

tibuch commented 5 months ago

We can use dask-arrays as input to the histogram class see: https://github.com/fmi-faim/faim-ipa/blob/6a1aa95def0dd513a24102c02abf1e607830c194/src/faim_ipa/UIntHistogram.py#L39.

The current code keeps the histogram computation separate from the ome-zarr creation, which seems to work fine so far.

We can re-open this issue if it becomes a problem in the future.