Move server-side functions from viewerbase to worklist. Split multi-frame and single-image modalities into separate display sets (OHIF-36)
This commit is contained in:
1 parent
9d8c039ffc
commit
fe32c40832
32 files changed
+231
-793
No files matched your search
@@ -401,7 +401,7 @@ HP.ProtocolEngine = class ProtocolEngine {
|
||||
if (!alreadyLoaded) {
|
||||
getStudyMetadata(priorStudy.studyInstanceUid, study => {
|
||||
study.abstractPriorValue = abstractPriorValue;
|
||||
|
||||
study.displaySets = createStacks(study);
|
||||
ViewerStudies.insert(study);
|
||||
this.studies.push(study);
|
||||
this.matchImages(viewport);
|
||||
@@ -586,6 +586,23 @@ HP.ProtocolEngine = class ProtocolEngine {
|
||||
currentViewportData.currentImageIdIndex = details.bestMatch.currentImageIdIndex;
|
||||
}
|
||||
|
||||
const study = ViewerStudies.findOne({
|
||||
studyInstanceUid: details.bestMatch.studyInstanceUid
|
||||
});
|
||||
|
||||
// Find the best matched display set. TODO: Fix this to actually
|
||||
// find the most appropriate display set
|
||||
study.displaySets.forEach(displaySet => {
|
||||
if (displaySet.seriesInstanceUid === details.bestMatch.seriesInstanceUid) {
|
||||
currentViewportData.displaySetInstanceUid = displaySet.displaySetInstanceUid;
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
if (!currentViewportData.displaySetInstanceUid) {
|
||||
throw "No matching display set found?";
|
||||
}
|
||||
|
||||
viewportData.push(currentViewportData);
|
||||
});
|
||||
|
||||
@@ -594,7 +611,7 @@ HP.ProtocolEngine = class ProtocolEngine {
|
||||
this.LayoutManager.viewportData = viewportData;
|
||||
|
||||
if (viewportIndex !== undefined && viewportData[viewportIndex]) {
|
||||
this.LayoutManager.rerenderViewportWithNewSeries(viewportIndex, viewportData[viewportIndex]);
|
||||
this.LayoutManager.rerenderViewportWithNewDisplaySet(viewportIndex, viewportData[viewportIndex]);
|
||||
} else {
|
||||
this.LayoutManager.updateViewports();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user