feat: explicit layout apply via HangingProtocolService (#2936)
* feat: add more types to HP service * change hp to have apply protocol * feat: mpr initial work * apply protocol by id * feat: mode should be able to apply protocol directly * fix: wrong inheritance for viewports drag and drop * apply review comments
This commit is contained in:
1 parent
fb9744a817
commit
5f480ff746
28 files changed
+705
-226
No files matched your search
@@ -10,7 +10,6 @@ const NON_IMAGE_MODALITIES = ['SM', 'ECG', 'SR', 'SEG'];
|
||||
const ohif = {
|
||||
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
|
||||
sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
|
||||
hangingProtocols: '@ohif/extension-default.hangingProtocolModule.default',
|
||||
};
|
||||
|
||||
const tracked = {
|
||||
@@ -103,6 +102,7 @@ function modeFactory() {
|
||||
'Pan',
|
||||
'Capture',
|
||||
'Layout',
|
||||
'MPR',
|
||||
'MoreTools',
|
||||
]);
|
||||
},
|
||||
@@ -169,7 +169,8 @@ function modeFactory() {
|
||||
},
|
||||
],
|
||||
extensions: extensionDependencies,
|
||||
hangingProtocols: [ohif.hangingProtocols],
|
||||
// Default protocol gets self-registered by default in the init
|
||||
hangingProtocol: 'default',
|
||||
// Order is important in sop class handlers when two handlers both use
|
||||
// the same sop class under different situations. In that case, the more
|
||||
// general handler needs to come last. For this case, the dicomvideo must
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
function initDefaultToolGroup(
|
||||
extensionManager,
|
||||
ToolGroupService,
|
||||
commandsManager
|
||||
commandsManager,
|
||||
toolGroupId
|
||||
) {
|
||||
const utilityModule = extensionManager.getModuleEntry(
|
||||
'@ohif/extension-cornerstone.utilityModule.tools'
|
||||
@@ -57,7 +58,6 @@ function initDefaultToolGroup(
|
||||
},
|
||||
};
|
||||
|
||||
const toolGroupId = 'default';
|
||||
ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools, toolsConfig);
|
||||
}
|
||||
|
||||
@@ -140,8 +140,19 @@ function initSRToolGroup(extensionManager, ToolGroupService, commandsManager) {
|
||||
}
|
||||
|
||||
function initToolGroups(extensionManager, ToolGroupService, commandsManager) {
|
||||
initDefaultToolGroup(extensionManager, ToolGroupService, commandsManager);
|
||||
initDefaultToolGroup(
|
||||
extensionManager,
|
||||
ToolGroupService,
|
||||
commandsManager,
|
||||
'default'
|
||||
);
|
||||
initSRToolGroup(extensionManager, ToolGroupService, commandsManager);
|
||||
initDefaultToolGroup(
|
||||
extensionManager,
|
||||
ToolGroupService,
|
||||
commandsManager,
|
||||
'mpr'
|
||||
);
|
||||
}
|
||||
|
||||
export default initToolGroups;
|
||||
@@ -290,6 +290,23 @@ const toolbarButtons = [
|
||||
columns: 3,
|
||||
},
|
||||
},
|
||||
// Todo: MPR not ready yet for SEG support, not activating it now
|
||||
{
|
||||
id: 'MPR',
|
||||
type: 'ohif.action',
|
||||
props: {
|
||||
icon: 'old-play',
|
||||
label: 'MPR',
|
||||
type: 'action',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'setHangingProtocol',
|
||||
commandOptions: { protocolId: 'mpr' },
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
// More...
|
||||
{
|
||||
id: 'MoreTools',
|
||||
|
||||
Reference in new issue
Block a user