best way to process a large array given a smaller binary mask #9599
-
Hi, I am working with whole slide images using napari-lazy-openslide. I need to slice the image using the binary mask, process the sliced array, generate a new array with shape (X,Y) that is zeros everywhere except for the regions corrisponding to the binary mask.
where
I am trying to achieve that this way:
Anyway it does not always work, depending on the shapes and the chunks. Probably I misunderstood how to use da.piecewise. The error that occurs is something like:
Moreover, I am not sure this is the right approach from a performance point of view, since the fit function and the rechunks can be heavy tasks. Any help is appreciated, thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
hi @mdrio, Dask now has a Discourse forum for usage-questions. We'll see you there! :) |
Beta Was this translation helpful? Give feedback.
hi @mdrio, Dask now has a Discourse forum for usage-questions. We'll see you there! :)