Home · Quickstart · User Guide and Examples · Interfaces Index · Developers · About · Nipy

# nipype.interfaces.diffusion_toolkit.odf module

Provides interfaces to various commands provided by diffusion toolkit

## HARDIMat

Link to code

> Bases: CommandLine

> Wrapped executable: `hardi_mat`.

> Use hardi_mat to calculate a reconstruction matrix from a gradient table

> bvalsa pathlike object or string representing an existing file

>   B values file.

> bvecsa pathlike object or string representing an existing file

>   B vectors file. Maps to a command-line argument: `%s` (position: 1).

> argsa unicode string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> environa 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_infoa pathlike object or string representing an existing file

>   Specify image information file. the image info file is generated from original dicom image by diff_unpack program and contains image orientation and other information needed for reconstruction and tracking. by default will look into the image folder for .info file. Maps to a command-line argument: `-info %s`.

> image_orientation_vectorsa 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`.

> oblique_correctiona 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`.

> odf_filea pathlike object or string representing an existing file

>   Filename that contains the reconstruction points on a HEMI-sphere. Use the pre-set 181 points by default. Maps to a command-line argument: `-odf %s`.

> orderan integer (int or long)

>   Maximum order of spherical harmonics. must be even number. default is 4. Maps to a command-line argument: `-order %s`.

> out_filea pathlike object or string representing a file

>   Output matrix file. Maps to a command-line argument: `%s` (position: 2). (Nipype default value: `recon_mat.dat`)

> reference_filea pathlike object or string representing an existing file

>   Provide a dicom or nifti image as the reference for the program to figure out the image orientation information. if no such info was found in the given image header, the next 5 options -info, etc., will be used if provided. if image orientation info can be found in the given reference, all other 5 image orientation options will be IGNORED. Maps to a command-line argument: `-ref %s`.

> out_filea pathlike object or string representing an existing file

>   Output matrix file.

## ODFRecon

Link to code

> Bases: CommandLine

> Wrapped executable: `odf_recon`.

> Use odf_recon to generate tensors and other maps

> DWIa pathlike object or string representing an existing file

>   Input raw data. Maps to a command-line argument: `%s` (position: 1).

> matrixa pathlike object or string representing an existing file

>   Use given file as reconstruction matrix. Maps to a command-line argument: `-mat %s`.

> n_b0an integer (int or long)

>   Number of b0 scans. by default the program gets this information from the number of directions and number of volumes in the raw data. useful when dealing with incomplete raw data set or only using part of raw data set to reconstruct. Maps to a command-line argument: `-b0 %s`.

> n_directionsan integer (int or long)

>   Number of directions. Maps to a command-line argument: `%s` (position: 2).

> n_output_directionsan integer (int or long)

>   Number of output directions. Maps to a command-line argument: `%s` (position: 3).

> argsa unicode string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> dsia boolean

>   Indicates that the data is dsi. Maps to a command-line argument: `-dsi`.

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

> filtera boolean

>   Apply a filter (e.g. high pass) to the raw image. Maps to a command-line argument: `-f`.

> image_orientation_vectorsa 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`.

> oblique_correctiona 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_prefixa unicode string

>   Output file prefix. Maps to a command-line argument: `%s` (position: 4). (Nipype default value: `odf`)

> output_entropya boolean

>   Output entropy map. Maps to a command-line argument: `-oe`.

> 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`)

> sharpnessa float

>   Smooth or sharpen the raw data. factor > 0 is smoothing. factor < 0 is sharpening. default value is 0 NOTE: this option applies to DSI study only. Maps to a command-line argument: `-s %f`.

> subtract_backgrounda boolean

>   Subtract the background value before reconstruction. Maps to a command-line argument: `-bg`.

> B0 : a pathlike object or string representing an existing file DWI : a pathlike object or string representing an existing file ODF : a pathlike object or string representing an existing file entropy : a pathlike object or string representing a file max : a pathlike object or string representing an existing file

