Files
ohif-viewer/extensions/vtk/src/index.js
T

47 lines
1.3 KiB
JavaScript
Raw Normal View History

2020-06-04 06:52:30 -03:00
import React from 'react';
import { asyncComponent, retryImport } from '@ohif/ui';
2019-06-16 23:11:43 -04:00
import commandsModule from './commandsModule.js';
import toolbarModule from './toolbarModule.js';
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';
const OHIFVTKViewport = asyncComponent(() =>
retryImport(() =>
import(/* webpackChunkName: "OHIFVTKViewport" */ './OHIFVTKViewport.js')
)
);
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
getViewportModule({ commandsManager, servicesManager }) {
const ExtendedVTKViewport = props => (
<OHIFVTKViewport
{...props}
servicesManager={servicesManager}
commandsManager={commandsManager}
/>
);
2020-06-04 06:52:30 -03:00
return withCommandsManager(ExtendedVTKViewport, commandsManager);
2019-06-16 23:11:43 -04:00
},
getToolbarModule() {
return toolbarModule;
},
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-08-13 15:36:46 -04:00
export default vtkExtension;
export { vtkExtension };
// loadLocales();