scalableminds / webknossos-connect

Connect webKnossos with existing datasets (BossDB, Neuroglancer Precomputed)
GNU Affero General Public License v3.0
0 stars 0 forks source link

correct resolutions and global scale #25

Closed jstriebel closed 5 years ago

jstriebel commented 5 years ago

Neuroglancer has the different resolutions in nm. Wk in voxels, but has a global scale that gives the size of the smallest/most-fine-grained voxel. We use the smallest neuroglancer resolution as the wk global scale and normalize everything by it. The global scale of the dataset now is displayed correctly in wk, zooming in & out works.

fixes #6

jstriebel commented 5 years ago

Yes, this supports the anisotropic scales and reports them correctly to wk. This is only possible due to the normalization, as wk expects the x/y-axis to be unique and start with 1 (assuming this is the high-resolution axis). For the dataset that is currently added this is: [(6, 6, 30), (12, 12, 30), (24, 24, 30), (48, 48, 60), (96, 96, 120), (192, 192, 240), (384, 384, 480), (768, 768, 960)] in nm from neuroglancer. For wk we set the global scale to be (6, 6, 30), so the normalized scales are valid: [(1, 1, 1), (2, 2, 1), (4, 4, 1), (8, 8, 2), (16, 16, 4), (32, 32, 8), (64, 64, 16), (128, 128, 32)]

normanrz commented 5 years ago

Cool!