dmriprep.interfaces.images module

Image tools interfaces.

class dmriprep.interfaces.images.ExtractB0(from_file=None, resource_monitor=None, **inputs)

Bases: nipype.interfaces.base.core.SimpleInterface

Extract all b=0 volumes from a dwi series.

Example

>>> os.chdir(tmpdir)
>>> extract_b0 = ExtractB0()
>>> extract_b0.inputs.in_file = str(data_dir / 'dwi.nii.gz')
>>> extract_b0.inputs.b0_ixs = [0, 1, 2]
>>> res = extract_b0.run()  
Mandatory Inputs
  • b0_ixs (a list of items which are an integer) – Index of b0s.

  • in_file (a pathlike object or string representing an existing file) – Dwi file.

Outputs

out_file (a pathlike object or string representing an existing file) – Output b0 file.

class dmriprep.interfaces.images.RescaleB0(from_file=None, resource_monitor=None, **inputs)

Bases: nipype.interfaces.base.core.SimpleInterface

Rescale the b0 volumes to deal with average signal decay over time.

Example

>>> os.chdir(tmpdir)
>>> rescale_b0 = RescaleB0()
>>> rescale_b0.inputs.in_file = str(data_dir / 'dwi.nii.gz')
>>> rescale_b0.inputs.mask_file = str(data_dir / 'dwi_mask.nii.gz')
>>> res = rescale_b0.run()  
Mandatory Inputs
  • in_file (a pathlike object or string representing an existing file) – B0s file.

  • mask_file (a pathlike object or string representing an existing file) – Mask file.

Outputs
  • out_b0s (a pathlike object or string representing an existing file) – Series of rescaled b0 volumes.

  • out_ref (a pathlike object or string representing an existing file) – One average b0 file.

  • signal_drift (a list of items which are a float) – Estimated signal drift factors.