def main(): try: require_python_version('2.6', 'Version 2.6 is required for shutil ignorefiles copy functionality.') arguments = parse_arguments(sys.argv[1:]) visitdir = Visit_directory(arguments['subid'], arguments['raw_scans_directory'], arguments['processed_scans_directory']) visitdir.prepare_working_directory(visitdir.working_directory) visitdir.parse_scans_and_create_directory_index() visitdir.preprocess_each_scan() if arguments["cleanup"]: visitdir.tidy_up() except IOError as e: print "There was an IO error in processing:"; print e
def main(): t = TransferTask(sys.argv[1:]) t.set_process_pool(t.study_vars) t.check_paths() if 'doTransfer' in t.process_pool: t.transfer() if 'doCreateIndexFile' in t.process_pool or 'doAnatRecon' in t.process_pool: visitdir = Visit_directory(t.subid, t.anatomicals_directory, t.processed_scans_directory) visitdir.prepare_working_directory(visitdir.working_directory) if 'doCreateIndexFile' in t.process_pool: visitdir.parse_scans_and_create_directory_index() if 'doAnatRecon' in t.process_pool: visitdir.preprocess_each_scan()