Framework for three-dimensional coherent diffraction imaging by focused beam x-ray Bragg ptychography.