Repository 'coordinates_of_roi'
hg clone https://toolshed.g2.bx.psu.edu/repos/imgteam/coordinates_of_roi

Changeset 1:ee045a6bbdef (2019-02-22)
Previous changeset 0:0d30ffea8874 (2019-02-09) Next changeset 2:24d9bd16c953 (2019-03-20)
Commit message:
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/coordinates_of_roi/ commit 4efef27bbe105490fc125e3586024ebb51fa929f
modified:
coordinates_of_roi.py
test-data/table.tsv
test-data/table2.tsv
b
diff -r 0d30ffea8874 -r ee045a6bbdef coordinates_of_roi.py
--- a/coordinates_of_roi.py Sat Feb 09 14:33:43 2019 -0500
+++ b/coordinates_of_roi.py Fri Feb 22 17:11:28 2019 -0500
[
@@ -10,15 +10,17 @@
         data = skimage.color.rgb2grey(data)
     x = []
     y = []
-    for i in range(data.shape[0]):
-        for j in range(data.shape[1]):
+    img_height = data.shape[0]
+    img_width = data.shape[1]
+    for j in range(img_width):
+        for i in range(img_height):
             if white_obj == False:
                 if data[i,j] <= threshold:
                     x.append(j + offset[0])
-                    y.append(i + offset[1])
+                    y.append(img_height-(i+1) + offset[1])
             elif data[i,j] >= threshold:
                     x.append(j + offset[0])
-                    y.append(i + offset[1])
+                    y.append(img_height-(i+1) + offset[1])
                     
     df = pd.DataFrame()
     df['x'] = x
b
diff -r 0d30ffea8874 -r ee045a6bbdef test-data/table.tsv
--- a/test-data/table.tsv Sat Feb 09 14:33:43 2019 -0500
+++ b/test-data/table.tsv Fri Feb 22 17:11:28 2019 -0500
b
@@ -1,7 +1,7 @@
 x y
-4 5
-5 5
-6 5
-7 5
-8 5
-9 5
+4 4
+5 4
+6 4
+7 4
+8 4
+9 4
b
diff -r 0d30ffea8874 -r ee045a6bbdef test-data/table2.tsv
--- a/test-data/table2.tsv Sat Feb 09 14:33:43 2019 -0500
+++ b/test-data/table2.tsv Fri Feb 22 17:11:28 2019 -0500
b
@@ -1,7 +1,7 @@
 x y
-5 7
-6 7
-7 7
-8 7
-9 7
-10 7
+5 6
+6 6
+7 6
+8 6
+9 6
+10 6