An apparatus for imaging an object by means of X-ray radiation, wherein the object causes an altered phase information of the X-ray radiation according to a local refraction index, the apparatus comprising: a radiation source for emitting the X-ray radiation which transmits through said object; a radiation detector for detecting the X-ray radiation; a DPCI-based grating interferometer setup of the Talbot-Lau type for differential phase contrast imaging with said interferometer setup including at least one source grating (G 0) for achieving spatial beam coherence, realized as an arrayed aperture mask with periodically modulated transmission and placed in downstream direction immediately behind the radiation source, at least one diffractive grating (G 1) with a periodic structure, which serves as a phase-shifting beam splitter generating self-images according to the Talbot effect, at least one analyzer grating (G 2) placed behind the at least one diffractive grating (G 1) and in front of the radiation detector, wherein said radiation detector comprises a wave absorber with a periodical structured attenuation strength adapted to a self-image of the at least one diffractive grating (G 1), and a volume which is large enough to place the object to be imaged anywhere between the at least one source grating (G 0) and the at least one analyzer grating (G 2); and a processing means (μP) for gaining information representative of the object's local phase gradient ( ∂Φ ( x, y)/ ∂x) in at least one transverse direction (x) perpendicular to the interferometer setup's optical axis; characterised in that said processing means (μP) is adapted for determining at which pixel positions of a detected phase gradient image the local phase gradient exceeds a predefined threshold value and marking all these pixels as "bad", wherein information of an available absorption image is employed to detect phase wrappings; performing a line integration over the local phase gradient, thus yielding an integrated phase gradient image; analyzing the integrated phase gradient image for characteristic line artifacts occurring behind pixels of strong phase gradient which have been marked as "bad"; and introducing a correction phase offset of 2π radians or an integer multiple thereof at the position of each "bad" pixel if analysis shows that a measured 2π phase offset error or an integer multiple thereof between immediately adjacent line artifacts which is induced by said line integration persists after passing a pixel that has been marked as "bad" so as to compensate this 2π phase offset error or an integer multiple thereof. a radiation source for emitting the X-ray radiation which transmits through said object; a radiation detector for detecting the X-ray radiation; a DPCI-based grating interferometer setup of the Talbot-Lau type for differential phase contrast imaging with said interferometer setup including at least one source grating (G 0) for achieving spatial beam coherence, realized as an arrayed aperture mask with periodically modulated transmission and placed in downstream direction immediately behind the radiation source, at least one diffractive grating (G 1) with a periodic structure, which serves as a phase-shifting beam splitter generating self-images according to the Talbot effect, at least one analyzer grating (G 2) placed behind the at least one diffractive grating (G 1) and in front of the radiation detector, wherein said radiation detector comprises a wave absorber with a periodical structured attenuation strength adapted to a self-image of the at least one diffractive grating (G 1), and a volume which is large enough to place the object to be imaged anywhere between the at least one source grating (G 0) and the at least one analyzer grating (G 2); and a processing means (μP) for gaining information representative of the object's local phase gradient ( ∂Φ ( x, y)/ ∂x) in at least one transverse direction (x) perpendicular to the interferometer setup's optical axis; characterised in that said processing means (μP) is adapted for determining at which pixel positions of a detected phase gradient image the local phase gradient exceeds a predefined threshold value and marking all these pixels as "bad", wherein information of an available absorption image is employed to detect phase wrappings; performing a line integration over the local phase gradient, thus yielding an integrated phase gradient image; analyzing the integrated phase gradient image for characteristic line artifacts occurring behind pixels of strong phase gradient which have been marked as "bad"; and introducing a correction phase offset of 2π radians or an integer multiple thereof at the position of each "bad" pixel if analysis shows that a measured 2π phase offset error or an integer multiple thereof between immediately adjacent line artifacts which is induced by said line integration persists after passing a pixel that has been marked as "bad" so as to compensate this 2π phase offset error or an integer multiple thereof.