Mercurial > repos > imgteam > count_objects
diff count_objects.py @ 2:5bf8eb50b280 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/count_objects/ commit 3c2a4fed433e518fcd0bc8d4deffcc5c2346b2b5
author | imgteam |
---|---|
date | Sat, 08 Jul 2023 01:32:11 +0000 |
parents | 664232d2a3f7 |
children |
line wrap: on
line diff
--- a/count_objects.py Wed Dec 18 05:01:56 2019 -0500 +++ b/count_objects.py Sat Jul 08 01:32:11 2023 +0000 @@ -1,17 +1,16 @@ #!/usr/bin/python import argparse -import numpy as np -import os + import skimage.io -from skimage.measure import regionprops +from skimage.measure import regionprops parser = argparse.ArgumentParser(description='Count Objects') parser.add_argument('input_file', type=argparse.FileType('r'), help='Label input file') parser.add_argument('output_file', type=argparse.FileType('w'), help='Tabular output file') -args = parser.parse_args() +args = parser.parse_args() img_raw = skimage.io.imread(args.input_file.name) res = len(regionprops(img_raw))