MCPcopy Create free account
hub / github.com/DIVE128/DMVSNet / pcd_filter

Function pcd_filter

filter/pcd.py:388–410  ·  view source on GitHub ↗
(args, testlist, number_worker,suffix=None)

Source from the content-addressed store, hash-verified

386
387
388def pcd_filter(args, testlist, number_worker,suffix=None):
389 if not os.path.exists(os.path.join(args.outdir,"pcd")):
390 os.makedirs(os.path.join(args.outdir,"pcd"))
391
392 if number_worker>1:
393 partial_func = partial(pcd_filter_worker, args)
394
395 p = Pool(number_worker, init_worker)
396 try:
397 p.map(partial_func, testlist)
398 except KeyboardInterrupt:
399 print("....\nCaught KeyboardInterrupt, terminating workers")
400 p.terminate()
401 else:
402 p.close()
403 p.join()
404 else:
405 if suffix is not None:
406 if not os.path.exists(os.path.join(args.outdir,"pcd_{}".format(suffix))):
407 os.makedirs(os.path.join(args.outdir,"pcd_{}".format(suffix)))
408
409 for scene in testlist:
410 pcd_filter_worker(args,scene,suffix=suffix)

Callers 1

testMethod · 0.90

Calls 2

printFunction · 0.85
pcd_filter_workerFunction · 0.85

Tested by

no test coverage detected