cmtklib.interfaces.camino module

The Camino module provides Nipype interfaces for Camino functions missing in nipype or modified.

DTLUTGen

Link to code

Bases: nipype.interfaces.base.core.StdOutCommandLine

Wrapped executable: dtlutgen.

Calibrates the PDFs for PICo probabilistic tractography.

This program needs to be run once for every acquisition scheme. It outputs a lookup table that is used by the dtpicoparams program to find PICo PDF parameters for an image. The default single tensor LUT contains parameters of the Bingham distribution and is generated by supplying a scheme file and an estimated signal to noise in white matter regions of the (q=0) image. The default inversion is linear (inversion index 1).

Advanced users can control several options, including the extent and resolution of the LUT, the inversion index, and the type of PDF. See dtlutgen(1) for details.

Example

>>> import cmtklib.interfaces.camino as cmon
>>> dtl = cmon.DTLUTGen()
>>> dtl.inputs.snr = 16
>>> dtl.inputs.scheme_file = 'A.scheme'
>>> dtl.run()                  
scheme_filea pathlike object or string representing a file

The scheme file of the images to be processed using this LUT. Maps to a command-line argument: -schemefile %s (position: 2).

acga boolean

Compute a LUT for the ACG PDF. Maps to a command-line argument: -acg.

argsa string

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

binghama boolean

Compute a LUT for the Bingham PDF. This is the default. Maps to a command-line argument: -bingham.

crossa float

The angle in degrees between the principal directions of the two tensors. Maps to a command-line argument: -cross %d.

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

frangea list of from 2 to 2 items which are a float

Index to two-tensor LUTs. This is the fractional anisotropy of the two tensors. The default is 0.3 to 0.94. Maps to a command-line argument: -frange %s (position: 1).

inversionan integer

Index of the inversion to use. The default is 1 (linear single tensor inversion). Maps to a command-line argument: -inversion %d.

lrangea list of from 2 to 2 items which are a float

Index to one-tensor LUTs. This is the ratio L1/L3 and L2 / L3.The LUT is square, with half the values calculated (because L2 / L3 cannot be less than L1 / L3 by definition).The minimum must be >= 1. For comparison, a ratio L1 / L3 = 10 with L2 / L3 = 1 corresponds to an FA of 0.891, and L1 / L3 = 15 with L2 / L3 = 1 corresponds to an FA of 0.929. The default range is 1 to 10. Maps to a command-line argument: -lrange %s (position: 1).

out_filea pathlike object or string representing a file

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

samplesan integer

The number of synthetic measurements to generate at each point in the LUT. The default is 2000. Maps to a command-line argument: -samples %d.

snra float

The signal to noise ratio of the unweighted (q = 0) measurements.This should match the SNR (in white matter) of the images that the LUTs are used with. Maps to a command-line argument: -snr %d.

stepa float

Distance between points in the LUT.For example, if lrange is 1 to 10 and the step is 0.1, LUT entries will be computed at L1 / L3 = 1, 1.1, 1.2 … 10.0 and at L2 / L3 = 1.0, 1.1 … L1 / L3.For single tensor LUTs, the default step is 0.2, for two-tensor LUTs it is 0.02. Maps to a command-line argument: -step %d.

tracea float

Trace of the diffusion tensor(s) used in the test function in the LUT generation. The default is 2100E-12 m^2 s^-1. Maps to a command-line argument: -trace %f.

watsona boolean

Compute a LUT for the Watson PDF. Maps to a command-line argument: -watson.

dtLUTa pathlike object or string representing an existing file

Lookup Table.

PicoPDFs

Link to code

Bases: nipype.interfaces.base.core.StdOutCommandLine

Wrapped executable: picopdfs.

Constructs a spherical PDF in each voxel for probabilistic tractography.

Example

>>> import cmtklib.interfaces.camino as cmon
>>> pdf = cmon.PicoPDFs()
>>> pdf.inputs.inputmodel = 'dt'
>>> pdf.inputs.luts = 'lut_file'
>>> pdf.inputs.in_file = 'voxel-order_data.Bfloat'
>>> pdf.run()                  
in_filea pathlike object or string representing an existing file

Voxel-order data filename. Maps to a command-line argument: < %s (position: 1).

argsa string

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

directmapa boolean
Only applicable when using pds as the inputmodel

Use direct mapping between the eigenvalues and the distribution parameters instead of the log of the eigenvalues.

Maps to a command-line argument: -directmap.

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

inputmodel‘dt’ or ‘multitensor’ or ‘pds’

Input model type. Maps to a command-line argument: -inputmodel %s (position: 2). (Nipype default value: dt)

lutsa list of items which are a pathlike object or string representing an existing file

Files containing the lookup tables.For tensor data, one lut must be specified for each type of inversion usedin the image (one-tensor, two-tensor, three-tensor).For pds, the number of LUTs must match -numpds (it is acceptable to usethe same LUT several times - see example, above).These LUTs may be generated with dtlutgen. Maps to a command-line argument: -luts %s (position: 3).

maxcomponentsan integer

The maximum number of tensor components in a voxel (default 2) for multitensor data.Currently, only the default is supported, but future releases may allowthe input of three-tensor data using this option. Maps to a command-line argument: -maxcomponents %d.

numpdsan integer

The maximum number of PDs in a voxel (default 3) for PD data.This option determines the size of the input and output voxels.This means that the data file may be large enough to accomodate three or more PDs,but does not mean that any of the voxels are classified as containing three or more PDs. Maps to a command-line argument: -numpds %d.

out_filea pathlike object or string representing a file

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

pdf‘watson’ or ‘bingham’ or ‘acg’

Specifies the PDF to use. There are three choices:watson - The Watson distribution. This distribution isrotationally symmetric.bingham - The Bingham distributionn, which allowselliptical probability density contours.acg - The Angular Central Gaussian distribution, whichalso allows elliptical probability density contours.

Maps to a command-line argument: -pdf %s (position: 4). (Nipype default value: watson)

pdfsa pathlike object or string representing an existing file

Path/name of 4D volume in voxel order.

Voxel2Image

Link to code

Bases: nipype.interfaces.base.core.StdOutCommandLine

Wrapped executable: voxel2image.

Converts voxel order image to NIFTI / MHA files.

Converts voxel-order data to scanner-order data in a supported image format.

Examples

>>> import cmtklib.interfaces.camino as cmon
>>> vox2img = cmon.Voxel2Image()
>>> vox2img.inputs.in_file = 'fa.img'
>>> vox2img.run()                  
header_filea pathlike object or string representing an existing file

File with desired format. Maps to a command-line argument: -header %s (position: 2).

in_filea pathlike object or string representing an existing file

Image in camino format. Maps to a command-line argument: -inputfile %s (position: 1).

argsa string

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

componentsan integer

Number of components in inputfile. Maps to a command-line argument: -components %d.

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

gzipa boolean

Compress output image. Maps to a command-line argument: -gzip.

out_filea pathlike object or string representing a file

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

out_type‘float’ or ‘char’ or ‘short’ or ‘int’ or ‘long’ or ‘double’

“i.e. Bfloat”. Can be “char”, “short”, “int”, “long”, “float” or “double”. Maps to a command-line argument: -outputdatatype %s. (Nipype default value: float)

output_roota string

Maps to a command-line argument: -outputroot %s (position: -1). (Nipype default value: converted)

image_filea pathlike object or string representing an existing file

Path/name to converted file.