Viewers
Viewers copied to clipboard
[Segmentation Mode] Upper limit of threshold segmentation locked to max 1000 (needs to be higher) [Bug]
Describe the Bug
When using the threshold tool in Segmentation mode the upper limit for the threshold is too low for many modalities.
For CT there are dense bits of bone or contrast that can be higher than 1000 (right) . In an NAC PET (or even a standard PET where SUV is not calculable) 1000 is also too low (left).
Steps to Reproduce
** Using 3.8.0-beta.87
- Go to viewer-dev.ohif.org and select a study and open in segmentation mode - (https://viewer-dev.ohif.org/segmentation?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.7009.2403.334240657131972136850343327463) is a good example.
- Create a new segmentation on the CT and set the max threshold to 2000. !It will snap back to 1000!
- At 1000 if you segment the rip cage or other dense bones regions over 1000 will not be included.
- Similarly in the PET NAC image the same will be true except that much more of the image is >1000
The current behavior
The upper limit of the threshold seems hard coded to 1000 which means that portions of the images >1000 are not included when segmenting.
The expected behavior
There are 3 options I can think of. In order from best to worst:
- Set the upper limit to the max value of the series being segmented the one specified in the (i)
- Have a set of min/max values dependent on modality - tricky for PET since NAC and AC require different scales
- Just allow the user to type in any value for max
OS
Windows 10
Node version
whatever is on OHIF viewer dev
Browser
Version 123.0.6312.59 (Official Build) (64-bit)
@sedghi , please take a look at this bug. @dxlin can help fix. Of the 3 options as solution listed above, which one do you prefer? We can discuss on coming Thursday office hour.
You should be able to change that in your toolbarbuttons definitions, in your modes
can we close this since now the mode
can decide on the threshold levels?
modes/segmentation/src/segmentationButtons.ts
{
id: 'BrushTools',
uiType: 'ohif.buttonGroup',
props: {
groupId: 'BrushTools',
items: [
{
id: 'Brush',
icon: 'icon-tool-brush',
label: 'Brush',
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularBrush', 'SphereBrush'],
disabledText: 'Create new segmentation to enable this tool.',
},
options: [
{
name: 'Radius (mm)',
id: 'brush-radius',
type: 'range',
min: 0.5,
max: 99.5,
step: 0.5,
value: 25,
commands: {
commandName: 'setBrushSize',
commandOptions: { toolNames: ['CircularBrush', 'SphereBrush'] },
},
},
{
name: 'Shape',
type: 'radio',
id: 'brush-mode',
value: 'CircularBrush',
values: [
{ value: 'CircularBrush', label: 'Circle' },
{ value: 'SphereBrush', label: 'Sphere' },
],
commands: 'setToolActiveToolbar',
},
],
},
{
id: 'Eraser',
icon: 'icon-tool-eraser',
label: 'Eraser',
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularEraser', 'SphereEraser'],
},
options: [
{
name: 'Radius (mm)',
id: 'eraser-radius',
type: 'range',
min: 0.5,
max: 99.5,
step: 0.5,
value: 25,
commands: {
commandName: 'setBrushSize',
commandOptions: { toolNames: ['CircularEraser', 'SphereEraser'] },
},
},
{
name: 'Shape',
type: 'radio',
id: 'eraser-mode',
value: 'CircularEraser',
values: [
{ value: 'CircularEraser', label: 'Circle' },
{ value: 'SphereEraser', label: 'Sphere' },
],
commands: 'setToolActiveToolbar',
},
],
},
@sedghi Can you explain what you mean by the mode deciding on thresholds?