fix(viewport): Initial blank image on SR/SEG initial display (#3304)

* fix: Blank display area on initial DICOM SR load

* Docs

* Fix a NPE
This commit is contained in:
Bill Wallace authored and GitHub committed 2023-04-05 17:26:51 -04:00
1 parent 45a34ae0fe
commit d3da969d23
4 files changed
+97 -17

No files matched your search

@@ -200,11 +200,12 @@ function ViewerViewportGrid(props) {
}
updatedViewports.forEach(vp => {
vp.viewportOptions ||= {};
const { orientation, viewportType } = vp.viewportOptions;
let initialImageOptions;
// For initial imageIndex to hang be careful for the volume viewport
if (viewportType === 'stack') {
if (viewportType === 'stack' || !viewportType) {
initialImageOptions = {
index: imageIndex,
};
@@ -227,7 +228,7 @@ function ViewerViewportGrid(props) {
}
}
vp.viewportOptions['initialImageOptions'] = initialImageOptions;
vp.viewportOptions.initialImageOptions = initialImageOptions;
});
viewportGridService.setDisplaySetsForViewports(updatedViewports);