Update viewer to use prior studies for Hanging Protocols initialization and using those studies in HP Match Image process (added getStudyPriors and getStudyPriorsMap)

This commit is contained in:
Emanuel F. Oliveira authored and Eloízio Salgado committed 2017-03-02 10:16:10 -03:00
1 parent b9a3cf9da3
commit 4df18233c4
10 files changed
+335 -155

No files matched your search

@@ -28,8 +28,11 @@ const initHangingProtocol = () => {
// Instantiate StudyMetadataSource: necessary for Hanging Protocol to get study metadata
const studyMetadataSource = new StudyList.classes.OHIFStudyMetadataSource();
// Get prior studies map
const studyPriorsMap = StudyList.functions.getStudyPriorsMap(studyMetadataList);
// Creates Protocol Engine object with required arguments
const ProtocolEngine = new HP.ProtocolEngine(layoutManager, studyMetadataList, [], studyMetadataSource);
const ProtocolEngine = new HP.ProtocolEngine(layoutManager, studyMetadataList, studyPriorsMap, studyMetadataSource);
// Sets up Hanging Protocol engine
HP.setEngine(ProtocolEngine);
@@ -132,7 +135,7 @@ Template.viewer.onRendered(function() {
// To avoid first run
if (isOHIFViewerMainRendered) {
// To run only when ViewerMainRendered dependency has changed.
// To run only when OHIFViewerMainRendered dependency has changed.
// because initHangingProtocol can have other reactive components
Tracker.nonreactive(initHangingProtocol);
}