MP2RAGE background removal in LEMON dataset

random follow-up. for fun i translated that afni approach to antspy in case this is helpful to anyone:

import ants
uni = ants.image_read(“MP2RAGE_UNI_IMAGES.nii”)
inv2 = ants.image_read(“MP2RAGE_INV2.nii”)
inv2n4 = ants.n4_bias_field_correction(inv2)
max = inv2n4.max()
min = inv2n4.min()
inv2norm = (inv2n4-min) / (max-min)
bns = uni * inv2norm
ants.image_write(bns, “background_noise_suppressed.nii.gz”)

LAYNII has a tool to remove the salt and pepper noise from MP2RAGE.

Here is a whole blog post about it:

2 Likes