From 9637dfbb64eeb39d92c979d5922604079847b1e9 Mon Sep 17 00:00:00 2001 From: Luke Zhang <45812192+deerzlg@users.noreply.github.com> Date: Wed, 29 May 2024 00:07:08 +0800 Subject: [PATCH] fix(core): correctly set the orientation of the volume (#1287) --- .../core/src/utilities/convertStackToVolumeViewport.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/core/src/utilities/convertStackToVolumeViewport.ts b/packages/core/src/utilities/convertStackToVolumeViewport.ts index a3cd44538..0a78be728 100644 --- a/packages/core/src/utilities/convertStackToVolumeViewport.ts +++ b/packages/core/src/utilities/convertStackToVolumeViewport.ts @@ -87,9 +87,11 @@ async function convertStackToVolumeViewport({ ); const volumeViewportNewVolumeHandler = () => { - volumeViewport.setCamera({ - ...prevCamera, - }); + if (!options.orientation) { + volumeViewport.setCamera({ + ...prevCamera, + }); + } volumeViewport.render(); element.removeEventListener(