czbiohub-sf / shrimPy

shrimPy: Smart High-throughput Robust Imaging & Measurement in Python
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Registration: find better cropping algorithm #124

Open ieivanov opened 10 months ago

ieivanov commented 10 months ago

LIR is overkill as we are always looking for the overlap between rectangular volumes aligned with the coordinate system axes. LIR allows finding overlaps between polygons of arbitrary shape and it's optimization algorithm is a bit slow for what we need. It still works well, so this is not a blocker, largely a user-experience enhancement.

Maybe try https://github.com/planetlabs/maxrect, https://shapely.readthedocs.io/en/stable/reference/shapely.intersection.html or simple min/max operations on the vertices.

see #102