(a) Original image, (b) gain field from N3, (c) corrected image using N3, (d) patch-based gain field, smoothed using a 5mm Gaussian kernel, (e) the corrected image using the patch-based gain field, (f) – (j) similar images for another IBSR subject with almost sinusoidal inhomogeneity and an intensity artifact near temporal lobe. N3 cannot recover the sinusoid looking field as well as the artifact, while our method recovers the field to some extent.