scil_dwi_compute_snr.py

usage: __main__.py [-h] [--noise_mask NOISE_MASK | --noise_map NOISE_MAP]
                   [--b0_thr B0_THR] [--out_basename OUT_BASENAME]
                   [--split_shells] [--indent INDENT] [--sort_keys]
                   [-v [{DEBUG,INFO,WARNING}]] [-f]
                   in_dwi in_bval in_bvec in_mask

Script to compute signal to noise ratio (SNR) in a region of interest (ROI)
of a DWI volume.

It will compute the SNR for all DWI volumes of the input image seperately.
The output will contain the SNR which is the ratio of
mean(signal) / std(noise).
The mean of the signal is computed inside the mask.
The standard deviation of the noise is estimated inside the noise_mask
or inside the same mask if a noise_map is provided.
If it's not supplied, it will be estimated using the data outside the brain,
computed with Dipy medotsu

If verbose is True, the SNR for every DWI volume will be output.

This works best in a well-defined ROI such as the corpus callosum.
It is heavily dependent on the ROI and its quality.

We highly recommend using a noise_map if you can acquire one.
See refs [1, 2] that describe the noise map acquisition.
[1] St-Jean, et al (2016). Non Local Spatial and Angular Matching...
    https://doi.org/10.1016/j.media.2016.02.010
[2] Reymbaut, et al (2021). Magic DIAMOND...
    https://doi.org/10.1016/j.media.2021.101988

Formerly: scil_snr_in_roi.py

positional arguments:
  in_dwi                Path of the input diffusion volume.
  in_bval               Path of the bvals file, in FSL format.
  in_bvec               Path of the bvecs file, in FSL format.
  in_mask               Binary mask of the region used to estimate SNR.

options:
  -h, --help            show this help message and exit
  --b0_thr B0_THR       All b-values with values less than or equal to b0_thr are considered as b0s i.e. without diffusion weighting. [0.0]
  --out_basename OUT_BASENAME
                        Path and prefix for the various saved file.
  --split_shells        SNR will be split into shells.
  -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.

Masks options:
  --noise_mask NOISE_MASK
                        Binary mask used to estimate the noise from the DWI.
  --noise_map NOISE_MAP
                        Noise map.

Json options:
  --indent INDENT       Indent for json pretty print.
  --sort_keys           Sort keys in output json.