diff --git a/premc_mincmorph.py b/premc_mincmorph.py index e1a951b..9f955c2 100755 --- a/premc_mincmorph.py +++ b/premc_mincmorph.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from argparse import ArgumentParser, Namespace from concurrent.futures import ThreadPoolExecutor from pathlib import Path @@ -13,6 +14,8 @@ parser = ArgumentParser(description='Smoothen masks using mincmorph') parser.add_argument('-p', '--pattern', default='**/*.mnc', help='pattern for file names to include') +parser.add_argument('-q', '--quiet', action='store_true', + help='disable status messages') def premc_mincmorph(mask: Path, smoothened: Path) -> None: @@ -27,6 +30,9 @@ def premc_mincmorph(mask: Path, smoothened: Path) -> None: min_cpu_limit='1000m', ) def main(options: Namespace, inputdir: Path, outputdir: Path): + if options.quiet: + logger.remove() + logger.add(sys.stderr, level='WARNING') results = [] with ThreadPoolExecutor(max_workers=len(os.sched_getaffinity(0))) as pool: diff --git a/setup.py b/setup.py index 8f1a1ae..078d441 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name = 'premc-mincmorph', - version = '0.1.0', + version = '0.1.1', description = 'Smoothen a mask in preparation for marching cubes.', author = 'Jennings Zhang', author_email = 'Jennings.Zhang@childrens.harvard.edu',