comparison coordinates_of_roi.py @ 2:ca46066e9768 draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/coordinates_of_roi/ commit bfae746780819634a014388ea4671a49fc5c178d
author imgteam
date Wed, 20 Mar 2019 09:17:21 -0400
parents db2a47e0089f
children 37a75bac5b72
comparison
equal deleted inserted replaced
1:db2a47e0089f 2:ca46066e9768
14 img_width = data.shape[1] 14 img_width = data.shape[1]
15 for j in range(img_width): 15 for j in range(img_width):
16 for i in range(img_height): 16 for i in range(img_height):
17 if white_obj == False: 17 if white_obj == False:
18 if data[i,j] <= threshold: 18 if data[i,j] <= threshold:
19 x.append(j + offset[0]) 19 x.append(i + offset[0])
20 y.append(img_height-(i+1) + offset[1]) 20 y.append(j + offset[1])
21 elif data[i,j] >= threshold: 21 elif data[i,j] >= threshold:
22 x.append(j + offset[0]) 22 x.append(i + offset[0])
23 y.append(img_height-(i+1) + offset[1]) 23 y.append(j + offset[1])
24 24
25 df = pd.DataFrame() 25 df = pd.DataFrame()
26 df['x'] = x 26 df['x'] = x
27 df['y'] = y 27 df['y'] = y
28 df.to_csv(pixel_table, sep="\t", index = False) 28 df.to_csv(pixel_table, sep="\t", index = False)