shapely is added mainly because it's a better abstraction of geometries that can handle exterior and interior rings. It also supports spatial indexing trees if we ever want to introduce fast region selection by annotation and masks in the future.
use PIL.ImageDraw.polygon instead of skimage.draw.polygon as the former directly works on a provided mask handle, therefore hiding internal loops to fill pixel values.
(2) Move dynamical imports to a standalone package (openslide and typing related
perhaps we can move forward from python3.7~python3.8 to python3.8+ in the future? More typing annotation supports and syntactic sugars could make life easier, besides many other AIML libraries are extended to new major Python versions.
(3) Add other required Windows binaries/lib for openslide into bin/. If we provide a precompiled dll of openslide in the local folder, all its dependencies should also be present. The binaries and the import wrapper of openslide are basically bandaids to mitigate the change of behavior of dll imports in Windows.
Fix #258 @nanli-emory @choosehappy (1) Rework AnnotationModule.py (adding histoqc.annotations module- dependency: shapely which requires numpy>=1.14 - compatible).
(2) Move dynamical imports to a standalone package (openslide and typing related
(3) Add other required Windows binaries/lib for openslide into bin/. If we provide a precompiled dll of openslide in the local folder, all its dependencies should also be present. The binaries and the import wrapper of openslide are basically bandaids to mitigate the change of behavior of dll imports in Windows.