Domino phase-retrieval algorithm for structure determination using electron diffraction and high-resolution transmission electron microscopy patterns.