unravel.segment.labels_to_masks module
Use seg_labels_as_masks
(sl2m
) from UNRAVEL to convert an ilastik segmentation tif series or other image labels to binary .nii.gz masks.
Usage:
seg_labels_as_masks
-i seg_ilastik_1/IlastikSegmentation -o Ai14_seg_ilasik_1 [-l 1 2 3] [-d dirs] [-p pattern] [-v]
-
unravel.segment.labels_to_masks.parse_args()[source]
-
unravel.segment.labels_to_masks.save_labels_as_masks(ndarray, label, segmentation_dir, output_name, verbose=False)[source]
Converts label in an image to a binary mask and saves it as a .nii.gz file. Assumes < 256 labels.
-
unravel.segment.labels_to_masks.main()[source]