Ejemplo n.º 1
0
        print(json.dumps({'tilingComplete': args.slidepath}))

        total_points_found, hpf_centers, hpf_points = find_hpfs(results)
        hpfs = list(zip(hpf_centers, hpf_points))

        basename = os.path.basename(args.slidepath)
        with OpenSlide(args.slidepath) as slide:
            hpf_data = visualize(slide,
                                 hpf_centers,
                                 hpf_points,
                                 dir='.',
                                 basename=basename)
        elapsed = time.time() - start

        tiler.cleanup()

        shutil.rmtree(TMP_DIR)

        print(
            json.dumps({
                'processingComplete':
                args.slidepath,
                'elapsedTime':
                time.strftime("%H:%M:%S", time.gmtime(elapsed)),
                'eosinophilCount':
                total_points_found,
                'hpf':
                hpf_data
            }))
    except: