Mercurial > repos > imgteam > split_labelmap
diff split_labelmap.py @ 3:0e7be7c35f15 draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/split_labelmaps/ commit c86a1b93cb7732f7331a981d13465653cc1a2790
author | imgteam |
---|---|
date | Wed, 24 Apr 2024 08:13:26 +0000 |
parents | 9db1c22dbe17 |
children |
line wrap: on
line diff
--- a/split_labelmap.py Thu Apr 04 15:26:45 2024 +0000 +++ b/split_labelmap.py Wed Apr 24 08:13:26 2024 +0000 @@ -1,11 +1,11 @@ import argparse import warnings +import giatools.io import numpy as np import scipy import skimage.draw import skimage.io -from imageio import imread as io_imread from skimage.measure import regionprops # split_label_image takes a label image and outputs a similar file with the given name where the labeled @@ -15,7 +15,7 @@ def split_labelmap(labelmap, outputfile): # Information from the label map. - label_img = io_imread(labelmap) + label_img = giatools.io.imread(labelmap) xtot, ytot = label_img.shape props = regionprops(label_img) N = len(props)