SegmentationSlice.generate_name#

SegmentationSlice.generate_name(segments=None)[source]#

Generate name for a slice of the segmentation from parameters.

Parameters:

segments (dict[str, Segment] | None) – Dictionary of segments to use for generating the name. If not provided, it will attempt to get segments from SegmentsSuper and if that fails the full segment name will be used.

Returns:

Name of slice in the form “{name}{value}_{name 2}{value 2}” e.g. “p1_m3”, where name is the segment alias if it has one. For any segments with a value alias that will be used instead of “{name}{value}”. The order of the parameters is defined by the naming_order.

Return type:

str

See also

Segment.get_alias

to get the segment alias.

Segment.get_value_alias

to get the alias or “{name}{value}” for a specific segment value.