1. A non-transitory computer-readable storage medium having instructions stored therein, the instructions executable by a processor to cause the processor to perform operations comprising: receiving a plurality of target images; receiving a reference image that overlaps the plurality of target images; preprocessing the plurality of target images, wherein the preprocessing includes: rejecting one or more first target images of the plurality of target images with a shadow region above a shadow threshold while keeping one or more second target images of the plurality of target images with a shadow region below the shadow threshold; for each second target image: transforming the second target image into an atlas projection to match the reference image; and partitioning the transformed target image into a plurality of sub-regions; determining a matching statistic for each sub-region to determine a location for each sub-region relative to a corresponding portion of the reference image; and determining an alignment of each sub-region with the corresponding portion of the reference image based on the determined matching statistic for each sub-region.