2020-05-07 18:16:44 +02:00
|
|
|
export default function mode({ modeConfiguration }) {
|
|
|
|
|
return {
|
|
|
|
|
id: 'example-mode',
|
2020-06-17 04:06:54 +02:00
|
|
|
displayName: 'Basic Viewer',
|
2020-05-07 18:16:44 +02:00
|
|
|
validationTags: {
|
|
|
|
|
study: [],
|
|
|
|
|
series: [],
|
|
|
|
|
},
|
|
|
|
|
isValidMode: (studyTags, seriesTags) => {
|
|
|
|
|
// All series are welcome in this mode!
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
routes: [
|
|
|
|
|
{
|
|
|
|
|
path: 'viewer',
|
2020-05-19 11:01:44 +02:00
|
|
|
init: ({ servicesManager, extensionManager }) => {
|
|
|
|
|
const { ToolBarService } = servicesManager.services;
|
|
|
|
|
ToolBarService.init(extensionManager);
|
|
|
|
|
ToolBarService.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-06-15 05:42:44 +02:00
|
|
|
// ToolBarService.setToolBarLayout([
|
|
|
|
|
// // Primary
|
|
|
|
|
// {
|
|
|
|
|
// tools: ['Zoom', 'Levels', 'Pan', 'Capture', 'Layout'],
|
|
|
|
|
// moreTools: ['Zoom'],
|
|
|
|
|
// },
|
|
|
|
|
// // Secondary
|
|
|
|
|
// {
|
|
|
|
|
// tools: ['Annotate', 'Bidirectional', 'Ellipse', 'Length'],
|
|
|
|
|
// },
|
|
|
|
|
// ]);
|
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: [
|
|
|
|
|
{
|
2020-05-15 19:07:21 +02:00
|
|
|
namespace: 'org.ohif.cornerstone.viewportModule.cornerstone',
|
2020-05-12 21:41:11 +02:00
|
|
|
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({});
|