ADD Rician noise to dMRI data


#1

Hello MRtrix experts,

I want to simulate different noise regimes and I was wondering if there was a quick way to add Rician distributed noise to dMRI data in MRtrix, as my implementation is really slow!

Thank you,

Giorgia


#2

You can use mrcalc with the randn input:

$ mrcalc in.mif randn -add 2 -pow randn 2 -pow -add -sqrt noisy.mif
mrcalc: [100%] computing: sqrt (((in.mif + randn())^2 + randn()^2))

Or using complex numbers:

$ mrcalc in.mif randn 1i randn -mult -add -add -abs noisy.mif
mrcalc: [100%] computing: |(in.mif + (randn() + (0+1i * randn())))|

If you want to specify the noise level as an additional variable:

$ noise=10
$ mrcalc in.mif $noise randn 1i randn -mult -add -mult -add -abs noisy.mif
mrcalc: [100%] computing: |(in.mif + (10 * (randn() + (0+1i * randn()))))|