annotate spot_detection_2d.py @ 2:4645b356bf3b draft

"planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 927b78d47c31714776ccdf3d16f26c3779298abb"
author imgteam
date Sun, 20 Feb 2022 15:47:35 +0000
parents 859dd1c11ac0
children e8c9e104e109
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
1 """
2
4645b356bf3b "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 927b78d47c31714776ccdf3d16f26c3779298abb"
imgteam
parents: 1
diff changeset
2 Copyright 2021-2022 Biomedical Computer Vision Group, Heidelberg University.
0
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
3 Author: Qi Gao (qi.gao@bioquant.uni-heidelberg.de)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
4
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
5 Distributed under the MIT license.
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
6 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
7
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
8 """
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
9
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
10 import argparse
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
11
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
12 import imageio
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
13 import numpy as np
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
14 import pandas as pd
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
15 from skimage.feature import peak_local_max
1
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
16 from skimage.filters import gaussian, laplace
0
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
17
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
18
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
19 def getbr(xy, img, nb, firstn):
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
20 ndata = xy.shape[0]
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
21 br = np.empty((ndata, 1))
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
22 for j in range(ndata):
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
23 br[j] = np.NaN
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
24 if not np.isnan(xy[j, 0]):
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
25 timg = img[xy[j, 1] - nb - 1:xy[j, 1] + nb, xy[j, 0] - nb - 1:xy[j, 0] + nb]
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
26 br[j] = np.mean(np.sort(timg, axis=None)[-firstn:])
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
27 return br
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
28
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
29
1
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
30 def spot_detection(fn_in, fn_out, frame_1st=1, frame_end=0,
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
31 typ_filter='Gauss', ssig=1, th=10,
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
32 typ_br='smoothed', bd=10):
0
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
33 ims_ori = imageio.mimread(fn_in, format='TIFF')
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
34 ims_smd = np.zeros((len(ims_ori), ims_ori[0].shape[0], ims_ori[0].shape[1]), dtype='float64')
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
35 if frame_end == 0 or frame_end > len(ims_ori):
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
36 frame_end = len(ims_ori)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
37
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
38 for i in range(frame_1st - 1, frame_end):
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
39 ims_smd[i, :, :] = gaussian(ims_ori[i].astype('float64'), sigma=ssig)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
40 ims_smd_max = np.max(ims_smd)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
41
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
42 txyb_all = np.array([]).reshape(0, 4)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
43 for i in range(frame_1st - 1, frame_end):
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
44 tmp = np.copy(ims_smd[i, :, :])
1
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
45 if typ_filter == 'LoG':
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
46 tmp = laplace(tmp)
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
47
0
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
48 tmp[tmp < th * ims_smd_max / 100] = 0
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
49 coords = peak_local_max(tmp, min_distance=1)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
50 idx_to_del = np.where((coords[:, 0] <= bd) | (coords[:, 0] >= tmp.shape[0] - bd) |
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
51 (coords[:, 1] <= bd) | (coords[:, 1] >= tmp.shape[1] - bd))
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
52 coords = np.delete(coords, idx_to_del[0], axis=0)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
53 xys = coords[:, ::-1]
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
54
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
55 if typ_br == 'smoothed':
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
56 intens = getbr(xys, ims_smd[i, :, :], 0, 1)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
57 elif typ_br == 'robust':
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
58 intens = getbr(xys, ims_ori[i], 1, 4)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
59 else:
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
60 intens = getbr(xys, ims_ori[i], 0, 1)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
61
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
62 txyb = np.concatenate(((i + 1) * np.ones((xys.shape[0], 1)), xys, intens), axis=1)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
63 txyb_all = np.concatenate((txyb_all, txyb), axis=0)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
64
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
65 df = pd.DataFrame()
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
66 df['FRAME'] = txyb_all[:, 0].astype(int)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
67 df['POS_X'] = txyb_all[:, 1].astype(int)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
68 df['POS_Y'] = txyb_all[:, 2].astype(int)
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
69 df['INTENSITY'] = txyb_all[:, 3]
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
70 df.to_csv(fn_out, index=False, float_format='%.2f', sep="\t")
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
71
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
72
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
73 if __name__ == "__main__":
1
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
74 parser = argparse.ArgumentParser(description="Spot detection")
0
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
75 parser.add_argument("fn_in", help="Name of input image sequence (stack)")
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
76 parser.add_argument("fn_out", help="Name of output file to save the coordinates and intensities of detected spots")
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
77 parser.add_argument("frame_1st", type=int, help="Index for the starting frame to detect spots (1 for first frame of the stack)")
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
78 parser.add_argument("frame_end", type=int, help="Index for the last frame to detect spots (0 for the last frame of the stack)")
1
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
79 parser.add_argument("filter", help="Detection filter")
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
80 parser.add_argument("ssig", type=float, help="Sigma of the Gaussian for noise suppression")
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
81 parser.add_argument("thres", type=float, help="Percentage of the global maximal for thresholding candidate spots")
0
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
82 parser.add_argument("typ_intens", help="smoothed or robust (for measuring the intensities of spots)")
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
83 parser.add_argument("bndy", type=int, help="Number of pixels (Spots close to image boundaries will be ignored)")
d78372040976 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 481cd51a76341c0ec3759f919454e95139f0cc4e"
imgteam
parents:
diff changeset
84 args = parser.parse_args()
1
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
85 spot_detection(args.fn_in, args.fn_out,
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
86 frame_1st=args.frame_1st, frame_end=args.frame_end,
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
87 typ_filter=args.filter, ssig=args.ssig, th=args.thres,
859dd1c11ac0 "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/spot_detection_2d/ commit 9f103372d66ae7e3c5c385bd444b2a80e51cdae6"
imgteam
parents: 0
diff changeset
88 typ_br=args.typ_intens, bd=args.bndy)