napari icon indicating copy to clipboard operation
napari copied to clipboard

Async slicing: add layer slicer class with unit tests

Open andy-sweet opened this issue 2 years ago • 0 comments

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.

andy-sweet avatar Sep 26 '22 18:09 andy-sweet