scil_frf_msmt.py

usage: __main__.py [-h] [--mask MASK] [--mask_wm MASK_WM] [--mask_gm MASK_GM]
                   [--mask_csf MASK_CSF] [--fa_thr_wm FA_THR_WM]
                   [--fa_thr_gm FA_THR_GM] [--fa_thr_csf FA_THR_CSF]
                   [--md_thr_gm MD_THR_GM] [--md_thr_csf MD_THR_CSF]
                   [--min_nvox MIN_NVOX] [--tolerance TOLERANCE]
                   [--skip_b0_check] [--dti_bval_limit DTI_BVAL_LIMIT]
                   [--roi_radii ROI_RADII [ROI_RADII ...]]
                   [--roi_center tuple(3) tuple(3) tuple(3)]
                   [--wm_frf_mask file] [--gm_frf_mask file]
                   [--csf_frf_mask file] [-v [{DEBUG,INFO,WARNING}]] [-f]
                   in_dwi in_bval in_bvec out_wm_frf out_gm_frf out_csf_frf

Compute response functions for multi-shell multi-tissue (MSMT) constrained
spherical deconvolution from DWI data.

The script computes a response function for white-matter (wm),
gray-matter (gm), csf and the mean b=0.
    - In the wm, we compute the response function in each voxel where the FA is
      superior at threshold_fa_wm.
    - In the gm (or csf), we compute the response function in each voxel where
      the FA is below at threshold_fa_gm (or threshold_fa_csf) and where the MD
      is below threshold_md_gm (or threshold_md_csf).

We output one response function file for each tissue, containing the response
function for each b-value (arranged by lines). These are saved as the diagonal
of the axis-symmetric diffusion tensor (3 e-values) and a mean b0 value.
For example, a typical wm_frf is [15e-4, 4e-4, 4e-4, 700], where the tensor
e-values are (15,4,4)x10^-4 mm^2/s and the mean b0 is 700.

Based on B. Jeurissen et al., Multi-tissue constrained spherical deconvolution
for improved analysis of multi-shell diffusion MRI data. Neuroimage (2014)

Formerly: scil_compute_msmt_frf.py

positional arguments:
  in_dwi                Path to the input diffusion volume.
  in_bval               Path to the bval file, in FSL format.
  in_bvec               Path to the bvec file, in FSL format.
  out_wm_frf            Path to the output WM frf file, in .txt format.
  out_gm_frf            Path to the output GM frf file, in .txt format.
  out_csf_frf           Path to the output CSF frf file, in .txt format.

options:
  -h, --help            show this help message and exit
  --mask MASK           Path to a binary mask. Only the data inside the mask
                        will be used for computations and reconstruction.
                        Useful if no tissue masks are available.
  --mask_wm MASK_WM     Path to the input WM mask file, used to improve the
                        final WM frf mask.
  --mask_gm MASK_GM     Path to the input GM mask file, used to improve the
                        final GM frf mask.
  --mask_csf MASK_CSF   Path to the input CSF mask file, used to improve the
                        final CSF frf mask.
  --fa_thr_wm FA_THR_WM
                        If supplied, use this threshold to select single WM
                        fiber voxels from the FA inside the WM mask defined by
                        mask_wm. Each voxel above this threshold will be
                        selected. [0.7]
  --fa_thr_gm FA_THR_GM
                        If supplied, use this threshold to select GM voxels
                        from the FA inside the GM mask defined by mask_gm.
                        Each voxel below this threshold will be selected.
                        [0.2]
  --fa_thr_csf FA_THR_CSF
                        If supplied, use this threshold to select CSF voxels
                        from the FA inside the CSF mask defined by mask_csf.
                        Each voxel below this threshold will be selected.
                        [0.1]
  --md_thr_gm MD_THR_GM
                        If supplied, use this threshold to select GM voxels
                        from the MD inside the GM mask defined by mask_gm.
                        Each voxel below this threshold will be selected.
                        [0.0007]
  --md_thr_csf MD_THR_CSF
                        If supplied, use this threshold to select CSF voxels
                        from the MD inside the CSF mask defined by mask_csf.
                        Each voxel below this threshold will be selected.
                        [0.003]
  --min_nvox MIN_NVOX   Minimal number of voxels needed for each tissue masks
                        in order to proceed to frf estimation. [100]
  --tolerance TOLERANCE
                        The tolerated gap between the b-values to extract and
                        the current b-value. [20]
  --skip_b0_check       By default, we supervise that at least one b0 exists
                        in your data (i.e. b-values below the default
                        --tolerance). Use this option to allow continuing even
                        if the minimum b-value is suspiciously high. Use with
                        care, and only if you understand your data.
  --dti_bval_limit DTI_BVAL_LIMIT
                        The highest b-value taken for the DTI model. [1200]
  --roi_radii ROI_RADII [ROI_RADII ...]
                        If supplied, use those radii to select a cuboid roi to
                        estimate the response functions. The roi will be a
                        cuboid spanning from the middle of the volume in each
                        direction with the different radii. The type is either
                        an int (e.g. --roi_radii 10) or an array-like (3,)
                        (e.g. --roi_radii 20 30 10). [[20]]
  --roi_center tuple(3) tuple(3) tuple(3)
                        If supplied, use this center to span the cuboid roi
                        using roi_radii. [center of the 3D volume] (e.g.
                        --roi_center 66 79 79)
  --wm_frf_mask file    Path to the output WM frf mask file, the voxels used
                        to compute the WM frf.
  --gm_frf_mask file    Path to the output GM frf mask file, the voxels used
                        to compute the GM frf.
  --csf_frf_mask file   Path to the output CSF frf mask file, the voxels used
                        to compute the CSF frf.
  -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.