fix: for initialImageIndex mismatch issue for loading SR after disabling prompts (#4732)
Co-authored-by: ashikcn <ashik@L1140.trenser.com>
This commit is contained in:
1 parent
078a72996f
commit
8e3e2085d4
3 files changed
+19
-6
No files matched your search
@@ -124,7 +124,11 @@ function commandsModule({
|
||||
type,
|
||||
});
|
||||
},
|
||||
updateStoredPositionPresentation: ({ viewportId, displaySetInstanceUID }) => {
|
||||
updateStoredPositionPresentation: ({
|
||||
viewportId,
|
||||
displaySetInstanceUID,
|
||||
referencedImageId,
|
||||
}) => {
|
||||
const presentations = cornerstoneViewportService.getPresentations(viewportId);
|
||||
const { positionPresentationStore, setPositionPresentation, getPositionPresentationId } =
|
||||
usePositionPresentationStore.getState();
|
||||
@@ -136,10 +140,18 @@ function commandsModule({
|
||||
)?.[0];
|
||||
|
||||
if (previousReferencedDisplaySetStoreKey) {
|
||||
setPositionPresentation(
|
||||
previousReferencedDisplaySetStoreKey,
|
||||
presentations.positionPresentation
|
||||
);
|
||||
if (referencedImageId) {
|
||||
setPositionPresentation(previousReferencedDisplaySetStoreKey, {
|
||||
viewReference: {
|
||||
referencedImageId,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
setPositionPresentation(
|
||||
previousReferencedDisplaySetStoreKey,
|
||||
presentations.positionPresentation
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user