A short question on dwidenoise



Hello MRtrix experts,

I am using dwidenoise and have a quick question:
When no mask is specified (i.e., no -mask option is used), would the command consider the entire field of view or would it create a mask itself?



Hi @Xiaoping_Wu,

In case the -mask option is not specified, the entire field of view is denoised! The only “exception” of sorts are the few layers of voxels at the edge of the field of view. This should visually be pretty clear when looking e.g. at the input and denoised output of a few individual diffusion weighted images at a high b-value (low SNR).



Thanks Thijs for your prompt reply.
More questions: what data type does dwidenoise use? Would it follow the data type of the input image data or would it always use a default type (say float64)? Is there a way to specify the data type (I tried -datatype float64, but this did not work)?
Thanks much,


dwidenoise always uses float32, for speed purposes. I have made a version with user-changeable datatype some time ago that I’ll release at some point, but it’s on a branch with too many other changes. Do you really need double precision? If so, I can code it up in the current version.


Hello Daan,

Thanks for your reply. I believe single precision should suffice to my application and I do not need double precision.



One more question on using dwidenoise: is it true that the output noise map (i.e., with option -noise) is the estimate of standard deviation of the input magnitude image, which means it is not for the underlying gaussian distributed thermal noise in each receive coil?



Hi @Xiaoping_Wu,

This is true, the output noise level is the root-mean-squared error between the input and denoised data. It will always be estimated at the image-level, not at the level of the coil elements. However, whether or not the noise level incorporates Rician bias depends on your input data: only if you feed the method magnitude data this will be an issue. If you have access to the complex (phase-magnitude) images, you can calculate a phase-corrected real reconstruction (e.g. Prah et al., MRM 2010, and many others), which has Gaussian noise and thus obeys the assumptions of MP-PCA.

Hope that helps,