Moving loadStudy logic from Hanging Protocols to StudyMetadataSource
This commit is contained in:
parent
4fe9a2f9fc
commit
3917e34a74
@ -417,9 +417,6 @@ HP.ProtocolEngine = class ProtocolEngine {
|
||||
|
||||
// Check if study metadata is already in studies list
|
||||
if (this.studies.find(study => study.getStudyInstanceUID() === priorStudyInstanceUID)) {
|
||||
// Update the viewport to refresh layout manager with new study
|
||||
this.updateViewports();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -433,6 +430,9 @@ HP.ProtocolEngine = class ProtocolEngine {
|
||||
|
||||
// Re-match images
|
||||
this.matchImages(viewport);
|
||||
|
||||
// Update the viewport to refresh layout manager with new study
|
||||
this.updateViewports();
|
||||
}, error => {
|
||||
OHIF.log.warn(error);
|
||||
throw new OHIFError(`ProtocolEngine::matchImages could not get study metadata for studyInstanceUID: ${priorStudyInstanceUID}`);
|
||||
|
||||
@ -36,7 +36,7 @@ export class OHIFStudyMetadataSource extends OHIF.viewerbase.StudyMetadataSource
|
||||
});
|
||||
|
||||
if (!alreadyLoaded) {
|
||||
this._updateStudyCollections(study);
|
||||
OHIFStudyMetadataSource._updateStudyCollections(study);
|
||||
}
|
||||
|
||||
resolve(study);
|
||||
@ -53,7 +53,7 @@ export class OHIFStudyMetadataSource extends OHIF.viewerbase.StudyMetadataSource
|
||||
// Set studyMetadata display sets
|
||||
studyMetadata.setDisplaySets(displaySets);
|
||||
|
||||
this._updateStudyCollections(studyMetadata);
|
||||
OHIFStudyMetadataSource._updateStudyCollections(studyMetadata);
|
||||
resolve(studyMetadata);
|
||||
}, reject);
|
||||
});
|
||||
@ -65,7 +65,7 @@ export class OHIFStudyMetadataSource extends OHIF.viewerbase.StudyMetadataSource
|
||||
|
||||
// Set some studyInfo properties
|
||||
studyInfo.selected = true;
|
||||
studyInfo.displaySets = displaySets;
|
||||
studyInfo.displaySets = studyMetadata.getDisplaySets();
|
||||
|
||||
// Insert new study info object in Studies TypeSafeCollection
|
||||
OHIF.viewer.Studies.insert(studyInfo);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user