Fixing W/L presets, Non-Targets, CR and UN issues

This commit is contained in:
Bruno Alves de Faria 2017-07-27 17:40:21 -03:00
parent 88df0e54f2
commit d49698d42e
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,25 @@
import { Meteor } from 'meteor/meteor';
import { _ } from 'meteor/underscore';
import { OHIF } from 'meteor/ohif:core';
Meteor.startup(() => {
// Enable the custom tools
const customTools = [{
id: 'nonTarget',
name: 'Non-Target'
}, {
id: 'targetCR',
name: 'CR Target'
}, {
id: 'targetUN',
name: 'UN Target'
}];
customTools.forEach(tool => {
_.defaults(OHIF.hotkeys.defaults.viewer, { [tool.id]: '' });
OHIF.commands.register('viewer', tool.id, {
name: tool.name,
action: () => OHIF.viewerbase.toolManager.setActiveTool(tool.id)
});
});
});

View File

@ -205,6 +205,7 @@ class WindowLevelPresetsManager {
const WLPresets = new WindowLevelPresetsManager();
Meteor.startup(() => {
WLPresets.loadDefaults();
WLPresets.load();
});