Currently, when the user switches from 3D to z-slice mode in a zarr image, the image remains at the scale level chosen for 3d rather than loading a higher scale level for 2D.
Expected Behavior
The viewer should recognize when a new load would fetch a different scale level and issue a new load.
Solution
This is due to the check made by Volume.updateRequiredData: it determines that since the time has not changed and the 2d slice is contained within the 3d volume, it does not need to load new data.
Part of the solution could come from adapting the loader interface method loadDims. This method is currently unused in the app, and the type it returns, VolumeDims, has remained constant through five or six revisions of the similar LoadSpec type. This seems like the appropriate method to ask a loader which scale level it would load with a given LoadSpec.
This is also a light form of #115, since the slice will be immediately displayed at 3D resolution first before new data is loaded. Future work might be to check if the data required by a load is present in the cache at a lower scale level, so that it can be loaded immediately while new data is fetched from the server.
Description
Currently, when the user switches from 3D to z-slice mode in a zarr image, the image remains at the scale level chosen for 3d rather than loading a higher scale level for 2D.
Expected Behavior
The viewer should recognize when a new load would fetch a different scale level and issue a new load.
Solution
This is due to the check made by
Volume.updateRequiredData
: it determines that since the time has not changed and the 2d slice is contained within the 3d volume, it does not need to load new data.Part of the solution could come from adapting the loader interface method
loadDims
. This method is currently unused in the app, and the type it returns,VolumeDims
, has remained constant through five or six revisions of the similarLoadSpec
type. This seems like the appropriate method to ask a loader which scale level it would load with a givenLoadSpec
.This is also a light form of #115, since the slice will be immediately displayed at 3D resolution first before new data is loaded. Future work might be to check if the data required by a load is present in the cache at a lower scale level, so that it can be loaded immediately while new data is fetched from the server.