View in #cornerstone3d on Slack
@Julian_Linares: Is there an alternative to getZoom()
? It calculates the zoom based on the viewport size, not the image size, so for small viewports showing the full image, the zoom is 100%. I want the zoom to reflect the ratio between the real image size and its displayed size. In older Cornerstone versions, we used viewport.scale
, but I can’t find that anymore.
@Bill_Wallace: The zoom is the zoom of a scale to fit image display relative to the image area
Adding a getScale would also be useful, showing the pixel size scaling - please submit a PR with that change for the various viewports.
Actually, it can probably be done in Viewport.ts in cornerstone.
@Julian_Linares: Here’s my PR, first time doing this so not completely sure it’s correct.
https://github.com/cornerstonejs/cornerstone3D/pull/1762
#1762 feat(viewport): add getScale function