napari
napari copied to clipboard
Async slicing: add layer slicer class with unit tests
Description
The accepted design for async slicing, defines a class that encapsulates the logic of slicing. This new class does not need to be public, so should be private. It should however be well tested to cover various cases, such as the following.
- Slicing multiple layers that all support async slicing does not block.
- Slicing multiple layers where at least one does not support slicing blocks.
See the prototype PR for a crude reference implementation.
This task does not need to include behavior related to cancellation or synchronous slicing, which can be handle by follow up tasks.
Motivation
Defining a dedicated class to handle slicing logic and async scheduling helps to prevent growing the code/logic in ViewerModel
.
Output
A PR with the new class and unit tests for it. The class does not need to be and should probably not be connected to anything else in the napari code base yet.