[WIP] Moving hanging protocols initialization to OHIF Viewer specific code.
This commit is contained in:
1 parent
7fa581e52b
commit
6cfb4f16eb
5 files changed
+84
-17
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import 'meteor/ohif:viewerbase';
|
||||
|
||||
export class OHIFStudyMetadataSource extends OHIF.viewerbase.StudyMetadataSource {
|
||||
|
||||
/**
|
||||
* Get study metadata for a study with given study InstanceUID
|
||||
* @param {String} studyInstanceUID Study InstanceUID
|
||||
*/
|
||||
getByInstanceUID(studyInstanceUID) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getStudyMetadata(studyInstanceUID, resolve, reject);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -65,4 +65,5 @@ Package.onUse(function(api) {
|
||||
// Export the Collections
|
||||
api.export('StudyListStudies', 'client');
|
||||
api.export('StudyListSelectedStudies', 'client');
|
||||
api.export('OHIFStudyMetadataSource', 'client');
|
||||
});
|
||||
@@ -114,7 +114,11 @@ Template.viewerMain.onRendered(() => {
|
||||
// Enable hotkeys
|
||||
hotkeyUtils.enableHotkeys();
|
||||
|
||||
Session.set('ViewerMainRendered', Random.id());
|
||||
Session.set('OHIFViewerMainRendered', {
|
||||
instance,
|
||||
date: new Date()
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Template.viewerMain.onDestroyed(() => {
|
||||
|
||||
@@ -5,25 +5,25 @@ import { OHIFError } from './OHIFError';
|
||||
*/
|
||||
export class StudyMetadataSource {
|
||||
|
||||
/**
|
||||
* Get study metadata for a given study info
|
||||
* @param {Object} studyInfo Study info object
|
||||
*/
|
||||
getByStudyInfo(studyInfo) {
|
||||
/**
|
||||
* Please override this method on a specialized class.
|
||||
* Get study metadata for a given study info
|
||||
* @param {Object} studyInfo Study info object
|
||||
*/
|
||||
throw new OHIFError('StudyMetadataSource::getByStudyInfo is not overriden. Please, override it in a specialized class. See OHIFStudyMetadataSource for example');
|
||||
}
|
||||
getByStudyInfo(studyInfo) {
|
||||
/**
|
||||
* Please override this method on a specialized class.
|
||||
*/
|
||||
throw new OHIFError('StudyMetadataSource::getByStudyInfo is not overriden. Please, override it in a specialized class. See OHIFStudyMetadataSource for example');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get study metadata for a study with given study InstanceUID
|
||||
* @param {String} studyInstanceUID Study InstanceUID
|
||||
*/
|
||||
getByInstanceUID(studyInstanceUID) {
|
||||
/**
|
||||
* Please override this method on a specialized class.
|
||||
* Get study metadata for a study with given study InstanceUID
|
||||
* @param {String} studyInstanceUID Study InstanceUID
|
||||
*/
|
||||
throw new OHIFError('StudyMetadataSource::getByInstanceUID is not overriden. Please, override it in a specialized class. See OHIFStudyMetadataSource for example');
|
||||
}
|
||||
getByInstanceUID(studyInstanceUID) {
|
||||
/**
|
||||
* Please override this method on a specialized class.
|
||||
*/
|
||||
throw new OHIFError('StudyMetadataSource::getByInstanceUID is not overriden. Please, override it in a specialized class. See OHIFStudyMetadataSource for example');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user