Example: 'imgs/Jan01_2015_abc' """, nargs="?", type=Path, metavar="<file>") parser.add_argument("-e", "--extension", default='pdf', help="Extension of image type to use for output images.") parser.add_argument("--limits", default=None, metavar='UPPER_LEFT_LOWER_RIGHT', help="""Limits for cropping, from the upper left corner. Example: '--limit 192,224,320,288' for a box centered at (256,256) of width 128 and height 64. Leave blank for no cropping.""", type=to_list_func(4, int)) parser.add_argument( '-t', '--thresholds', type=to_list_func(3, FloatOrPercent), default=(FloatOrPercent('90%'), FloatOrPercent('80%'), FloatOrPercent('90%')), help="""Set three thresholds. Value should either be in pixel value, e.g. '20', or a percentage value, e.g. '99.9%%'. Percentage values will be applied to the histogram to extract a threshold. Use a comma to separate. Example: -t 99%%,10%%,99%%""") parser.add_argument('-u', '--upperthresholds', metavar='THRESHOLD', type=to_list_func(3, FloatOrPercent), default=(FloatOrPercent('99.99%'), FloatOrPercent('99%'),
Example: 'imgs/Jan01_2015_abc' """, nargs="?", type=Path, metavar="<file>") parser.add_argument("-e", "--extension", default='pdf', help="Extension of image type to use for output images.") parser.add_argument("--limits", default=None, metavar='UPPER,LEFT,LOWER,RIGHT', help="""Limits for cropping, from the upper left corner. Example: '--limit 192,224,320,288' for a box centered at (256,256) of width 128 and height 64. Leave blank for no cropping.""", type=to_list_func(4, int)) parser.add_argument( '-t', '--threshold', type=FloatOrPercent, default=FloatOrPercent('99%'), help="""Set threshold for cyan. Value should either be in pixel value, e.g. '20', or a percentage value, e.g. '99.9%%'. Percentage values will be applied to the histogram to extract a threshold.""") # TODO: add yellow threshold parser.add_argument('-u', '--upperthreshold', metavar='THRESHOLD', type=FloatOrPercent, default=FloatOrPercent('99.9%'), help="""
type=Path, metavar="<nucleus_file>.tif") parser.add_argument("inputmeasure", help="Input measure file. Should be a tif.", type=Path, metavar="<measure_file>.tif") parser.add_argument("output", default=None, help="""Output file basename (without extension). Defaults to match input. Example: 'imgs/Jan01_2015_abc' """, nargs="?", type=Path, metavar="<file>") parser.add_argument("-e", "--extension", default='pdf', help="Extension of image type to use for output images.") parser.add_argument("--limits", default=None, metavar='UPPER_LEFT_LOWER_RIGHT', help="""Limits for cropping, from the upper left corner. Example: '--limit 192,224,320,288' for a box centered at (256,256) of width 128 and height 64. Leave blank for no cropping.""", type=to_list_func(4, int)) parser.add_argument('-t', '--thresholds', type=to_list_func(3, FloatOrPercent), default=(FloatOrPercent('90%'), FloatOrPercent('80%'), FloatOrPercent('90%')), help="""Set three thresholds. Value should either be in pixel value, e.g. '20', or a percentage value, e.g. '99.9%%'. Percentage values will be applied to the histogram to extract a threshold. Use a comma to separate. Example: -t 99%%,10%%,99%%""") parser.add_argument('-u', '--upperthresholds', metavar='THRESHOLD', type=to_list_func(3, FloatOrPercent), default=(FloatOrPercent('99.99%'), FloatOrPercent('99%'), FloatOrPercent('99.99%')), help=""" Set upper thresholds for normalization, with the same format as '--threshold'. """) parser.add_argument('--loghistogram', action='store_true', help="""Use a logarithmic scale for the histograms.""")
parser.add_argument("input", help="Input file. Should be a tif with a sequence of embedded images.", type=Path, metavar="<file>.tif") parser.add_argument("output", default=None, help="""Output file basename (without extension). Defaults to match input. Example: 'imgs/Jan01_2015_abc' """, nargs="?", type=Path, metavar="<file>") parser.add_argument("-e", "--extension", default='pdf', help="Extension of image type to use for output images.") parser.add_argument("--limits", default=None, metavar='UPPER,LEFT,LOWER,RIGHT', help="""Limits for cropping, from the upper left corner. Example: '--limit 192,224,320,288' for a box centered at (256,256) of width 128 and height 64. Leave blank for no cropping.""", type=to_list_func(4, int)) parser.add_argument('-t', '--threshold', type=FloatOrPercent, default=FloatOrPercent('99%'), help="""Set threshold for cyan. Value should either be in pixel value, e.g. '20', or a percentage value, e.g. '99.9%%'. Percentage values will be applied to the histogram to extract a threshold.""") # TODO: add yellow threshold parser.add_argument('-u', '--upperthreshold', metavar='THRESHOLD', type=FloatOrPercent, default=FloatOrPercent('99.9%'), help=""" Set upper threshold for normalization, with the same format as '--threshold'. """) # TODO: add yellow upper threshold # parser.add_argument('-b', '--binarize', action='store_true', # help=""" # Use a binary input for the cyan channel. That is, for all pixels