fix(viewport): Reset viewport state and fix CINE looping, thumbnail resolution, and dynamic tool settings (#4037)
This commit is contained in:
1 parent
a6c6fff43a
commit
f99a0bfb31
80 files changed
+1129
-801
No files matched your search
@@ -75,23 +75,27 @@ export default function interleaveTopToBottom({
|
||||
* listen to it and as the other viewports are created we can set the volumes for them
|
||||
* since volumes are already started loading.
|
||||
*/
|
||||
if (filteredMatchDetails.length !== viewportIdVolumeInputArrayMap.size) {
|
||||
const uniqueViewportVolumeDisplaySetUIDs = new Set();
|
||||
viewportIdVolumeInputArrayMap.forEach((volumeInputArray, viewportId) => {
|
||||
volumeInputArray.forEach(volumeInput => {
|
||||
const { volumeId } = volumeInput;
|
||||
uniqueViewportVolumeDisplaySetUIDs.add(volumeId);
|
||||
});
|
||||
});
|
||||
|
||||
const uniqueMatchedDisplaySetUIDs = new Set();
|
||||
|
||||
matchDetails.forEach(matchDetail => {
|
||||
const { displaySetsInfo } = matchDetail;
|
||||
displaySetsInfo.forEach(({ displaySetInstanceUID }) => {
|
||||
uniqueMatchedDisplaySetUIDs.add(displaySetInstanceUID);
|
||||
});
|
||||
});
|
||||
|
||||
if (uniqueViewportVolumeDisplaySetUIDs.size !== uniqueMatchedDisplaySetUIDs.size) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if all the matched volumes are loaded
|
||||
for (const [_, details] of displaySetsMatchDetails.entries()) {
|
||||
const { SeriesInstanceUID, displaySetInstanceUID } = details;
|
||||
|
||||
// HangingProtocol has matched, but don't have all the volumes created yet, so return
|
||||
if (
|
||||
displaySetsToLoad.has(displaySetInstanceUID) &&
|
||||
!Array.from(volumeIdMapsToLoad.values()).includes(SeriesInstanceUID)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const volumeIds = Array.from(volumeIdMapsToLoad.keys()).slice();
|
||||
// get volumes from cache
|
||||
const volumes = volumeIds.map(volumeId => {
|
||||
|
||||
Reference in new issue
Block a user