usage: __main__.py [-h] [--mask_denoise MASK_DENOISE] [--gaussian]
(--sigma float | --basic_sigma | --piesno)
[--number_coils NUMBER_COILS]
[--mask_sigma MASK_SIGMA | --sigma_from_all_voxels]
[--save_piesno_mask filepath] [--processes NBR]
[-v [{DEBUG,INFO,WARNING}]] [-f]
in_image out_image
Script to denoise a dataset with the Non-Local Means algorithm (from Dipy's
package).
This method requires an estimate of the noise (sigma). There are three methods
available:
1. Provide your own sigma value, if you already know it.
2. Estimate it through Dipy's "noise_estimate" method.
Here are Dipy's note on this method:
> This function is the same as manually taking the standard deviation of
> the background and gives one value for each 3D volume. It also includes
> the coil-dependent correction factor of Koay 2006 (see [1], equation 18)
> with theta = 0. Since this function was introduced in [2] for T1
> imaging, it is expected to perform ok on diffusion MRI data, but might
> oversmooth some regions and leave others un-denoised for spatially
> varying noise profiles. Consider using --piesno to estimate sigma
> instead if visual inaccuracies are apparent in the denoised result.
(Note. We then use the median of the noise for all volumes)
3. Estimate it through using Dipy's "Piesno" method, as described in [3].
Here are Dipy's note on this method:
> It is expected that
> 1. The data has a noisy, non-masked background and
> 2. The data is a repetition of the same measurements along the last
> axis, i.e. dMRI or fMRI data, not structural data like T1 or T2
> images.
The two last methods require the number of coils in the data to be known.
Typically, if you know that the noise follows a Gaussian distribution, you
may use --number_coils=0.
References:
[1] Koay, C. G., & Basser, P. J. (2006). Analytically exact correction scheme
for signal extraction from noisy magnitude MR signals. Journal of Magnetic
Resonance, 179(2), 317-22.
[2] Coupe, P., Yger, P., Prima, S., Hellier, P., Kervrann, C., Barillot,
C., (2008). An optimized blockwise nonlocal means denoising filter for 3-D
magnetic resonance images, IEEE Trans. Med. Imaging 27, 425-41.
[3] St-Jean, S., Coupé, P., & Descoteaux, M. (2016). Non Local Spatial and
Angular Matching: Enabling higher spatial resolution diffusion MRI datasets
through adaptive denoising. Medical image analysis, 32, 115-130.
[4] Koay CG, Ozarslan E and Pierpaoli C. "Probabilistic Identification and
Estimation of Noise (PIESNO): A self-consistent approach and its applications
in MRI." Journal of Magnetic Resonance 2009; 199: 94-103.
Formerly: scil_run_nlmeans.py
positional arguments:
in_image Path of the image file to denoise (3D or 4D data)
out_image Path to save the denoised image file.
options:
-h, --help show this help message and exit
--mask_denoise MASK_DENOISE
Path to a binary mask. Only the data inside the mask will be denoised. If not provided, only non-zero voxels will be denoised.
--gaussian If you know that your data contains gaussian noise, use this option. Otherwise, Rician is assumed.
--processes NBR Number of sub-processes to start.
Default: [1]
-v [{DEBUG,INFO,WARNING}]
Produces verbose output depending on the provided level.
Default level is warning, default when using -v is info.
-f Force overwriting of the output files.
Noise estimation methods:
--sigma float Provide your own standard deviation of the noise.
--basic_sigma Use dipy's basic estimation of sigma.
--piesno Estimate sigma using Piesno's method.
Noise estimation options: piesno and basic:
--number_coils NUMBER_COILS
Option for Dipy's noise estimation. Here is their description:
>Number of coils of the receiver array. Use N = 1 in case of a
>SENSE reconstruction (Philips scanners) or the number of
>coils for a GRAPPA reconstruction (Siemens and GE). Use 0 to
>disable the correction factor, as for example if the noise is
>Gaussian distributed. See [1] for more information.
Note. If you don't know the number of coils, 0 will probably work.
Noise estimation options: basic:
--mask_sigma MASK_SIGMA
Path to a binary mask for --basic_sigma estimation. Only the data inside the mask will be used to estimate sigma. If not provided, only non-zero voxels will be used.
--sigma_from_all_voxels
If set, all voxels are used for the --basic_sigma estimation, even zeros.
Noise estimation options: piesno:
--save_piesno_mask filepath
If set, save piesno mask.
Scilpy version: 2.0.2