OHIF with Cornerstone3D 2.0 (#4347)
This commit is contained in:
1 parent
8981a61b8c
commit
7ce7127d7c
803 files changed
+32760
-15893
No files matched your search
@@ -72,7 +72,10 @@ function modeFactory({ modeConfiguration }) {
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
|
||||
@@ -42,7 +42,10 @@ const dicompdf = {
|
||||
const dicomSeg = {
|
||||
sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
|
||||
viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',
|
||||
panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
|
||||
};
|
||||
|
||||
const cornerstone = {
|
||||
panel: '@ohif/extension-cornerstone.panelModule.panelSegmentation',
|
||||
};
|
||||
|
||||
const dicomPmap = {
|
||||
@@ -147,7 +150,7 @@ function modeFactory() {
|
||||
// leftPanels: [ohif.thumbnailList],
|
||||
// rightPanels: [dicomSeg.panel, ohif.measurements],
|
||||
leftPanels: [tracked.thumbnailList],
|
||||
rightPanels: [dicomSeg.panel, tracked.measurements],
|
||||
rightPanels: [cornerstone.panel, tracked.measurements],
|
||||
// rightPanelClosed: true, // optional prop to start with collapse panels
|
||||
viewports: [
|
||||
{
|
||||
|
||||
@@ -31,7 +31,10 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
@@ -62,7 +65,6 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
|
||||
{ toolName: toolNames.Angle },
|
||||
{ toolName: toolNames.CobbAngle },
|
||||
{ toolName: toolNames.Magnify },
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
{ toolName: toolNames.WindowLevelRegion },
|
||||
{ toolName: toolNames.UltrasoundDirectional },
|
||||
{ toolName: toolNames.PlanarFreehandROI },
|
||||
@@ -116,8 +118,8 @@ function initSRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
||||
],
|
||||
},
|
||||
{
|
||||
toolName: toolNames.StackScrollMouseWheel,
|
||||
bindings: [],
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
@@ -165,7 +167,10 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
@@ -194,7 +199,6 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
||||
{ toolName: toolNames.RectangleROI },
|
||||
{ toolName: toolNames.StackScroll },
|
||||
{ toolName: toolNames.Angle },
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
{ toolName: toolNames.WindowLevelRegion },
|
||||
{ toolName: toolNames.PlanarFreehandROI },
|
||||
{ toolName: toolNames.SplineROI },
|
||||
|
||||
@@ -68,7 +68,7 @@ const moreTools = [
|
||||
},
|
||||
},
|
||||
listeners: {
|
||||
[EVENTS.STACK_VIEWPORT_NEW_STACK]: {
|
||||
[EVENTS.VIEWPORT_NEW_IMAGE_SET]: {
|
||||
commandName: 'toggleImageSliceSync',
|
||||
commandOptions: { toggledState: true },
|
||||
},
|
||||
@@ -188,7 +188,13 @@ const moreTools = [
|
||||
label: 'Ultrasound Directional',
|
||||
tooltip: 'Ultrasound Directional',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: ['evaluate.cornerstoneTool', 'evaluate.isUS'],
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool',
|
||||
{
|
||||
name: 'evaluate.modality.supported',
|
||||
supportedModalities: ['US'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'WindowLevelRegion',
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
export const performCustomizations = customizationService => {
|
||||
// Set the custom SegmentationTable
|
||||
customizationService.addModeCustomizations([
|
||||
// To disable editing in the SegmentationTable
|
||||
{
|
||||
id: 'PanelSegmentation.disableEditing',
|
||||
disableEditing: true,
|
||||
},
|
||||
// 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' },
|
||||
// ],
|
||||
// },
|
||||
]);
|
||||
};
|
||||
@@ -4,6 +4,7 @@ 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.
|
||||
@@ -15,7 +16,11 @@ const ohif = {
|
||||
thumbnailList: '@ohif/extension-default.panelModule.seriesList',
|
||||
wsiSopClassHandler:
|
||||
'@ohif/extension-cornerstone.sopClassHandlerModule.DicomMicroscopySopClassHandler',
|
||||
measurements: '@ohif/extension-default.panelModule.measurements',
|
||||
};
|
||||
|
||||
const cornerstone = {
|
||||
measurements: '@ohif/extension-cornerstone.panelModule.measurements',
|
||||
segmentation: '@ohif/extension-cornerstone.panelModule.panelSegmentation',
|
||||
};
|
||||
|
||||
const tracked = {
|
||||
@@ -43,7 +48,6 @@ const dicompdf = {
|
||||
const dicomSeg = {
|
||||
sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
|
||||
viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',
|
||||
panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
|
||||
};
|
||||
|
||||
const dicomPmap = {
|
||||
@@ -86,19 +90,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
|
||||
measurementService.clearMeasurements();
|
||||
|
||||
// customizationService.addModeCustomizations([
|
||||
// {
|
||||
// id: 'measurementLabels',
|
||||
// labelOnMeasure: true,
|
||||
// exclusive: true,
|
||||
// items: [
|
||||
// { value: 'Head', label: 'Head' },
|
||||
// { value: 'Shoulder', label: 'Shoulder' },
|
||||
// { value: 'Knee', label: 'Knee' },
|
||||
// { value: 'Toe', label: 'Toe' },
|
||||
// ],
|
||||
// },
|
||||
// ]);
|
||||
performCustomizations(customizationService);
|
||||
|
||||
// Init Default and SR ToolGroups
|
||||
initToolGroups(extensionManager, toolGroupService, commandsManager, this.labelConfig);
|
||||
@@ -116,13 +108,6 @@ function modeFactory({ modeConfiguration }) {
|
||||
'MoreTools',
|
||||
]);
|
||||
|
||||
customizationService.addModeCustomizations([
|
||||
{
|
||||
id: 'segmentation.panel',
|
||||
disableEditing: true,
|
||||
},
|
||||
]);
|
||||
|
||||
// // ActivatePanel event trigger for when a segmentation or measurement is added.
|
||||
// // Do not force activation so as to respect the state the user may have left the UI in.
|
||||
// _activatePanelTriggersSubscriptions = [
|
||||
@@ -192,7 +177,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
id: ohif.layout,
|
||||
props: {
|
||||
leftPanels: [tracked.thumbnailList],
|
||||
rightPanels: [dicomSeg.panel, tracked.measurements],
|
||||
rightPanels: [cornerstone.segmentation, tracked.measurements],
|
||||
rightPanelClosed: true,
|
||||
viewports: [
|
||||
{
|
||||
|
||||
@@ -39,7 +39,10 @@ function initDefaultToolGroup(
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
@@ -77,7 +80,6 @@ function initDefaultToolGroup(
|
||||
{ toolName: toolNames.Angle },
|
||||
{ toolName: toolNames.CobbAngle },
|
||||
{ toolName: toolNames.Magnify },
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
{ toolName: toolNames.CalibrationLine },
|
||||
{
|
||||
toolName: toolNames.PlanarFreehandContourSegmentation,
|
||||
@@ -150,8 +152,8 @@ function initSRToolGroup(extensionManager, toolGroupService) {
|
||||
],
|
||||
},
|
||||
{
|
||||
toolName: toolNames.StackScrollMouseWheel,
|
||||
bindings: [],
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
@@ -163,12 +165,6 @@ function initSRToolGroup(extensionManager, toolGroupService) {
|
||||
{ toolName: SRToolNames.SRPlanarFreehandROI },
|
||||
{ toolName: SRToolNames.SRRectangleROI },
|
||||
{ toolName: toolNames.WindowLevelRegion },
|
||||
{
|
||||
toolName: SRToolNames.SRPlanarFreehandContourSegmentation,
|
||||
configuration: {
|
||||
displayOnePointAsCrosshairs: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
enabled: [
|
||||
{
|
||||
@@ -206,7 +202,10 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager, m
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
@@ -244,7 +243,6 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager, m
|
||||
{ toolName: toolNames.Angle },
|
||||
{ toolName: toolNames.CobbAngle },
|
||||
{ toolName: toolNames.PlanarFreehandROI },
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
{ toolName: toolNames.WindowLevelRegion },
|
||||
{
|
||||
toolName: toolNames.PlanarFreehandContourSegmentation,
|
||||
|
||||
@@ -46,7 +46,13 @@ const moreTools = [
|
||||
label: 'Rotate Right',
|
||||
tooltip: 'Rotate +90',
|
||||
commands: 'rotateViewportCW',
|
||||
evaluate: 'evaluate.action',
|
||||
evaluate: [
|
||||
'evaluate.action',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'flipHorizontal',
|
||||
@@ -54,7 +60,13 @@ const moreTools = [
|
||||
label: 'Flip Horizontal',
|
||||
tooltip: 'Flip Horizontally',
|
||||
commands: 'flipViewportHorizontal',
|
||||
evaluate: ['evaluate.viewportProperties.toggle', 'evaluate.not3D'],
|
||||
evaluate: [
|
||||
'evaluate.viewportProperties.toggle',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video', 'volume3d'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'ImageSliceSync',
|
||||
@@ -68,12 +80,18 @@ const moreTools = [
|
||||
},
|
||||
},
|
||||
listeners: {
|
||||
[EVENTS.STACK_VIEWPORT_NEW_STACK]: {
|
||||
[EVENTS.VIEWPORT_NEW_IMAGE_SET]: {
|
||||
commandName: 'toggleImageSliceSync',
|
||||
commandOptions: { toggledState: true },
|
||||
},
|
||||
},
|
||||
evaluate: ['evaluate.cornerstone.synchronizer', 'evaluate.not3D'],
|
||||
evaluate: [
|
||||
'evaluate.cornerstone.synchronizer',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video', 'volume3d'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'ReferenceLines',
|
||||
@@ -85,7 +103,13 @@ const moreTools = [
|
||||
[ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesListeners,
|
||||
[ViewportGridService.EVENTS.VIEWPORTS_READY]: ReferenceLinesListeners,
|
||||
},
|
||||
evaluate: 'evaluate.cornerstoneTool.toggle',
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool.toggle',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'ImageOverlayViewer',
|
||||
@@ -93,7 +117,13 @@ const moreTools = [
|
||||
label: 'Image Overlay',
|
||||
tooltip: 'Toggle Image Overlay',
|
||||
commands: 'toggleEnabledDisabledToolbar',
|
||||
evaluate: 'evaluate.cornerstoneTool.toggle',
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool.toggle',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'StackScroll',
|
||||
@@ -109,7 +139,13 @@ const moreTools = [
|
||||
label: 'Invert',
|
||||
tooltip: 'Invert Colors',
|
||||
commands: 'invertViewport',
|
||||
evaluate: 'evaluate.viewportProperties.toggle',
|
||||
evaluate: [
|
||||
'evaluate.viewportProperties.toggle',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'Probe',
|
||||
@@ -125,7 +161,13 @@ const moreTools = [
|
||||
label: 'Cine',
|
||||
tooltip: 'Cine',
|
||||
commands: 'toggleCine',
|
||||
evaluate: ['evaluate.cine', 'evaluate.not3D'],
|
||||
evaluate: [
|
||||
'evaluate.cine',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['volume3d'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'Angle',
|
||||
@@ -149,7 +191,13 @@ const moreTools = [
|
||||
label: 'Zoom-in',
|
||||
tooltip: 'Zoom-in',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'CalibrationLine',
|
||||
@@ -157,7 +205,13 @@ const moreTools = [
|
||||
label: 'Calibration',
|
||||
tooltip: 'Calibration Line',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'TagBrowser',
|
||||
@@ -172,7 +226,13 @@ const moreTools = [
|
||||
label: 'Magnify Probe',
|
||||
tooltip: 'Magnify Probe',
|
||||
commands: 'toggleActiveDisabledToolbar',
|
||||
evaluate: 'evaluate.cornerstoneTool.toggle.ifStrictlyDisabled',
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool.toggle.ifStrictlyDisabled',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'UltrasoundDirectionalTool',
|
||||
@@ -180,7 +240,13 @@ const moreTools = [
|
||||
label: 'Ultrasound Directional',
|
||||
tooltip: 'Ultrasound Directional',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: ['evaluate.cornerstoneTool', 'evaluate.isUS'],
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool',
|
||||
{
|
||||
name: 'evaluate.modality.supported',
|
||||
supportedModalities: ['US'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'WindowLevelRegion',
|
||||
@@ -188,7 +254,13 @@ const moreTools = [
|
||||
label: 'Window Level Region',
|
||||
tooltip: 'Window Level Region',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
@@ -126,7 +126,13 @@ const toolbarButtons: Button[] = [
|
||||
icon: 'tool-window-level',
|
||||
label: 'Window Level',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['wholeSlide'],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
// Pan...
|
||||
@@ -162,7 +168,13 @@ const toolbarButtons: Button[] = [
|
||||
icon: 'tool-capture',
|
||||
label: 'Capture',
|
||||
commands: 'showDownloadViewportModal',
|
||||
evaluate: 'evaluate.action',
|
||||
evaluate: [
|
||||
'evaluate.action',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['video'],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -2,12 +2,11 @@ const dynamicVolume = {
|
||||
sopClassHandler:
|
||||
'@ohif/extension-cornerstone-dynamic-volume.sopClassHandlerModule.dynamic-volume',
|
||||
leftPanel: '@ohif/extension-cornerstone-dynamic-volume.panelModule.dynamic-volume',
|
||||
toolBox: '@ohif/extension-cornerstone-dynamic-volume.panelModule.dynamic-toolbox',
|
||||
export: '@ohif/extension-cornerstone-dynamic-volume.panelModule.dynamic-export',
|
||||
segmentation: '@ohif/extension-cornerstone-dynamic-volume.panelModule.dynamic-segmentation',
|
||||
};
|
||||
|
||||
const cornerstone = {
|
||||
segmentation: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
|
||||
segmentation: '@ohif/extension-cornerstone.panelModule.panelSegmentationNoHeader',
|
||||
activeViewportWindowLevel: '@ohif/extension-cornerstone.panelModule.activeViewportWindowLevel',
|
||||
};
|
||||
|
||||
@@ -60,7 +59,7 @@ function getWorkflowSettings({ servicesManager }) {
|
||||
layout: {
|
||||
panels: {
|
||||
left: defaultLeftPanel,
|
||||
right: [[dynamicVolume.toolBox, cornerstone.segmentation, dynamicVolume.export]],
|
||||
right: [[dynamicVolume.segmentation]],
|
||||
},
|
||||
options: {
|
||||
leftPanelClosed: false,
|
||||
|
||||
@@ -36,7 +36,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
return {
|
||||
id,
|
||||
routeName: 'dynamic-volume',
|
||||
displayName: '4D PT/CT',
|
||||
displayName: 'Preclinical 4D',
|
||||
onModeEnter: function ({ servicesManager, extensionManager, commandsManager }: withAppTypes) {
|
||||
const {
|
||||
measurementService,
|
||||
@@ -64,11 +64,31 @@ function modeFactory({ modeConfiguration }) {
|
||||
// specific to the step
|
||||
customizationService.addModeCustomizations([
|
||||
{
|
||||
id: 'segmentation.panel',
|
||||
segmentationPanelMode: 'expanded',
|
||||
addSegment: false,
|
||||
id: 'PanelSegmentation.tableMode',
|
||||
mode: 'expanded',
|
||||
},
|
||||
{
|
||||
id: 'PanelSegmentation.onSegmentationAdd',
|
||||
onSegmentationAdd: () => {
|
||||
commandsManager.run('createNewLabelmapFromPT');
|
||||
commandsManager.run('createNewLabelMapForDynamicVolume');
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'PanelSegmentation.showAddSegment',
|
||||
showAddSegment: false,
|
||||
},
|
||||
{
|
||||
id: 'PanelSegmentation.readableText',
|
||||
// remove following if you are not interested in that stats
|
||||
readableText: {
|
||||
lesionStats: 'Lesion Statistics',
|
||||
minValue: 'Minimum Value',
|
||||
maxValue: 'Maximum Value',
|
||||
meanValue: 'Mean Value',
|
||||
volume: 'Volume',
|
||||
suvPeak: 'SUV Peak',
|
||||
suvMax: 'Maximum SUV',
|
||||
suvMaxIJK: 'SUV Max IJK',
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -33,7 +33,10 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, se
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
@@ -100,9 +103,8 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, se
|
||||
{ toolName: toolNames.SphereScissors },
|
||||
{ toolName: toolNames.StackScroll },
|
||||
{ toolName: toolNames.Magnify },
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
],
|
||||
enabled: [{ toolName: toolNames.SegmentationDisplay }],
|
||||
enabled: [],
|
||||
disabled: [
|
||||
{
|
||||
toolName: toolNames.Crosshairs,
|
||||
|
||||
@@ -4,9 +4,6 @@ import toolbarButtons from './toolbarButtons';
|
||||
import segmentationButtons from './segmentationButtons';
|
||||
import initToolGroups from './initToolGroups';
|
||||
|
||||
const DEFAULT_TOOL_GROUP_ID = 'default';
|
||||
const VOLUME3D_TOOL_GROUP_ID = 'volume3d';
|
||||
|
||||
const ohif = {
|
||||
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
|
||||
sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
|
||||
@@ -17,11 +14,10 @@ const ohif = {
|
||||
|
||||
const cornerstone = {
|
||||
viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',
|
||||
panelTool: '@ohif/extension-cornerstone.panelModule.panelSegmentationWithTools',
|
||||
};
|
||||
|
||||
const segmentation = {
|
||||
panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
|
||||
panelTool: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools',
|
||||
sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
|
||||
viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',
|
||||
};
|
||||
@@ -80,7 +76,6 @@ function modeFactory({ modeConfiguration }) {
|
||||
const {
|
||||
toolGroupService,
|
||||
syncGroupService,
|
||||
toolbarService,
|
||||
segmentationService,
|
||||
cornerstoneViewportService,
|
||||
uiDialogService,
|
||||
@@ -111,10 +106,10 @@ function modeFactory({ modeConfiguration }) {
|
||||
return {
|
||||
valid:
|
||||
modalitiesArray.length === 1
|
||||
? !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalitiesArray[0])
|
||||
? !['SM', 'ECG', 'OT', 'DOC'].includes(modalitiesArray[0])
|
||||
: true,
|
||||
description:
|
||||
'The mode does not support studies that ONLY include the following modalities: SM, US, MG, OT, DOC, CR',
|
||||
'The mode does not support studies that ONLY include the following modalities: SM, OT, DOC',
|
||||
};
|
||||
},
|
||||
/**
|
||||
@@ -137,7 +132,8 @@ function modeFactory({ modeConfiguration }) {
|
||||
id: ohif.layout,
|
||||
props: {
|
||||
leftPanels: [ohif.leftPanel],
|
||||
rightPanels: [segmentation.panelTool],
|
||||
rightPanels: [cornerstone.panelTool],
|
||||
leftPanelClosed: true,
|
||||
viewports: [
|
||||
{
|
||||
namespace: cornerstone.viewport,
|
||||
|
||||
@@ -17,7 +17,7 @@ function createTools(utilityModule) {
|
||||
{ toolName: toolNames.WindowLevel, bindings: [{ mouseButton: Enums.MouseBindings.Primary }] },
|
||||
{ toolName: toolNames.Pan, bindings: [{ mouseButton: Enums.MouseBindings.Auxiliary }] },
|
||||
{ toolName: toolNames.Zoom, bindings: [{ mouseButton: Enums.MouseBindings.Secondary }] },
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{ toolName: toolNames.StackScroll, bindings: [{ mouseButton: Enums.MouseBindings.Wheel }] },
|
||||
],
|
||||
passive: [
|
||||
{
|
||||
@@ -86,7 +86,6 @@ function createTools(utilityModule) {
|
||||
{ toolName: toolNames.SphereScissors },
|
||||
{ toolName: toolNames.StackScroll },
|
||||
{ toolName: toolNames.Magnify },
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
{ toolName: toolNames.WindowLevelRegion },
|
||||
|
||||
{ toolName: toolNames.UltrasoundDirectional },
|
||||
|
||||
@@ -142,7 +142,13 @@ const toolbarButtons: Button[] = [
|
||||
label: 'Flip Horizontal',
|
||||
tooltip: 'Flip Horizontally',
|
||||
commands: 'flipViewportHorizontal',
|
||||
evaluate: ['evaluate.viewportProperties.toggle', 'evaluate.not3D'],
|
||||
evaluate: [
|
||||
'evaluate.viewportProperties.toggle',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['volume3d'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'ReferenceLines',
|
||||
@@ -194,7 +200,13 @@ const toolbarButtons: Button[] = [
|
||||
label: 'Cine',
|
||||
tooltip: 'Cine',
|
||||
commands: 'toggleCine',
|
||||
evaluate: ['evaluate.cine', 'evaluate.not3D'],
|
||||
evaluate: [
|
||||
'evaluate.cine',
|
||||
{
|
||||
name: 'evaluate.viewport.supported',
|
||||
unsupportedViewportTypes: ['volume3d'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'Angle',
|
||||
@@ -249,7 +261,13 @@ const toolbarButtons: Button[] = [
|
||||
label: 'Ultrasound Directional',
|
||||
tooltip: 'Ultrasound Directional',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: ['evaluate.cornerstoneTool', 'evaluate.isUS'],
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool',
|
||||
{
|
||||
name: 'evaluate.modality.supported',
|
||||
supportedModalities: ['US'],
|
||||
},
|
||||
],
|
||||
}),
|
||||
createButton({
|
||||
id: 'WindowLevelRegion',
|
||||
|
||||
+24
-8
@@ -11,20 +11,19 @@ const { MetadataProvider } = classes;
|
||||
const ohif = {
|
||||
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
|
||||
sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
|
||||
measurements: '@ohif/extension-default.panelModule.measure',
|
||||
thumbnailList: '@ohif/extension-default.panelModule.seriesList',
|
||||
};
|
||||
|
||||
const cs3d = {
|
||||
viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',
|
||||
segPanel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
|
||||
segPanel: '@ohif/extension-cornerstone.panelModule.panelSegmentationNoHeader',
|
||||
measurements: '@ohif/extension-cornerstone.panelModule.measurements',
|
||||
};
|
||||
|
||||
const tmtv = {
|
||||
hangingProtocol: '@ohif/extension-tmtv.hangingProtocolModule.ptCT',
|
||||
petSUV: '@ohif/extension-tmtv.panelModule.petSUV',
|
||||
toolbox: '@ohif/extension-tmtv.panelModule.tmtvBox',
|
||||
export: '@ohif/extension-tmtv.panelModule.tmtvExport',
|
||||
tmtv: '@ohif/extension-tmtv.panelModule.tmtv',
|
||||
};
|
||||
|
||||
const extensionDependencies = {
|
||||
@@ -104,13 +103,30 @@ function modeFactory({ modeConfiguration }) {
|
||||
|
||||
customizationService.addModeCustomizations([
|
||||
{
|
||||
id: 'segmentation.panel',
|
||||
segmentationPanelMode: 'expanded',
|
||||
addSegment: false,
|
||||
id: 'PanelSegmentation.tableMode',
|
||||
mode: 'expanded',
|
||||
},
|
||||
{
|
||||
id: 'PanelSegmentation.onSegmentationAdd',
|
||||
onSegmentationAdd: () => {
|
||||
commandsManager.run('createNewLabelmapFromPT');
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'PanelSegmentation.readableText',
|
||||
// remove following if you are not interested in that stats
|
||||
readableText: {
|
||||
lesionStats: 'Lesion Statistics',
|
||||
minValue: 'Minimum Value',
|
||||
maxValue: 'Maximum Value',
|
||||
meanValue: 'Mean Value',
|
||||
volume: 'Volume',
|
||||
suvPeak: 'SUV Peak',
|
||||
suvMax: 'Maximum SUV',
|
||||
suvMaxIJK: 'SUV Max IJK',
|
||||
lesionGlyoclysisStats: 'Lesion Glycolysis',
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
// For the hanging protocol we need to decide on the window level
|
||||
@@ -200,7 +216,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
props: {
|
||||
leftPanels: [ohif.thumbnailList],
|
||||
leftPanelClosed: true,
|
||||
rightPanels: [[tmtv.toolbox, cs3d.segPanel, tmtv.export], tmtv.petSUV],
|
||||
rightPanels: [tmtv.tmtv, tmtv.petSUV],
|
||||
viewports: [
|
||||
{
|
||||
namespace: cs3d.viewport,
|
||||
|
||||
@@ -6,14 +6,7 @@ export const toolGroupIds = {
|
||||
default: 'default',
|
||||
};
|
||||
|
||||
function _initToolGroups(
|
||||
toolNames,
|
||||
Enums,
|
||||
toolGroupService,
|
||||
commandsManager,
|
||||
modeLabelConfig,
|
||||
servicesManager
|
||||
) {
|
||||
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
|
||||
const tools = {
|
||||
active: [
|
||||
{
|
||||
@@ -28,7 +21,10 @@ function _initToolGroups(
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
@@ -127,7 +123,7 @@ function _initToolGroups(
|
||||
},
|
||||
},
|
||||
],
|
||||
enabled: [{ toolName: toolNames.SegmentationDisplay }],
|
||||
enabled: [],
|
||||
disabled: [
|
||||
{
|
||||
toolName: toolNames.Crosshairs,
|
||||
@@ -155,7 +151,8 @@ function _initToolGroups(
|
||||
const mipTools = {
|
||||
active: [
|
||||
{
|
||||
toolName: toolNames.VolumeRotateMouseWheel,
|
||||
toolName: toolNames.VolumeRotate,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
configuration: {
|
||||
rotateIncrementDegrees: 5,
|
||||
},
|
||||
@@ -169,7 +166,6 @@ function _initToolGroups(
|
||||
},
|
||||
],
|
||||
enabled: [
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
{
|
||||
toolName: toolNames.OrientationMarker,
|
||||
configuration: {
|
||||
@@ -184,22 +180,8 @@ function _initToolGroups(
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
|
||||
}
|
||||
|
||||
function initToolGroups(
|
||||
toolNames,
|
||||
Enums,
|
||||
toolGroupService,
|
||||
commandsManager,
|
||||
modeLabelConfig,
|
||||
servicesManager
|
||||
) {
|
||||
_initToolGroups(
|
||||
toolNames,
|
||||
Enums,
|
||||
toolGroupService,
|
||||
commandsManager,
|
||||
modeLabelConfig,
|
||||
servicesManager
|
||||
);
|
||||
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
|
||||
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig);
|
||||
}
|
||||
|
||||
export default initToolGroups;
|
||||
@@ -7,6 +7,7 @@ export default function setFusionActiveVolume(
|
||||
displaySetService
|
||||
) {
|
||||
const matchDetails = matches.get('ptDisplaySet');
|
||||
const matchDetails2 = matches.get('ctDisplaySet');
|
||||
|
||||
if (!matchDetails) {
|
||||
return;
|
||||
@@ -32,10 +33,13 @@ export default function setFusionActiveVolume(
|
||||
|
||||
// Todo: this should not take into account the loader id
|
||||
const volumeId = `cornerstoneStreamingImageVolume:${displaySets[0].displaySetInstanceUID}`;
|
||||
const { SeriesInstanceUID: SeriesInstanceUID2 } = matchDetails2;
|
||||
const ctDisplaySets = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID2);
|
||||
const ctVolumeId = `cornerstoneStreamingImageVolume:${ctDisplaySets[0].displaySetInstanceUID}`;
|
||||
|
||||
const windowLevelConfig = {
|
||||
...wlToolConfig,
|
||||
volumeId,
|
||||
volumeId: ctVolumeId,
|
||||
};
|
||||
|
||||
const ellipticalROIConfig = {
|
||||
|
||||
Reference in new issue
Block a user