Phase contrast and dark-field X-ray imaging enable imaging of objects that absorb or reflect very little X-ray light. Disclosed is a method and systems for performing coded-mask-based multi-contrast imaging (CMMI). The method includes providing radiation to a coded mask that has a known phase and absorption profile according to a pre-determined pattern. The radiation is then impingent upon a sample, and the radiation is detected to perform phase-reconstruction and image processing. The method and associated systems allow for the use of maximum-likelihood and machine learning methods for reconstruction images of the sample from the detected radiation.