## ODFTracker

Link to code

> Bases: CommandLine

> Wrapped executable: `odf_tracker`.

> Use odf_tracker to generate track file

> ODF : a pathlike object or string representing an existing file mask1_file : a pathlike object or string representing a file

> > First mask image. Maps to a command-line argument: `-m %s` (position: 2).

> max : a pathlike object or string representing an existing file

> angle_thresholda float

>   Set angle threshold. default value is 35 degree for default tracking method and 25 for rk2. Maps to a command-line argument: `-at %f`.

> argsa unicode string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> disca boolean

>   Use disc tracking. Maps to a command-line argument: `-disc`.

> dsia boolean

>   Specify the input odf data is dsi. because dsi recon uses fixed pre-calculated matrix, some special orientation patch needs to be applied to keep dti/dsi/q-ball consistent. Maps to a command-line argument: `-dsi`.

> environa 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_vectorsa 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`.

> input_data_prefixa unicode string

>   Recon data prefix. Maps to a command-line argument: `%s` (position: 0). (Nipype default value: `odf`)

> input_output_type‘nii’ or ‘analyze’ or ‘ni1’ or ‘nii.gz’

>   Input and output file type. Maps to a command-line argument: `-it %s`. (Nipype default value: `nii`)

> invert_xa boolean

>   Invert x component of the vector. Maps to a command-line argument: `-ix`.

> invert_ya boolean

>   Invert y component of the vector. Maps to a command-line argument: `-iy`.

> invert_za boolean

>   Invert z component of the vector. Maps to a command-line argument: `-iz`.

> limitan integer (int or long)

>   In some special case, such as heart data, some track may go into infinite circle and take long time to stop. this option allows setting a limit for the longest tracking steps (voxels). Maps to a command-line argument: `-limit %d`.

> mask1_thresholda float

>   Threshold value for the first mask image, if not given, the program will try automatically find the threshold.

> mask2_filea pathlike object or string representing a file

>   Second mask image. Maps to a command-line argument: `-m2 %s` (position: 4).

> mask2_thresholda float

>   Threshold value for the second mask image, if not given, the program will try automatically find the threshold.

> out_filea pathlike object or string representing a file

>   Output track file. Maps to a command-line argument: `%s` (position: 1). (Nipype default value: `tracks.trk`)

> random_seedan integer (int or long)

>   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 %s`.

> runge_kutta2a boolean

>   Use 2nd order Runge-Kutta method for tracking. default tracking method is non-interpolate streamline. Maps to a command-line argument: `-rk2`.

> slice_orderan integer (int or long)

>   Set the slice order. 1 means normal, -1 means reversed. default value is 1. Maps to a command-line argument: `-sorder %d`.

> step_lengtha float

>   Set step length, in the unit of minimum voxel size. default value is 0.1. Maps to a command-line argument: `-l %f`.

> swap_xya boolean

>   Swap x and y vectors while tracking. Maps to a command-line argument: `-sxy`.

> swap_yza boolean

>   Swap y and z vectors while tracking. Maps to a command-line argument: `-syz`.

> swap_zxa boolean

>   Swap x and z vectors while tracking. Maps to a command-line argument: `-szx`.

> voxel_order‘RAS’ or ‘RPS’ or ‘RAI’ or ‘RPI’ or ‘LAI’ or ‘LAS’ or ‘LPS’ or ‘LPI’

>   Specify the voxel order in RL/AP/IS (human brain) reference. must be 3 letters with no space in between. for example, RAS means the voxel row is from L->R, the column is from P->A and the slice order is from I->S. by default voxel order is determined by the image orientation (but NOT guaranteed to be correct because of various standards). for example, siemens axial image is LPS, coronal image is LIP and sagittal image is PIL. this information also is NOT needed for tracking but will be saved in the track file and is essential for track display to map onto the right coordinates. Maps to a command-line argument: `-vorder %s`.

> track_filea pathlike object or string representing an existing file

>   Output track file.