scil_labels_from_mask.py

usage: __main__.py [-h] [--labels LABELS [LABELS ...]]
                   [--background_label BACKGROUND_LABEL]
                   [--min_volume MIN_VOLUME] [-v [{DEBUG,INFO,WARNING}]] [-f]
                   in_mask out_labels

Script to obtain labels from a binary mask which contains multiple blobs.

The script will assign a label to each blob in the mask. The background label
is excluded from the labels list. By default, the background label is 0 and
the labels are assigned in increasing order starting from 1.

positional arguments:
  in_mask               Input mask file.
  out_labels            Output label file.

options:
  -h, --help            show this help message and exit
  --labels LABELS [LABELS ...]
                        Labels to assign to each blobs in the mask. Excludes the background label.
  --background_label BACKGROUND_LABEL
                        Label to assign to the background. [0]
  --min_volume MIN_VOLUME
                        Minimum volume in mm3 [7],Useful for lesions.
  -v [{DEBUG,INFO,WARNING}]
                        Produces verbose output depending on the provided level.
                        Default level is warning, default when using -v is info.
  -f                    Force overwriting of the output files.

Scilpy version: 2.0.2