diff binary2label.py @ 3:9bb446db4a1e draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit 2286a6c9da88596349ed9d967c51541409c0a7bf
author imgteam
date Mon, 13 Nov 2023 22:10:33 +0000
parents 6e65fd971e13
children
line wrap: on
line diff
--- a/binary2label.py	Wed Dec 18 05:01:27 2019 -0500
+++ b/binary2label.py	Mon Nov 13 22:10:33 2023 +0000
@@ -1,17 +1,16 @@
 import argparse
 import sys
+
 import skimage.io
+import skimage.util
+from PIL import Image
 from skimage.measure import label
-import numpy as np
-import warnings
-from PIL import Image
-import skimage.util
 
 parser = argparse.ArgumentParser()
 parser.add_argument('input_file', type=argparse.FileType('r'), default=sys.stdin, help='input file')
-parser.add_argument('out_file', type=argparse.FileType('w'), default=sys.stdin, help='out file (TIFF)') 
+parser.add_argument('out_file', type=argparse.FileType('w'), default=sys.stdin, help='out file (TIFF)')
 args = parser.parse_args()
- 
+
 img_in = skimage.io.imread(args.input_file.name) > 0
 res = label(img_in)
 res = skimage.util.img_as_uint(res)