guiwitz / napari-steinpose

A plugin to process Imaging Mass Cytometry data with cellpose and steinbock
https://guiwitz.github.io/napari-steinpose
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

handle missing rois #3

Closed guiwitz closed 1 year ago

guiwitz commented 1 year ago

This PR solves the issue raised in #2 where rois present in the metadata were not actually acquired because the acquisition run was aborted. The solution of this PR is to check the number of channels of each roi. Non-acquired rois have 0 channels and can therefore be removed. Now when querying the number of rois of a dataset, only the rois with n_channels > 0 are considered.

This PR also fixes a potential problem when running the analysis over a folder. Instead of assuming that all files have the same number of rois, now this number is set separately for each file.