fixed argparse to support shortcuts
Browse files- livermask/livermask.py +6 -6
livermask/livermask.py
CHANGED
@@ -67,17 +67,17 @@ def func(path, output, cpu, verbose, vessels, extension):
|
|
67 |
|
68 |
def main():
|
69 |
parser = argparse.ArgumentParser()
|
70 |
-
parser.add_argument('
|
71 |
help="set path of which image(s) to use.")
|
72 |
-
parser.add_argument('
|
73 |
help="set path to store the output.")
|
74 |
-
parser.add_argument('--cpu', action='store_true',
|
75 |
help="force using the CPU even if a GPU is available.")
|
76 |
-
parser.add_argument('--verbose', action='store_true',
|
77 |
help="enable verbose.")
|
78 |
-
parser.add_argument('--vessels', action='store_true',
|
79 |
help="segment vessels.")
|
80 |
-
parser.add_argument('
|
81 |
help="define the output extension. (default: .nii)")
|
82 |
ret = parser.parse_args(sys.argv[1:]); print(ret)
|
83 |
|
|
|
67 |
|
68 |
def main():
|
69 |
parser = argparse.ArgumentParser()
|
70 |
+
parser.add_argument('-i', '--input', type=str, nargs='?',
|
71 |
help="set path of which image(s) to use.")
|
72 |
+
parser.add_argument('-o', '--output', type=str, nargs='?',
|
73 |
help="set path to store the output.")
|
74 |
+
parser.add_argument('-c', '--cpu', action='store_true',
|
75 |
help="force using the CPU even if a GPU is available.")
|
76 |
+
parser.add_argument('-v', '--verbose', action='store_true',
|
77 |
help="enable verbose.")
|
78 |
+
parser.add_argument('-vs', '--vessels', action='store_true',
|
79 |
help="segment vessels.")
|
80 |
+
parser.add_argument('-e', '--extension', type=str, default=".nii",
|
81 |
help="define the output extension. (default: .nii)")
|
82 |
ret = parser.parse_args(sys.argv[1:]); print(ret)
|
83 |
|