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:29:20 +02:00
|
|
|
init: ({ toolBarManager }) => {
|
|
|
|
|
toolBarManager.addButtons([
|
2020-05-13 12:06:13 +02:00
|
|
|
{
|
|
|
|
|
id: 'Zoom',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Zoom',
|
|
|
|
|
},
|
2020-05-13 14:22:08 +02:00
|
|
|
{
|
|
|
|
|
id: 'Levels',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Wwwc',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'Pan',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Pan',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'Capture',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Capture',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'Layout',
|
|
|
|
|
namespace: 'org.ohif.default.toolbarModule.Layout',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'Annotate',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Annotate',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'Bidirectional',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Bidirectional',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'Ellipse',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Ellipse',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'Length',
|
|
|
|
|
namespace: 'org.ohif.cornerstone.toolbarModule.Length',
|
|
|
|
|
},
|
2020-05-13 12:06:13 +02:00
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
// Could import layout selector here from org.ohif.default (when it exists!)
|
2020-05-13 12:29:20 +02:00
|
|
|
toolBarManager.setToolBarLayout([
|
2020-05-13 12:06:13 +02:00
|
|
|
// Primary
|
2020-05-13 13:00:23 +02:00
|
|
|
{
|
2020-05-13 14:22:08 +02:00
|
|
|
tools: ['Zoom', 'Levels', 'Pan', 'Capture', 'Layout'],
|
2020-05-13 17:37:27 +02:00
|
|
|
moreTools: ['Zoom'],
|
2020-05-13 13:00:23 +02:00
|
|
|
},
|
2020-05-13 12:06:13 +02:00
|
|
|
// Secondary
|
2020-05-13 13:00:23 +02:00
|
|
|
{
|
2020-05-13 14:22:08 +02:00
|
|
|
tools: ['Annotate', 'Bidirectional', 'Ellipse', 'Length'],
|
2020-05-13 13:00:23 +02:00
|
|
|
},
|
2020-05-13 12:06:13 +02:00
|
|
|
]);
|
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({});
|