feat(customization): new customization service api (#4688)
This commit is contained in:
1 parent
fab52808cb
commit
55ad8efbab
124 files changed
+4261
-2517
No files matched your search
@@ -1,69 +0,0 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuLabel,
|
||||
Icons,
|
||||
} from '@ohif/ui-next';
|
||||
|
||||
export const performCustomizations = customizationService => {
|
||||
// Set the custom SegmentationTable
|
||||
customizationService.addModeCustomizations([
|
||||
// To disable editing in the SegmentationTable
|
||||
{
|
||||
id: 'PanelSegmentation.disableEditing',
|
||||
disableEditing: true,
|
||||
},
|
||||
// to only show current study in the panel study browser
|
||||
// {
|
||||
// id: 'PanelStudyBrowser.studyMode',
|
||||
// mode: 'primary',
|
||||
// },
|
||||
// To disable editing in the MeasurementTable
|
||||
// {
|
||||
// id: 'PanelMeasurement.disableEditing',
|
||||
// disableEditing: true,
|
||||
// },
|
||||
// {
|
||||
// id: 'measurementLabels',
|
||||
// labelOnMeasure: true,
|
||||
// exclusive: true,
|
||||
// items: [
|
||||
// { value: 'Head', label: 'Head' },
|
||||
// { value: 'Shoulder', label: 'Shoulder' },
|
||||
// { value: 'Knee', label: 'Knee' },
|
||||
// { value: 'Toe', label: 'Toe' },
|
||||
// ],
|
||||
// },
|
||||
/**
|
||||
* Custom Dropdown Menu Item
|
||||
*/
|
||||
// {
|
||||
// id: 'PanelSegmentation.CustomDropdownMenuContent',
|
||||
// content: ({
|
||||
// activeSegmentation,
|
||||
// onSegmentationAdd,
|
||||
// onSegmentationRemoveFromViewport,
|
||||
// onSegmentationEdit,
|
||||
// onSegmentationDelete,
|
||||
// allowExport,
|
||||
// storeSegmentation,
|
||||
// onSegmentationDownload,
|
||||
// onSegmentationDownloadRTSS,
|
||||
// t,
|
||||
// }) => (
|
||||
// <DropdownMenuContent align="start">
|
||||
// <DropdownMenuItem onClick={() => onSegmentationDelete(activeSegmentation.id)}>
|
||||
// <Icons.Delete className="text-red-600" />
|
||||
// <span className="pl-2 text-red-600">{t('My Custom Dropdown Menu Item')}</span>
|
||||
// </DropdownMenuItem>
|
||||
// </DropdownMenuContent>
|
||||
// ),
|
||||
// },
|
||||
]);
|
||||
};
|
||||
@@ -4,7 +4,6 @@ import { id } from './id';
|
||||
import initToolGroups from './initToolGroups';
|
||||
import toolbarButtons from './toolbarButtons';
|
||||
import moreTools from './moreTools';
|
||||
import { performCustomizations } from './customizations';
|
||||
|
||||
// Allow this mode by excluding non-imaging modalities such as SR, SEG
|
||||
// Also, SM is not a simple imaging modalities, so exclude it.
|
||||
@@ -89,15 +88,12 @@ function modeFactory({ modeConfiguration }) {
|
||||
measurementService,
|
||||
toolbarService,
|
||||
toolGroupService,
|
||||
customizationService,
|
||||
panelService,
|
||||
segmentationService,
|
||||
} = servicesManager.services;
|
||||
|
||||
measurementService.clearMeasurements();
|
||||
|
||||
performCustomizations(customizationService);
|
||||
|
||||
// Init Default and SR ToolGroups
|
||||
initToolGroups(extensionManager, toolGroupService, commandsManager, this.labelConfig);
|
||||
|
||||
|
||||
Reference in new issue
Block a user