feat(segmentation): segment statistics, labelmap interpolation and segment bidirectional (#4865)
This commit is contained in:
1 parent
694f3e9611
commit
ec79b5523e
73 files changed
+3603
-1563
No files matched your search
@@ -214,7 +214,7 @@ const toolbarButtons: Button[] = [
|
||||
protocolId: 'mpr',
|
||||
},
|
||||
},
|
||||
evaluate: 'evaluate.mpr',
|
||||
evaluate: 'evaluate.displaySetIsReconstructable',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ const ohif = {
|
||||
const cornerstone = {
|
||||
viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',
|
||||
panelTool: '@ohif/extension-cornerstone.panelModule.panelSegmentationWithTools',
|
||||
measurements: '@ohif/extension-cornerstone.panelModule.panelMeasurement',
|
||||
};
|
||||
|
||||
const segmentation = {
|
||||
@@ -19,6 +20,10 @@ const segmentation = {
|
||||
viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',
|
||||
};
|
||||
|
||||
const dicomRT = {
|
||||
viewport: '@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt',
|
||||
sopClassHandler: '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt',
|
||||
};
|
||||
/**
|
||||
* Just two dependencies to be able to render a viewport with panels in order
|
||||
* to make sure that the mode is working.
|
||||
@@ -27,6 +32,7 @@ const extensionDependencies = {
|
||||
'@ohif/extension-default': '^3.0.0',
|
||||
'@ohif/extension-cornerstone': '^3.0.0',
|
||||
'@ohif/extension-cornerstone-dicom-seg': '^3.0.0',
|
||||
'@ohif/extension-cornerstone-dicom-rt': '^3.0.0',
|
||||
};
|
||||
|
||||
function modeFactory({ modeConfiguration }) {
|
||||
@@ -81,7 +87,14 @@ function modeFactory({ modeConfiguration }) {
|
||||
'TagBrowser',
|
||||
]);
|
||||
|
||||
toolbarService.createButtonSection('segmentationToolbox', ['SegmentationTools']);
|
||||
toolbarService.createButtonSection('segmentationToolbox', [
|
||||
'SegmentationUtilities',
|
||||
'SegmentationTools',
|
||||
]);
|
||||
toolbarService.createButtonSection('segmentationToolboxUtilitySection', [
|
||||
'InterpolateLabelmap',
|
||||
'SegmentBidirectional',
|
||||
]);
|
||||
toolbarService.createButtonSection('segmentationToolboxToolsSection', [
|
||||
'BrushTools',
|
||||
'Shapes',
|
||||
@@ -149,7 +162,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
props: {
|
||||
leftPanels: [ohif.leftPanel],
|
||||
leftPanelResizable: true,
|
||||
rightPanels: [cornerstone.panelTool],
|
||||
rightPanels: [cornerstone.panelTool, cornerstone.measurements],
|
||||
rightPanelResizable: true,
|
||||
// leftPanelClosed: true,
|
||||
viewports: [
|
||||
@@ -161,6 +174,10 @@ function modeFactory({ modeConfiguration }) {
|
||||
namespace: segmentation.viewport,
|
||||
displaySetsToDisplay: [segmentation.sopClassHandler],
|
||||
},
|
||||
{
|
||||
namespace: dicomRT.viewport,
|
||||
displaySetsToDisplay: [dicomRT.sopClassHandler],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -174,7 +191,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
// The example is used for a grid layout to specify that as a preferred layout
|
||||
// hangingProtocol: ['@ohif/mnGrid'],
|
||||
/** SopClassHandlers used by the mode */
|
||||
sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler],
|
||||
sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler, dicomRT.sopClassHandler],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,9 @@ function createTools(utilityModule) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
toolName: toolNames.SegmentBidirectional,
|
||||
},
|
||||
{
|
||||
toolName: 'ThresholdSphereBrushDynamic',
|
||||
parentTool: 'Brush',
|
||||
|
||||
@@ -255,7 +255,7 @@ const toolbarButtons: Button[] = [
|
||||
|
||||
{
|
||||
id: 'Brush',
|
||||
uiType: 'ohif.toolButton',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
props: {
|
||||
icon: 'icon-tool-brush',
|
||||
label: 'Brush',
|
||||
@@ -292,9 +292,39 @@ const toolbarButtons: Button[] = [
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'InterpolateLabelmap',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
props: {
|
||||
icon: 'icon-tool-interpolation',
|
||||
label: 'Interpolate Labelmap',
|
||||
evaluate: [
|
||||
'evaluate.cornerstone.segmentation',
|
||||
{
|
||||
name: 'evaluate.displaySetIsReconstructable',
|
||||
disabledText: 'The current viewport cannot handle interpolation.',
|
||||
},
|
||||
],
|
||||
commands: 'interpolateLabelmap',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'SegmentBidirectional',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
props: {
|
||||
icon: 'icon-tool-bidirectional-segment',
|
||||
label: 'Segment Bidirectional',
|
||||
tooltip: 'Finding the largest bidirectional measurement per lesion',
|
||||
evaluate: {
|
||||
name: 'evaluate.cornerstone.segmentation',
|
||||
disabledText: 'Create new segmentation to enable this tool.',
|
||||
},
|
||||
commands: 'runSegmentBidirectional',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'Eraser',
|
||||
uiType: 'ohif.toolButton',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
props: {
|
||||
icon: 'icon-tool-eraser',
|
||||
label: 'Eraser',
|
||||
@@ -332,7 +362,7 @@ const toolbarButtons: Button[] = [
|
||||
},
|
||||
{
|
||||
id: 'Threshold',
|
||||
uiType: 'ohif.toolButton',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
props: {
|
||||
icon: 'icon-tool-threshold',
|
||||
label: 'Threshold Tool',
|
||||
|
||||
Reference in new issue
Block a user