Add HP.getEngine function to get the active hanging protocol engine

This commit is contained in:
Evren Ozkan 2017-12-22 13:40:41 -05:00
parent 9f5e03ab10
commit 5bc294f3a9

View File

@ -40,6 +40,16 @@ HP.setEngine = protocolEngine => {
ProtocolEngine = protocolEngine;
};
/**
* Gets the instantiated ProtocolEngine global object
*
* @returns protocolEngine An instantiated ProtocolEngine linked to a LayoutManager from the
* Viewerbase package
*/
HP.getEngine = () => {
return ProtocolEngine;
};
Meteor.startup(() => {
HP.addCustomViewportSetting('wlPreset', 'Window/Level Preset', Object.create(null), (element, optionValue) => {
if (_.findWhere(OHIF.viewer.wlPresets, { id: optionValue })) {