Model-based artifact correction in MRI