catmaid / CATMAID

Collaborative Annotation Toolkit for Massive Amounts of Image Data
https://catmaid.org
GNU General Public License v3.0
182 stars 56 forks source link

[BUG] H2N5 tile source orthoviews misbehaving, possibly due to anisotropic scaling #2223

Open clbarnes opened 2 years ago

clbarnes commented 2 years ago

Short description

Descending into scale levels with non-power-of-2 downscaling for the first time raises errors if multiple orthoviews are open.

To reproduce

I've tried lots of combinations of starting with one stack and then adding more before or after zooming for the first time, but can't consistently get it to trigger that way - couldn't detect a pattern.

More information

Note that Igor's N5 stack has isotropic power-of-2 scaling above s3, and scaling as a power of 2 only in XY below that.

After triggering the error for the first time, the viewer is left in a dirty state where more errors are thrown whenever you move.

From the error:

Version: 2021.12.21-117-g7510a2cb8
Error: Cannot read properties of undefined (reading 'position') User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Stacktrace: TypeError: Cannot read properties of undefined (reading 'position')
    at PixiTileLayer.redraw (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:26602:14)
    at PixiTileLayer.TileLayer.resize (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:24886:10)
    at PixiTileLayer.resize (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:26684:40)
    at PixiTileLayer.redraw (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:26536:19)
    at StackViewer.redraw (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:9492:15)
    at StackViewer.update (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:9252:10)
    at StackViewer.<anonymous> (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:9614:14)
    at new Promise (<anonymous>)
    at StackViewer.moveToAfterBeforeMoves (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:9613:14)
    at StackViewer.moveTo (https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/igor/static/js/catmaid.1fd00eb70db2.js:9649:33)

Workaround

Open a single stack viewer, zoom in to a low scale, then add the other stack viewers. You should be able to move around freely.