saeyslab / napari-sparrow

Other
17 stars 0 forks source link

SC_45_fix for long dask graph using many chunks in segmentation #165

Closed ArneDefauw closed 8 months ago

ArneDefauw commented 8 months ago

this line:

x_labels = _trim_masks(masks=x_labels, depth=depth) https://github.com/saeyslab/napari-sparrow/blob/367ebe41aac096b384b749a7014abcb3930c61b4/src/napari_sparrow/image/segmentation/_segmentation.py#L350C1-L350C64

leads to long dask graph, which took exponentionally long to resolve when having many chunks (>>100)

This pull request fixes this issue