Using nilearn.image.clean_img

Hi,

I’m testing nilearn.image.clean_img for denoising of my epi images. However, I’m not sure if my denoised data look as it should look like.

There is a mean of my 4D nifti image:

not_denoised

Below is a mean of 4D nifti denoised images obtained after applying:
image.clean_img(img, confounds = confounds, detrend = True, standardize = True)

denoised

Is this correct output after applying nilearn.image.clean_img ?

Thanks,
Karolina

Yes, this seems like a correct output: you used detrend=True and standardize=True. Hence the code removed the mean at each voxel. Once the mean is removed at each voxel, the image no longer has much structure visible to the naked eye. Whether you should be doing this or not depends on your application.

1 Like