2020-06-04 06:52:30 -03:00
|
|
|
import React from 'react';
|
2020-12-03 09:23:43 -03:00
|
|
|
import { asyncComponent, retryImport } from '@ohif/ui';
|
|
|
|
|
|
2019-06-16 23:11:43 -04:00
|
|
|
import commandsModule from './commandsModule.js';
|
|
|
|
|
import toolbarModule from './toolbarModule.js';
|
2020-01-30 15:26:06 -03:00
|
|
|
import withCommandsManager from './withCommandsManager.js';
|
2020-09-03 12:58:04 +02:00
|
|
|
import { version } from '../package.json';
|
2019-08-13 15:36:46 -04:00
|
|
|
// This feels weird
|
|
|
|
|
// import loadLocales from './loadLocales';
|
2019-06-07 15:35:54 -03:00
|
|
|
|
2019-09-26 11:35:13 +02:00
|
|
|
const OHIFVTKViewport = asyncComponent(() =>
|
2021-01-20 18:05:20 -03:00
|
|
|
retryImport(() =>
|
|
|
|
|
import(/* webpackChunkName: "OHIFVTKViewport" */ './OHIFVTKViewport.js')
|
|
|
|
|
)
|
2019-09-26 11:35:13 +02:00
|
|
|
);
|
|
|
|
|
|
2019-08-13 15:36:46 -04:00
|
|
|
const vtkExtension = {
|
2019-06-16 23:11:43 -04:00
|
|
|
/**
|
|
|
|
|
* Only required property. Should be a unique value across all extensions.
|
|
|
|
|
*/
|
|
|
|
|
id: 'vtk',
|
2020-09-03 12:58:04 +02:00
|
|
|
version,
|
2019-04-16 12:00:06 -04:00
|
|
|
|
2020-08-24 11:44:09 +02:00
|
|
|
getViewportModule({ commandsManager, servicesManager }) {
|
|
|
|
|
const ExtendedVTKViewport = props => (
|
2021-01-20 18:05:20 -03:00
|
|
|
<OHIFVTKViewport
|
|
|
|
|
{...props}
|
|
|
|
|
servicesManager={servicesManager}
|
|
|
|
|
commandsManager={commandsManager}
|
|
|
|
|
/>
|
2020-08-24 11:44:09 +02:00
|
|
|
);
|
2020-06-04 06:52:30 -03:00
|
|
|
return withCommandsManager(ExtendedVTKViewport, commandsManager);
|
2019-06-16 23:11:43 -04:00
|
|
|
},
|
|
|
|
|
getToolbarModule() {
|
|
|
|
|
return toolbarModule;
|
|
|
|
|
},
|
2020-10-13 18:23:14 +02:00
|
|
|
getCommandsModule({ commandsManager, servicesManager }) {
|
|
|
|
|
const { UINotificationService } = servicesManager.services;
|
|
|
|
|
return commandsModule({ commandsManager, UINotificationService });
|
2019-06-20 23:17:07 -04:00
|
|
|
},
|
2019-06-16 23:11:43 -04:00
|
|
|
};
|
2019-06-07 15:35:54 -03:00
|
|
|
|
2019-08-13 15:36:46 -04:00
|
|
|
export default vtkExtension;
|
|
|
|
|
|
|
|
|
|
export { vtkExtension };
|
|
|
|
|
|
|
|
|
|
// loadLocales();
|