nipype.interfaces.diffusion_toolkit.dti module

Provides interfaces to various commands provided by diffusion toolkit

DTIRecon

Link to code

Bases: CommandLine

Wrapped executable: dti_recon.

Use dti_recon to generate tensors and other maps

Mandatory Inputs:
  • DWI (a pathlike object or string representing an existing file) – Input diffusion volume. Maps to a command-line argument: %s (position: 1).

  • bvals (a pathlike object or string representing an existing file) – B values file.

  • bvecs (a pathlike object or string representing an existing file) – B vectors file. Maps to a command-line argument: -gm %s.

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

  • b0_threshold (a float) – Program will use b0 image with the given threshold to mask out high background of fa/adc maps. by default it will calculate threshold automatically. but if it failed, you need to set it manually. Maps to a command-line argument: -b0_th.

  • 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: {})

  • image_orientation_vectors (a list of from 6 to 6 items which are a float) – Specify image orientation vectors. if just one argument given, will treat it as filename and read the orientation vectors from the file. If 6 arguments are given, will treat them as 6 float numbers and construct the 1st and 2nd vector and calculate the 3rd one automatically. This information will be used to determine image orientation, as well as to adjust gradient vectors with oblique angle when. Maps to a command-line argument: -iop %f.

  • n_averages (an integer) – Number of averages. Maps to a command-line argument: -nex %s.

  • oblique_correction (a boolean) – When oblique angle(s) applied, some SIEMENS DTI protocols do not adjust gradient accordingly, thus it requires adjustment for correct diffusion tensor calculation. Maps to a command-line argument: -oc.

  • out_prefix (a string) – Output file prefix. Maps to a command-line argument: %s (position: 2). (Nipype default value: dti)

  • output_type (‘nii’ or ‘analyze’ or ‘ni1’ or ‘nii.gz’) – Output file type. Maps to a command-line argument: -ot %s. (Nipype default value: nii)

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

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

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

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

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

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

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

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

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

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

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

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

DTITracker

Link to code

Bases: CommandLine

Wrapped executable: dti_tracker.

Mandatory Inputs:

mask1_file (a pathlike object or string representing a file) – First mask image. Maps to a command-line argument: -m %s (position: 2).

Optional Inputs:
  • angle_threshold (a float) – Set angle threshold. default value is 35 degree. Maps to a command-line argument: -at %f.

  • angle_threshold_weight (a float) – Set angle threshold weighting factor. weighting will be applied on top of the angle_threshold. Maps to a command-line argument: -atw %f.

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

  • 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: {})

  • input_data_prefix (a string) – For internal naming use only. Maps to a command-line argument: %s (position: 0). (Nipype default value: dti)

  • input_type (‘nii’ or ‘analyze’ or ‘ni1’ or ‘nii.gz’) – Input and output file type. Accepted values are:

    • analyze -> analyze format 7.5

    • ni1 -> nifti format saved in separate .hdr and .img file

    • nii -> nifti format with one .nii file

    • nii.gz -> nifti format with compression

    Default type is ‘nii’ Maps to a command-line argument: -it %s.

  • invert_x (a boolean) – Invert x component of the vector. Maps to a command-line argument: -ix.

  • invert_y (a boolean) – Invert y component of the vector. Maps to a command-line argument: -iy.

  • invert_z (a boolean) – Invert z component of the vector. Maps to a command-line argument: -iz.

  • mask1_threshold (a float) – Threshold value for the first mask image, if not given, the program will try automatically find the threshold.

  • mask2_file (a pathlike object or string representing a file) – Second mask image. Maps to a command-line argument: -m2 %s (position: 4).

  • mask2_threshold (a float) – Threshold value for the second mask image, if not given, the program will try automatically find the threshold.

  • output_file (a pathlike object or string representing an existing file) – Maps to a command-line argument: %s (position: 1). (Nipype default value: tracks.trk)

  • output_mask (a pathlike object or string representing a file) – Output a binary mask file in analyze format. Maps to a command-line argument: -om %s.

  • primary_vector (‘v2’ or ‘v3’) – Which vector to use for fibre tracking: v2 or v3. If not set use v1. Maps to a command-line argument: -%s.

  • random_seed (an integer) – Use random location in a voxel instead of the center of the voxel to seed. can also define number of seed per voxel. default is 1. Maps to a command-line argument: -rseed %d.

  • step_length (a float) – Step length, in the unit of minimum voxel size. default value is 0.5 for interpolated streamline method and 0.1 for other methods. Maps to a command-line argument: -l %f.

  • swap_xy (a boolean) – Swap x & y vectors while tracking. Maps to a command-line argument: -sxy.

  • swap_yz (a boolean) – Swap y & z vectors while tracking. Maps to a command-line argument: -syz.

  • swap_zx (a boolean) – Swap x & z vectors while tracking. Maps to a command-line argument: -szx.

  • tensor_file (a pathlike object or string representing an existing file) – Reconstructed tensor file.

  • tracking_method (‘fact’ or ‘rk2’ or ‘tl’ or ‘sl’) – Tracking algorithm.

    • fact -> use FACT method for tracking. This is the default method.

    • rk2 -> use 2nd order Runge-Kutta method for tracking.

    • tl -> use tensorline method for tracking.

    • sl -> use interpolated streamline method with fixed step-length

    Maps to a command-line argument: -%s.

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

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