Commit 4f3ee81f authored by aknecht2's avatar aknecht2

Fixed threshold validation.

parent 13c7850d
......@@ -745,6 +745,9 @@ valid = {
},
"--findSeed": {
"type": "exist"
},
"--binary": {
"type": "exist"
}
}
},
......@@ -1202,7 +1205,9 @@ valid = {
"value": ""
},
"--thresh": {
"type": "numeric"
"type": "string",
"validation": "list",
"value": ["binary", "inverse", "truncate", "tozero", "otsu"]
},
"--max": {
"type": "numeric",
......
......@@ -555,7 +555,7 @@ class Image(object):
Thresholds the image based on the given type. The image must be
grayscale to be thresholded. If the image is of type 'bgr' it is
automatically converted to grayscale before thresholding.
Supported types are: binary, truncate, tozero, and otsu.
Supported types are: binary, inverse, truncate, tozero, and otsu.
"""
if self._isColor():
self.convertColor("bgr", "gray")
......
......@@ -7,7 +7,7 @@ parser = argparse.ArgumentParser(description = "Converts an image between color
parser.add_argument("--input", dest="input", help="Path to input image.", required = True)
parser.add_argument("--thresh", dest="thresh", default=127, type=int, help="Threshold cutoff value.")
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.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment