From 5bc294f3a92255e332bf7929c2cd711928b9665f Mon Sep 17 00:00:00 2001 From: Evren Ozkan Date: Fri, 22 Dec 2017 13:40:41 -0500 Subject: [PATCH] Add HP.getEngine function to get the active hanging protocol engine --- .../ohif-hanging-protocols/client/protocolEngine.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Packages/ohif-hanging-protocols/client/protocolEngine.js b/Packages/ohif-hanging-protocols/client/protocolEngine.js index d7a0ae776..a652c8824 100644 --- a/Packages/ohif-hanging-protocols/client/protocolEngine.js +++ b/Packages/ohif-hanging-protocols/client/protocolEngine.js @@ -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 })) {