scil_dwi_extract_b0.py

usage: __main__.py [-h] [--all | --mean | --cluster-mean | --cluster-first]
                   [--block-size INT] [--single-image] [--b0_threshold thr]
                   [--skip_b0_check] [-v [{DEBUG,INFO,WARNING}]] [-f]
                   in_dwi in_bval in_bvec out_b0

Extract B0s from DWI, based on the bval and bvec information.

The default behavior is to save the first b0 of the series.

Formerly: scil_extract_b0.py

positional arguments:
  in_dwi                DWI Nifti image.
  in_bval               b-values filename, in FSL format (.bval).
  in_bvec               b-values filename, in FSL format (.bvec).
  out_b0                Output b0 file(s).

options:
  -h, --help            show this help message and exit
  --block-size INT, -s INT
                        Load the data using this block size. Useful
                        when the data is too large to be loaded in memory.
  --single-image        If output b0 volume has multiple time points, only outputs a single
                        image instead of a numbered series of images.
  --b0_threshold thr    Threshold under which b-values are considered to be b0s.
                        [Default: 20]
                        * Note. We would expect to find at least one b-value in the
                          range [0, b0_threshold]. To skip this check, use --skip_b0_check.
  --skip_b0_check       By default, we supervise that at least one b0 exists in your data
                        (i.e. b-values below the default --b0_threshold). Use this option to
                        allow continuing even if the minimum b-value is suspiciously high.
                        If no b-value is found below the threshold, the script will continue
                        with your minimal b-value as new --b0_threshold.
                        Use with care, and only if you understand your data.
  -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.

Options in the case of multiple b0s.:
  --all                 Extract all b0s. Index number will be appended to the output file.
  --mean                Extract mean b0.
  --cluster-mean        Extract mean of each continuous cluster of b0s.
  --cluster-first       Extract first b0 of each continuous cluster of b0s.