We present a general algorithm for combining measurements taken under various illumination and imaging conditions to quantitatively extract the amplitude and phase of an object wave. The algorithm uses the weak object transfer function, which incorporates arbitrary pupil functions and partially coherent illumination. The approach is extended beyond the weak object regime using an iterative algorithm. We demonstrate the method on measurements of Extreme Ultraviolet Lithography (EUV) multilayer mask defects taken in an EUV zone plate microscope with both a standard zone plate lens and a zone plate implementing Zernike phase contrast. Am. 73, 1434Am. 73, (1983. 5. J. R. Fienup, "Phase retrieval algorithms: a comparison," Appl. Opt. 21, 2758Opt. 21, -2769Opt. 21, (1982. 217, 408-432 (1953). 32. C. Chang, A. Sakdinawat, P. Fischer, E. Anderson, and D. Attwood, "Single-element objective lens for soft x-ray differential interference contrast microscopy," Opt. Lett. 31, 1564Lett. 31, -1566Lett. 31, (2006. 33. F. Zernike, "Phase contrast, a new method for the microscopic observation of transparent objects," Physica 9, 686-698 (1942