2020-05-07 18:16:44 +02:00
|
|
|
export default function mode({ modeConfiguration }) {
|
|
|
|
|
return {
|
|
|
|
|
id: 'example-mode',
|
|
|
|
|
validationTags: {
|
|
|
|
|
study: [],
|
|
|
|
|
series: [],
|
|
|
|
|
},
|
|
|
|
|
isValidMode: (studyTags, seriesTags) => {
|
|
|
|
|
// All series are welcome in this mode!
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
routes: [
|
|
|
|
|
{
|
|
|
|
|
path: 'viewer',
|
2020-05-13 12:06:13 +02:00
|
|
|
init: ({ toolbarManager }) => {
|
|
|
|
|
toolbarManager.addButtons([
|
|
|
|
|
{
|
|
|
|
|
id: 'StackScroll', // If id not given will use default in button definition.
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.StackScroll',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'Zoom',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Zoom',
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
// Could import layout selector here from org.ohif.default (when it exists!)
|
|
|
|
|
toolbarManager.setToolBarLayout([
|
|
|
|
|
// Primary
|
|
|
|
|
['StackScroll', { label: 'More', subMenu: ['Zoom'] }],
|
|
|
|
|
// Secondary
|
|
|
|
|
['StackScroll'],
|
|
|
|
|
]);
|
2020-05-07 18:16:44 +02:00
|
|
|
},
|
|
|
|
|
layoutTemplate: ({ routeProps }) => {
|
|
|
|
|
return {
|
2020-05-09 20:23:43 +02:00
|
|
|
id: 'org.ohif.default.layoutTemplateModule.viewerLayout',
|
2020-05-07 18:16:44 +02:00
|
|
|
props: {
|
|
|
|
|
// named slots
|
2020-05-09 20:23:43 +02:00
|
|
|
leftPanels: ['org.ohif.default.panelModule.seriesList'],
|
|
|
|
|
rightPanels: ['org.ohif.default.panelModule.measure'],
|
2020-05-12 21:41:11 +02:00
|
|
|
viewports: [
|
|
|
|
|
{
|
|
|
|
|
namespace:
|
|
|
|
|
'org.ohif.cornerstone.viewportModule.OHIFCornerstoneViewport',
|
|
|
|
|
displaySetsToDisplay: [
|
|
|
|
|
'org.ohif.default.sopClassHandlerModule.stack',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
2020-05-07 18:16:44 +02:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
2020-05-09 20:23:43 +02:00
|
|
|
extensions: ['org.ohif.default', 'org.ohif.cornerstone'],
|
|
|
|
|
sopClassHandlers: ['org.ohif.default.sopClassHandlerModule.stack'],
|
2020-05-07 18:16:44 +02:00
|
|
|
};
|
|
|
|
|
}
|
2020-05-09 10:57:52 +02:00
|
|
|
|
|
|
|
|
window.exampleMode = mode({});
|