  We apply a recently developed method combining first principles based Wannier
functions with solutions to the Bogoliubov-de Gennes equations to the problem
of interpreting STM data in cuprate superconductors. We show that the observed
images of Zn on the surface of Bi$_2$Sr$_2$CaCu$_2$O$_8$ can only be understood
by accounting for the tails of the Cu Wannier functions, which include
significant weight on apical O sites in neighboring unit cells. This
calculation thus puts earlier crude "filter" theories on a microscopic
foundation and solves a long standing puzzle. We then study quasiparticle
interference phenomena induced by out-of-plane weak potential scatterers, and
show how patterns long observed in cuprates can be understood in terms of the
interference of Wannier functions above the surface. Our results show excellent
agreement with experiment and enable a better understanding of novel phenomena
in the cuprates via STM imaging.
