Segment editor : specified terminology item in settings is partially taken into account

‘Application settings / Segmentations’ section allows to define a default terminology entry when we add the first segment in ‘Segment editor’ module, or ‘Segmentations’ module. I select ‘Tissue/Artery’ there.

After restarting Slicer and adding a first segment in ‘Segment editor’, the tooltip does show ‘Tissue/Artery’, but the segment color remains green, that of ‘Tissue/Tissue’, whilst it should be red.

bad_color

Complicating matters, manually selecting ‘Tissue/Artery’ again does not change the color. Another terminology item must be selected, and lastly, selecting ‘Tissue/Artery’ would set the right color.

A fix would be welcome, nothing urgent of course.

Colors for new segments don’t use the default term’s color because then all the segments would have the same color.

Manually selecting ‘Tissue/Artery’ again does not change the color

It does, but to actually select it, you need to select another term (clicking on the already selected item in a list has no effect). To make this easier, I’ve pushed a fix, so that you can easily reset to the default color by clicking the “Reset color to default” button.

image

Makes sense. However, the very first created segment only could use the default terminology specified in settings. Else, what would be the purpose of a default terminology ?

Anyway, it’s not a big issue. It’s just to avoid double-clicking the first segment every time, to select the preferred terminology item which is always the same in my case. Most users have probably broader workflows. Don’t waste more time on this.

Thanks.

The main use is setting the segmentation category. This allows you to create a custom list of terms that are relevant for your particular segmentation task. The default term should be something generic, to be safe (if you set it to be something too specific, then it may be assumed that the user specifically selected that term because he determined that the segment corresponds to that term).

If we used the term’s default color for the first segment then it would add lots of extra complications (e.g., when we add a second segment then we would need to check if the color is that is not too similar to the first one). Also, I don’t see a workflow where setting the first segment’s color based on the default color would make things significantly better: if you segment vessels then you don’t want all your vessels to be red; if you segment various structures then you don’t want your default term to be a vessel.

Default segment colors are now generated in vtkMRMLSegmentationDisplayNode::GenerateSegmentColor by taking them from GenericAnatomyColors color table. We could add an option to set a custom color table node as input, if setting specific default colors turns out to be important for some use cases.