mitk.LabelVector#

class mitk.LabelVector#

Bases: pybind11_object

Immutable, sliceable sequence of Label objects.

Returned by methods like MultiLabelSegmentation.get_labels() and MultiLabelSegmentation.get_group_labels(). Supports len, iteration, integer and slice indexing, membership testing, and exposes a flat values list of the underlying label pixel values.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

Attributes

__contains__(self: mitk.LabelVector, arg0: object) bool#
__getitem__(*args, **kwargs)#

Overloaded function.

  1. __getitem__(self: mitk.LabelVector, arg0: typing.SupportsInt) -> mitk.Label

  2. __getitem__(self: mitk.LabelVector, arg0: slice) -> mitk.LabelVector

__iter__(self: mitk.LabelVector) collections.abc.Iterator[mitk.Label]#
__len__(self: mitk.LabelVector) int#

Return the number of labels.

property values#