fix(cine): prevent crash on second view/hydration of SR series (#5724)
* test: add Playwright test for SR series reload after hydration * docs: remove Playwright VSCode extension video
This commit is contained in:
1 parent
7bcb6b8a94
commit
f70c9b932d
6 files changed
+47
-7
No files matched your search
@@ -2,6 +2,11 @@ import { cache, Types } from '@cornerstonejs/core';
|
||||
import { utilities } from '@cornerstonejs/tools';
|
||||
|
||||
function _getVolumeFromViewport(viewport: Types.IBaseVolumeViewport) {
|
||||
// Handle non-volume viewports that don't have getAllVolumeIds
|
||||
if (!viewport?.getAllVolumeIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const volumeIds = viewport.getAllVolumeIds();
|
||||
const volumes = volumeIds.map(id => cache.getVolume(id));
|
||||
const dynamicVolume = volumes.find(volume => volume.isDynamicVolume());
|
||||
|
||||
Reference in new issue
Block a user