OHIF with Cornerstone3D 2.0 (#4347)

This commit is contained in:
Alireza authored and GitHub committed 2024-11-06 07:15:27 -05:00
1 parent 8981a61b8c
commit 7ce7127d7c
803 files changed
+32760 -15893

No files matched your search

+5 -9
View File
@@ -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,
+1 -2
View File
@@ -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 },
+21 -3
View File
@@ -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',