darsia.Masks#
- class Masks(labels, return_label=False)[source]#
Bases:
objectIterable object converting a label imaged to masks.
Constructor.
- Parameters:
Methods
mask_for_label(label)Boolean mask for label (precomputed at construction, read-only).
Attributes
Return routine for total number of labels.
Label image.
Labels.
Number of labels.
- mask_for_label(label)[source]#
Boolean mask for label (precomputed at construction, read-only).
- Parameters:
- label
int A value from unique_labels.
- label
- Returns:
np.ndarrayBoolean mask selecting the pixels belonging to label.
- labels#
Label image.
- num_labels#
Number of labels.
- unique_labels#
Labels.