We derive and implement an algorithm that takes noisy magnetic resonance velocimetry (MRV) images of Stokes flow and infers the velocity field, the most likely position of the boundary, the inlet and outlet boundary conditions, and any body forces. We do this by minimizing a discrepancy norm of the velocity fields between the MRV experiment and the Stokes problem, and at the same time we obtain a filtered (denoised) version of the original MRV image. We describe two possible approaches to regularize the inverse problem, using either a variational technique, or Gaussian random fields. We test the algorithm for flows governed by a Poisson or a Stokes problem, using both real and synthetic MRV measurements. We find that the algorithm is capable of reconstructing the shape of the domain from artificial images with a low signal-to-noise ratio.