Segmentation.add_segment#
- Segmentation.add_segment(new_seg, subset=None, new_naming_order=None)[source]#
Add a new segment to a segmentation.
- Parameters:
new_seg (Segment) – The new segment to be added. This will be checked and added as an enum_segment if it exists as such, and as a custom segment if not. This must be provided as a Segment type, and can’t be a string to pass to the SegmentSuper enum class
subset (Optional[dict[str, list[int]]] = None) – A subset definition if the new segmentation is a subset of an existing segmentation. This need only be provided for an enum_segment.
new_naming_order (Optional[list[str]] = None) – The naming order of the resultant segmentation. If not provided, the new segment will be appended to the end.
- Return type: