You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed a peculiar issue with createSlabThicknessSynchronizer - if you add this synchronizer to a viewport then the initial loaded slice index will be some very weird number instead of the usual middle slice.
Steps to Reproduce
Adding synchronizer to a viewport immediately on a VIEWPORT_DATA_CHANGED event it works unexpectedly:
After experiencing very similar issues in one of our workflows that programmatically removes & restores viewports,
I was able to reproduce the issue (or something extremely similar) with the currently live OHIF version (
3.9.1, commit hash b417063) by
Expected behaviour: Viewports get rescaled according to new window width, mostly retain camera configs & the currently scrolled positions
Current behaviour: The (axial) viewport that I updated slice thicknesses in jumped to a different location in the volume
Notes:
no synchronizers are involved in the repro
if I destroy all implicit synchronizers (mpr, sameFORId) via cornerstoneTools.SynchronizerManager.destroy(id), the issue still persists
We later also found a no-code repro by
activating crosshairs
using one of the inner handles to change a viewport's slice thickness
I pushed a fix, but the real solution is to recompute the image index when the slab thickness changes. We shouldn't keep the old slice numbers when the slab changes; instead, we should recalculate the number of slices after the slab thickness changes.
Describe the Bug
We noticed a peculiar issue with
createSlabThicknessSynchronizer
- if you add this synchronizer to a viewport then the initial loaded slice index will be some very weird number instead of the usual middle slice.Steps to Reproduce
Adding synchronizer to a viewport immediately on a
VIEWPORT_DATA_CHANGED
event it works unexpectedly:However, when added with a
setTimeout(..., 2000)
, it works as expected:The current behavior
The initial slice indexes are some weird number as seen on the image:
The expected behavior
The initial slice indexes are for the middle slices in all viewports.
OS
macOS 14.5 (23F79)
Node version
v18.20.4
Browser
Version 130.0.6723.70 (Official Build) (arm64)
The text was updated successfully, but these errors were encountered: