Translate the logic in [getTifBoundary.m](https://github.com/uw-loci/curvelets/blob/dongwoofiber/src/CurveAlign_CT-FIRE/getTifBoundary.m) to python.