Repository 'mergeneighboursinlabelimage'
hg clone https://toolshed.g2.bx.psu.edu/repos/thomaswollmann/mergeneighboursinlabelimage

Changeset 1:3536648d0a93 (2019-01-16)
Previous changeset 0:66f7e94db2e6 (2019-01-08)
Commit message:
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/\mergeneighboursinlabelimage commit d93e1dd276027cfc3fb518236110395a23d96f66
modified:
mergeneighboursinlabelimage.py
mergeneighboursinlabelimage.xml
added:
test-data/galaxyIcon_noText.tif
test-data/out.tiff
b
diff -r 66f7e94db2e6 -r 3536648d0a93 mergeneighboursinlabelimage.py
--- a/mergeneighboursinlabelimage.py Tue Jan 08 08:54:16 2019 -0500
+++ b/mergeneighboursinlabelimage.py Wed Jan 16 15:35:29 2019 -0500
b
@@ -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")
b
diff -r 66f7e94db2e6 -r 3536648d0a93 mergeneighboursinlabelimage.xml
--- a/mergeneighboursinlabelimage.xml Tue Jan 08 08:54:16 2019 -0500
+++ b/mergeneighboursinlabelimage.xml Wed Jan 16 15:35:29 2019 -0500
[
@@ -1,13 +1,13 @@
-<tool id="mergeneighboursinlabelimage" name="Merge Neighbours in Label" version="0.1">
+<tool id="mergeneighboursinlabelimage" name="Merge Neighbours in Label" version="0.2">
   <description>Merge Neighbours in Label Image</description>
   <requirements>
-    <requirement type="package" version="0.12.3" >scikit-image</requirement>
-    <requirement type="package">numpy</requirement>
-    <requirement type="package">scipy</requirement>
+    <requirement type="package" version="0.14.0">scikit-image</requirement>
+    <requirement type="package" version="1.15.4">numpy</requirement>
   </requirements>
   <command>
         <![CDATA[
-        python '$__tool_directory__/mergeneighboursinlabelimage.py '$input' '$output' -c $c
+        python '$__tool_directory__/mergeneighboursinlabelimage.py' '$input' ./tmp.tiff -c $c
+        && mv ./tmp.tiff '$output'
         ]]>
   </command>
   <inputs>
@@ -16,8 +16,16 @@
   </inputs>
   <outputs>
     <data format="tiff" name="output"/>
-  </outputs><help>This tools merges nearby objects in a label image using the minimum pixel distance.</help>
+  </outputs>
+  <tests>
+    <test>
+      <param name="input" value="galaxyIcon_noText.tif"/>
+      <param name="c" value="10"/>
+      <output name="output" file="out.tiff" ftype="tiff" compare="sim_size"/>
+    </test>
+  </tests>
+  <help>This tools merges nearby objects in a label image using the minimum pixel distance.</help>
   <citations>
-      <citation type="doi">10.7717/peerj.453</citation>
+      <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>
   </citations>
 </tool>
b
diff -r 66f7e94db2e6 -r 3536648d0a93 test-data/galaxyIcon_noText.tif
b
Binary file test-data/galaxyIcon_noText.tif has changed
b
diff -r 66f7e94db2e6 -r 3536648d0a93 test-data/out.tiff
b
Binary file test-data/out.tiff has changed