DWI denoising ============= MRtrix includes the command ``dwidenoise``, which implements dMRI noise level estimation and denoising based on random matrix theory. The method exploits data redundancy in the patch-level PCA domain ([Veraart2016a]_, [Veraart2016b]_ and [CorderoGrande2019]_). The method uses the prior knowledge that the eigenspectrum of random covariance matrices is described by the universal Marchenko-Pastur (MP) distribution. Recommended use --------------- Image denoising must be performed as the first step of the image-processing pipeline. Interpolation or smoothing in other processing steps, such as motion and distortion correction, may alter the noise characteristics and thus violate the assumptions upon which MP-PCA is based. Typical use will be: :: dwidenoise dwi.mif out.mif -noise noise.mif where ``dwi.mif`` contains the raw input DWI image, ``out.mif`` is the denoised DWI output, and ``noise.mif`` is the estimated spatially-varying noise level. We always recommend eyeballing the residuals, i.e. out - in, as part of the quality control. The lack of anatomy in the residual maps is a marker of accuracy and signal-preservation during denoising. The residuals can be easily obtained with :: mrcalc dwi.mif out.mif -subtract res.mif mrview res.mif Advanced options ---------------- Patch size ^^^^^^^^^^ The noise level in MRI is spatially varying, due to the proximity of the coil elements and parallel imaging. Noise level estimation and denoising therefore operates in image patches around each voxel, where the noise can be assumed to be approximately homoscedastic. The patch size can be chosen by the user with the option ``-extent``. For maximal SNR gain (when using Exp2, see below) we suggest to choose :math:`N \approx M`, where :math:`M` is the no. DW volumes and :math:`N` is the number of kernel elements. However, larger kernels also extend the required run time, so in large datasets it might be beneficial to select smaller sliding kernels. By default, the command will select the smallest isotropic patch size that exceeds the number of DW images in the input data, e.g., 5x5x5 for data with <= 125 DWI volumes, 7x7x7 for data with <= 343 DWI volumes, etc. Noise level estimation ^^^^^^^^^^^^^^^^^^^^^^ The noise level in each patch is experimentally estimated from the eigenvalue spectrum of the local data matrix. Assuming :math:`M