feat(segmentation): replace One Click Segment with ClickSegmentTool (#6135)

* feat(segmentation): replace One Click Segment with ClickSegmentTool

Wire OHIF to ClickSegmentTool from Cornerstone3D (#2780), rename the
toolbox button to Click to Segment, and enable it only on PET (PT)
viewports.

* chore(deps): bump @cornerstonejs packages to 5.4.13

Pick up ClickSegmentTool from the published Cornerstone3D release so
OHIF installs the tool from npm without a local CS3D link.
This commit is contained in:
Alireza authored and GitHub committed 2026-07-10 17:05:26 -04:00
1 parent 6d8a275171
commit 9c76afa075
20 files changed
+165 -145

No files matched your search

@@ -421,18 +421,23 @@ const segmentationToolbarButtons: Button[] = [
},
},
{
id: 'RegionSegmentPlus',
id: 'ClickSegment',
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-tool-click-segment',
label: i18n.t('Buttons:One Click Segment'),
label: i18n.t('Buttons:Click to Segment'),
tooltip: i18n.t(
'Buttons:Detects segmentable regions with one click. Hover for visual feedback—click when a plus sign appears to auto-segment the lesion.'
'Buttons:PET only. Click-to-segment lesions with no configuration. Hover for visual feedback—click when a plus sign appears to segment the lesion.'
),
evaluate: [
{
name: 'evaluate.modality.supported',
supportedModalities: ['PT'],
disabledText: i18n.t('Buttons:Tool not available for this modality'),
},
{
name: 'evaluate.cornerstone.segmentation',
toolNames: ['RegionSegmentPlus'],
toolNames: ['ClickSegment'],
disabledText: i18n.t('Buttons:Create new segmentation to enable this tool.'),
},
{
@@ -868,7 +873,7 @@ export const segmentationToolboxSections: Record<string, string[]> = {
'LabelmapSlicePropagation',
'BrushTools',
'MarkerLabelmap',
'RegionSegmentPlus',
'ClickSegment',
'Shapes',
'LabelMapEditWithContour',
],
@@ -148,7 +148,7 @@ function getToolGroupToolsCustomization({ commandsManager }) {
...brushInstances,
{ toolName: toolNames.LabelmapSlicePropagation },
{ toolName: toolNames.MarkerLabelmap },
{ toolName: toolNames.RegionSegmentPlus },
{ toolName: toolNames.ClickSegment },
{ toolName: toolNames.LabelMapEditWithContourTool },
{ toolName: toolNames.SegmentSelect },
{ toolName: toolNames.CircleScissors },
@@ -40,7 +40,7 @@ import {
OrientationMarkerTool,
WindowLevelRegionTool,
SegmentSelectTool,
RegionSegmentPlusTool,
ClickSegmentTool,
SegmentLabelTool,
LivewireContourSegmentationTool,
SculptorTool,
@@ -114,7 +114,7 @@ export default function initCornerstoneTools(configuration = {}) {
addTool(SegmentLabelTool);
addTool(LabelmapSlicePropagationTool);
addTool(MarkerLabelmapTool);
addTool(RegionSegmentPlusTool);
addTool(ClickSegmentTool);
addTool(LivewireContourSegmentationTool);
addTool(SculptorTool);
addTool(SplineContourSegmentationTool);
@@ -178,7 +178,7 @@ const toolNames = {
SegmentLabel: SegmentLabelTool.toolName,
LabelmapSlicePropagation: LabelmapSlicePropagationTool.toolName,
MarkerLabelmap: MarkerLabelmapTool.toolName,
RegionSegmentPlus: RegionSegmentPlusTool.toolName,
ClickSegment: ClickSegmentTool.toolName,
LivewireContourSegmentation: LivewireContourSegmentationTool.toolName,
SculptorTool: SculptorTool.toolName,
SplineContourSegmentation: SplineContourSegmentationTool.toolName,