qsirecon.interfaces.gradients module

Handle merging and spliting of DSI files.

class qsirecon.interfaces.gradients.ExtractB0s(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Extract a b0 series and a mean b0 from a dwi series.

Mandatory Inputs:

dwi_series (a pathlike object or string representing an existing file)

Optional Inputs:
  • b0_indices (a list of items which are any value)

  • b0_threshold (an integer) – (Nipype default value: 50)

  • bval_file (a pathlike object or string representing an existing file)

Outputs:
  • b0_average (a pathlike object or string representing an existing file)

  • b0_series (a pathlike object or string representing an existing file)

class qsirecon.interfaces.gradients.RemoveDuplicates(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Mandatory Inputs:
  • bval_file (a pathlike object or string representing an existing file)

  • bvec_file (a pathlike object or string representing an existing file)

  • dwi_file (a pathlike object or string representing an existing file)

Optional Inputs:
  • distance_cutoff (a float) – (Nipype default value: 5.0)

  • expected_directions (an integer)

  • local_bvec_file (a pathlike object or string representing an existing file)

Outputs:
  • bval_file (a pathlike object or string representing an existing file)

  • bvec_file (a pathlike object or string representing an existing file)

  • dwi_file (a pathlike object or string representing an existing file)

  • local_bvec_file (a pathlike object or string representing an existing file)

qsirecon.interfaces.gradients.concatenate_bvals(bval_list, out_file)[source]

Create an FSL-style bvals file from split bval files.

qsirecon.interfaces.gradients.concatenate_bvecs(input_files)[source]

Create Dipy-style gradient array (3-columns) from bvec files.