cornerstonejs / cornerstone3D

Cornerstone is a set of JavaScript libraries that can be used to build web-based medical imaging applications. It provides a framework to build radiology applications such as the OHIF Viewer.
https://cornerstonejs.org
MIT License
479 stars 252 forks source link

[Bug] Scrolling a zoomed StackViewport, resets the zoom to 1 #1301

Open vrassouli opened 1 month ago

vrassouli commented 1 month ago

Describe the Bug

When I zoom a stack viewport (on some of series), and start to scroll in the stack, the zoom resets at some specific indexes. This does not happen for all the series, but for some

Steps to Reproduce

I'm using the latest version - 1.77.3

I attach an anonymized series which has this issue. Stack Zoom Issue - Anonymized3.zip

The current behavior

if you zoom at image#1 (index 0), and scroll the series, the zoom will be reset at image#4 (index 3)

The expected behavior

The zoom should remain the same for the stack

OS

Windows 11

Node version

v22.0.0

Browser

Edge

sedghi commented 3 weeks ago

I understand the situation. We reset the properties if we detect a difference between the previous image and the current image (metadata: rows, columns, orientation). However, we can simply discard the pixel data and orientation while retaining the zoom and pan settings. We will investigate this further.

idemopacs commented 2 days ago

@sedghi ,

I am also facing the same issue, after stack scroll zoom , window level, pan, orientation everything resets.