Two- and three-dimensional de-drifting algorithms for fiducially marked image stacks.