-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblur.py
32 lines (22 loc) · 801 Bytes
/
blur.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from grid_tools import slice_img, prepare_p2p, prepare_cyclegan, slice_overlap, sort_and_montage, prepare_p2p_grid, retrieve_p2p, get_filenames
from sys import argv
script, arg1, arg2, arg3 = argv
print ("The script is called:", script)
print ("Your arg1 variable is:", arg1)
if arg1 == 'slice':
slice_img(arg2, arg3)
if arg1 == 'slice_overlap':
slice_overlap(arg2, arg3)
if arg1 == 'slice_overlap_p2p':
slice_overlap(arg2, arg3, pix2pix=True)
if arg1 == 'montage':
filenames = get_filenames(arg2)
sort_and_montage(filenames, arg3)
if arg1 == 'prepare_cyclegan':
prepare_cyclegan(arg2, arg3)
if arg1 == 'prepare_p2p_grid':
prepare_p2p_grid(arg2, arg3)
if arg1 == 'prepare_p2p':
prepare_p2p(arg2, arg3)
if arg1 == 'retrieve_p2p':
retrieve_p2p(arg2, arg3)