changeset 3:02a686fc1654 draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/coordinates_of_roi/ commit da043bdec956714abb0fa82f278931bbe1a6d41d
author imgteam
date Mon, 25 Mar 2019 11:15:39 -0400
parents 24d9bd16c953
children 00175f4a2bbb
files coordinates_of_roi.py coordinates_of_roi.xml
diffstat 2 files changed, 2 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/coordinates_of_roi.py	Wed Mar 20 09:18:06 2019 -0400
+++ b/coordinates_of_roi.py	Mon Mar 25 11:15:39 2019 -0400
@@ -14,7 +14,7 @@
     img_width = data.shape[1]
     for j in range(img_width):
         for i in range(img_height):
-            if white_obj == False:
+            if white_obj == False: 
                 if data[i,j] <= threshold:
                     x.append(i + offset[0])
                     y.append(j + offset[1])
@@ -31,12 +31,10 @@
     parser = argparse.ArgumentParser(description = "Create a csv table with Coordinates of the ROI")
     parser.add_argument("im", help = "Paste path to out.png (output created by transformation)")
     parser.add_argument("pixel_table", help = "Paste path to file in which list with all pixles > threshold should be saved")
-    parser.add_argument('offset_x', type=int, help='offset in x direction (width)', default=0)
-    parser.add_argument('offset_y', type=int, help='offset in y direction (height)', default=0)
     parser.add_argument("--white_obj", dest = "white_obj", default=False, help = "If set objects in image are white otherwise black", action = "store_true")
     parser.add_argument("--threshold", dest = "threshold", default = 0.5, help = "Enter desired threshold value", type = float)
     
     args = parser.parse_args()  
     # with warnings.catch_warnings():
 	#     warnings.simplefilter("ignore") 
-    get_pixel_values(args.im, args.pixel_table, args.white_obj, args.threshold, [args.offset_x, args.offset_y])     
+    get_pixel_values(args.im, args.pixel_table, args.white_obj, args.threshold)     
--- a/coordinates_of_roi.xml	Wed Mar 20 09:18:06 2019 -0400
+++ b/coordinates_of_roi.xml	Mon Mar 25 11:15:39 2019 -0400
@@ -9,7 +9,6 @@
             python '$__tool_directory__/coordinates_of_roi.py'
             '$im'
             '$pixel_table'
-            $offset_x $offset_y
             $white_obj
             --threshold $threshold
         ]]>
@@ -19,8 +18,6 @@
         <param name="white_obj" type="boolean" truevalue="--white_obj" falsevalue="" checked="false"
             label="Set to Yes if object is white and background black, otherwise set to No" />
         <param name="threshold" type="float" value="0.5" label="Threshold value" />
-        <param name="offset_x" type="integer" value="0" label="Added offset in x direction (=width direction)" />
-        <param name="offset_y" type="integer" value="0" label="Added offset in y direction (=height direction)" />
     </inputs>
     <outputs>
        <data format="tabular" name="pixel_table" />
@@ -31,13 +28,6 @@
             <param name="white_obj" value="true"/>
             <output name="pixel_table" value="newtable.tsv" ftype="tabular"/>
         </test>
-        <test>
-            <param name="im" value="test.png"/>
-            <param name="white_obj" value="true"/>
-            <param name="offset_x" value="1"/>
-            <param name="offset_y" value="2"/>
-            <output name="pixel_table" value="newtable2.tsv" ftype="tabular"/>
-        </test>
     </tests>
     <help>
     **What it does**