parser.add_argument("--max",dest="max",default=255,type=int,help="Write value for binary threhsold")
parser.add_argument("--type",dest="type",default="binary",help="Threshold type, one of: binary, trunc, tozero, otsu.")
parser.add_argument("--type",dest="type",default="binary",help="Threshold type, one of: binary, inverse, trunc, tozero, otsu.")
parser.add_argument("--outputdir",dest="outputdir",default=".",help="Path to write output files, if not specified use current directory.")
parser.add_argument("--output",dest="output",default=None,help="Name of output image to write, if not specified, use input image name.")
parser.add_argument("--writeblank",default=False,action="store_true",help="If errors happen, write a blank file. Used to ensure dependent files exist for pegasus workflows.")