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