forked from uncbiag/OAI_analysis_2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request uncbiag#1 from PaulHax/cli
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Usage | ||
# python oai_analysis/pipeline_cli.py oai_analysis/data/test_data/colab_case/image_preprocessed.nii.gz OAI_results | ||
|
||
import argparse | ||
from pipeline import analysis_pipeline | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description='OAI Analysis CLI') | ||
parser.add_argument('input_path', type=str, help='Path to image file or directory containing DICOM series') | ||
parser.add_argument('output_dir', type=str, help='Directory to make output files') | ||
parser.add_argument( | ||
'--no_intermediates', | ||
action='store_true', | ||
help='Do not write files representing intermediate steps to the output directory', | ||
) | ||
|
||
args = parser.parse_args() | ||
|
||
analysis_pipeline(args.input_path, args.output_dir, not args.no_intermediates) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |