changeset 2:30ca5d5d03ec draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit 2286a6c9da88596349ed9d967c51541409c0a7bf
author imgteam
date Mon, 13 Nov 2023 22:11:46 +0000
parents 9bd039f46843
children de611b3b5ae8
files points2label.py points2label.xml
diffstat 2 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/points2label.py	Mon Jul 22 05:04:37 2019 -0400
+++ b/points2label.py	Mon Nov 13 22:11:46 2023 +0000
@@ -1,9 +1,11 @@
 import argparse
 import sys
+import warnings
+
 import numpy as np
+import pandas as pd
 import skimage.io
-import pandas as pd 
-import warnings
+
 
 def points2label(labels, shape, output_file=None, has_header=False, is_TSV=True):
     labelimg = np.zeros([shape[0], shape[1]], dtype=np.int32)
@@ -21,7 +23,7 @@
 
     for i in range(0, len(df)):
         a_row = df.iloc[i]
-        labelimg[a_row[0], a_row[1]] = i+1
+        labelimg[a_row[0], a_row[1]] = i + 1
 
     if output_file is not None:
         with warnings.catch_warnings():
@@ -30,6 +32,7 @@
     else:
         return labelimg
 
+
 if __name__ == "__main__":
     parser = argparse.ArgumentParser()
     parser.add_argument('label_file', type=argparse.FileType('r'), default=sys.stdin, help='label file')
--- a/points2label.xml	Mon Jul 22 05:04:37 2019 -0400
+++ b/points2label.xml	Mon Nov 13 22:11:46 2023 +0000
@@ -1,5 +1,11 @@
-<tool id="ip_points_to_label" name="Points to Label" version="0.3"> 
-    <description>Points to Label Image</description>
+<tool id="ip_points_to_label" name="Convert point coordinates to label map" version="0.3-2"> 
+    <description></description>
+    <edam_operations>
+        <edam_operation>operation_3443</edam_operation>
+    </edam_operations>
+    <xrefs>
+        <xref type="bio.tools">galaxy_image_analysis</xref>
+    </xrefs>
     <requirements>
         <requirement type="package" version="1.15.4">numpy</requirement>
         <requirement type="package" version="0.14.2">scikit-image</requirement>