Mercurial > repos > thomaswollmann > mergeneighboursinlabelimage
diff mergeneighboursinlabelimage.py @ 1:3536648d0a93 draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/\mergeneighboursinlabelimage commit d93e1dd276027cfc3fb518236110395a23d96f66
author | thomaswollmann |
---|---|
date | Wed, 16 Jan 2019 15:35:29 -0500 |
parents | 66f7e94db2e6 |
children |
line wrap: on
line diff
--- a/mergeneighboursinlabelimage.py Tue Jan 08 08:54:16 2019 -0500 +++ b/mergeneighboursinlabelimage.py Wed Jan 16 15:35:29 2019 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/python - import argparse import sys import skimage.io @@ -46,6 +44,5 @@ label_image = merge_n(label_image, args.cluster_merge) with warnings.catch_warnings(): warnings.simplefilter("ignore") - res = skimage.util.img_as_uint(res) - skimage.io.imsave("tmp.tiff", res) - os.rename("tmp.tiff", args.output_file.name) + res = skimage.util.img_as_uint(label_image) + skimage.io.imsave(args.out_file.name, res, plugin="tifffile")