In a method and device for generating 4D flow images by operation of a magnetic resonance system, a volume flow data record is recorded, wherein the flow is encoded in a single direction. This is subsequently repeated with all the flow encoding directions. From the raw data associated with the individual flow encoding directions, phase images and magnitude images are calculated. Deformation fields are calculated on the basis of the magnitude images. The deformation fields are applied to the calculated phase images. Finally, a 4D flow velocity field is calculated, on the basis of a phase difference reconstruction of the corrected phase images.