comparison detection_viz.py @ 1:ff66bae1f7f8 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/detection_viz/ commit 787ebcc8daa1834214bc92c201c921c704ef2d1f
author thomaswollmann
date Mon, 07 Jan 2019 05:36:36 -0500
parents 629d9e8ca64c
children
comparison
equal deleted inserted replaced
0:629d9e8ca64c 1:ff66bae1f7f8
30 if fn is not None: 30 if fn is not None:
31 plot_circles(fn, ax, 'red', stroke_size, circle_radius) 31 plot_circles(fn, ax, 'red', stroke_size, circle_radius)
32 if fp is not None: 32 if fp is not None:
33 plot_circles(fp, ax, 'darkorange', stroke_size, circle_radius) 33 plot_circles(fp, ax, 'darkorange', stroke_size, circle_radius)
34 34
35 fig.canvas.print_png("tmp.png", dpi=1800) 35 fig.canvas.print_png(output_file, dpi=1800)
36 os.rename("tmp.png", output_file)
37 36
38 if __name__ == "__main__": 37 if __name__ == "__main__":
39 parser = argparse.ArgumentParser() 38 parser = argparse.ArgumentParser()
40 parser.add_argument('input_file', type=argparse.FileType('r'), help='original file') 39 parser.add_argument('input_file', type=argparse.FileType('r'), help='original file')
41 # output file should not be of type argparse.FileType('w') sine it is created immediately in this case which leads to an error in renaming 40 # output file should not be of type argparse.FileType('w') sine it is created immediately in this case which leads to an error in renaming