nipype.interfaces.fsl.possum module

The possum module provides classes for interfacing with POSSUM command line tools. Please, check out the link for pertinent citations using POSSUM.

Note

This was written to work with FSL version 5.0.6.

B0Calc

Link to code

Bases: FSLCommand

Wrapped executable: b0calc.

B0 inhomogeneities occur at interfaces of materials with different magnetic susceptibilities, such as tissue-air interfaces. These differences lead to distortion in the local magnetic field, as Maxwell’s equations need to be satisfied. An example of B0 inhomogneity is the first volume of the 4D volume `$FSLDIR/data/possum/b0_ppm.nii.gz`.

Examples

>>> from nipype.interfaces.fsl import B0Calc
>>> b0calc = B0Calc()
>>> b0calc.inputs.in_file = 'tissue+air_map.nii'
>>> b0calc.inputs.z_b0 = 3.0
>>> b0calc.inputs.output_type = "NIFTI_GZ"
>>> b0calc.cmdline
'b0calc -i tissue+air_map.nii -o tissue+air_map_b0field.nii.gz --chi0=4.000000e-07 -d -9.450000e-06 --extendboundary=1.00 --b0x=0.00 --gx=0.0000 --b0y=0.00 --gy=0.0000 --b0=3.00 --gz=0.0000'
Mandatory Inputs:

in_file (a pathlike object or string representing an existing file) – Filename of input image (usually a tissue/air segmentation). Maps to a command-line argument: -i %s (position: 0).

Optional Inputs:
  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • chi_air (a float) – Susceptibility of air. Maps to a command-line argument: --chi0=%e. (Nipype default value: 4e-07)

  • compute_xyz (a boolean) – Calculate and save all 3 field components (i.e. x,y,z). Maps to a command-line argument: --xyz. (Nipype default value: False)

  • delta (a float) – Delta value (chi_tissue - chi_air). Maps to a command-line argument: -d %e. (Nipype default value: -9.45e-06)

  • directconv (a boolean) – Use direct (image space) convolution, not FFT. Maps to a command-line argument: --directconv. (Nipype default value: False)

  • environ (a dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’) – Environment variables. (Nipype default value: {})

  • extendboundary (a float) – Relative proportion to extend voxels at boundary. Maps to a command-line argument: --extendboundary=%0.2f. (Nipype default value: 1.0)

  • out_file (a pathlike object or string representing a file) – Filename of B0 output volume. Maps to a command-line argument: -o %s (position: 1).

  • output_type (‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’) – FSL output type.

  • x_b0 (a float) – Value for zeroth-order b0 field (x-component), in Tesla. Maps to a command-line argument: --b0x=%0.2f. Mutually exclusive with inputs: xyz_b0. (Nipype default value: 0.0)

  • x_grad (a float) – Value for zeroth-order x-gradient field (per mm). Maps to a command-line argument: --gx=%0.4f. (Nipype default value: 0.0)

  • xyz_b0 (a tuple of the form: (a float, a float, a float)) – Zeroth-order B0 field in Tesla. Maps to a command-line argument: --b0x=%0.2f --b0y=%0.2f --b0=%0.2f. Mutually exclusive with inputs: x_b0, y_b0, z_b0.

  • y_b0 (a float) – Value for zeroth-order b0 field (y-component), in Tesla. Maps to a command-line argument: --b0y=%0.2f. Mutually exclusive with inputs: xyz_b0. (Nipype default value: 0.0)

  • y_grad (a float) – Value for zeroth-order y-gradient field (per mm). Maps to a command-line argument: --gy=%0.4f. (Nipype default value: 0.0)

  • z_b0 (a float) – Value for zeroth-order b0 field (z-component), in Tesla. Maps to a command-line argument: --b0=%0.2f. Mutually exclusive with inputs: xyz_b0. (Nipype default value: 1.0)

  • z_grad (a float) – Value for zeroth-order z-gradient field (per mm). Maps to a command-line argument: --gz=%0.4f. (Nipype default value: 0.0)

Outputs:

out_file (a pathlike object or string representing an existing file) – Filename of B0 output volume.