comparison color_deconvolution.py @ 1:0976b373a321 draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/color-deconvolution/ commit b2acc1845a25828181597fe5b6982fe116a7796d
author imgteam
date Mon, 22 Jul 2019 05:02:00 -0400
parents 8aa6e767f737
children 612aa1478fe1
comparison
equal deleted inserted replaced
0:8aa6e767f737 1:0976b373a321
72 72
73 parser = argparse.ArgumentParser() 73 parser = argparse.ArgumentParser()
74 parser.add_argument('input_file', type=argparse.FileType('r'), default=sys.stdin, help='input file') 74 parser.add_argument('input_file', type=argparse.FileType('r'), default=sys.stdin, help='input file')
75 parser.add_argument('out_file', type=argparse.FileType('w'), default=sys.stdin, help='out file (TIFF)') 75 parser.add_argument('out_file', type=argparse.FileType('w'), default=sys.stdin, help='out file (TIFF)')
76 parser.add_argument('conv_type', choices=convOptions.keys(), help='conversion type') 76 parser.add_argument('conv_type', choices=convOptions.keys(), help='conversion type')
77 args = parser.parse_args() 77 args = parser.parse_args()
78 78
79 img_in = skimage.io.imread(args.input_file.name)[:,:,0:3] 79 img_in = skimage.io.imread(args.input_file.name)[:,:,0:3]
80 res = convOptions[args.conv_type](img_in) 80 res = convOptions[args.conv_type](img_in)
81 res[res<-1]=-1 81 res[res<-1]=-1
82 res[res>1]=1 82 res[res>1]=1