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

# nipype.interfaces.mrtrix3.connectivity module

## BuildConnectome

Link to code

> Bases: MRTrix3Base

> Wrapped executable: `tck2connectome`.

> Generate a connectome matrix from a streamlines file and a node parcellation image

> Example

>     >>> import nipype.interfaces.mrtrix3 as mrt
>     >>> mat = mrt.BuildConnectome()
>     >>> mat.inputs.in_file = 'tracks.tck'
>     >>> mat.inputs.in_parc = 'aparc+aseg.nii'
>     >>> mat.cmdline
>     'tck2connectome tracks.tck aparc+aseg.nii connectome.csv'
>     >>> mat.run()

> in_filea pathlike object or string representing an existing file

>   Input tractography. Maps to a command-line argument: `%s` (position: -3).

> out_filea pathlike object or string representing a file

>   Output file after processing. Maps to a command-line argument: `%s` (position: -1). (Nipype default value: `connectome.csv`)

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

> in_parca pathlike object or string representing an existing file

>   Parcellation file. Maps to a command-line argument: `%s` (position: -2).

> in_scalara pathlike object or string representing an existing file

>   Provide the associated image for the mean_scalar metric. Maps to a command-line argument: `-image %s`.

> in_weightsa pathlike object or string representing an existing file

>   Specify a text scalar file containing the streamline weights. Maps to a command-line argument: `-tck_weights_in %s`.

> keep_unassigneda boolean

>   By default, the program discards the information regarding those streamlines that are not successfully assigned to a node pair. Set this option to keep these values (will be the first row/column in the output matrix). Maps to a command-line argument: `-keep_unassigned`.

> metric‘count’ or ‘meanlength’ or ‘invlength’ or ‘invnodevolume’ or ‘mean_scalar’ or ‘invlength_invnodevolume’

>   Specify the edge weight metric. Maps to a command-line argument: `-metric %s`.

> nthreadsan integer

>   Number of threads. if zero, the number of available cpus will be used. Maps to a command-line argument: `-nthreads %d`.

> search_forwarda float

>   Project the streamline forwards from the endpoint in search of aparcellation node voxel. Argument is the maximum traversal length in mm. Maps to a command-line argument: `-assignment_forward_search %f`.

> search_radiusa float

>   Perform a radial search from each streamline endpoint to locate the nearest node. Argument is the maximum radius in mm; if no node is found within this radius, the streamline endpoint is not assigned to any node. Maps to a command-line argument: `-assignment_radial_search %f`.

> search_reversea float

>   Traverse from each streamline endpoint inwards along the streamline, in search of the last node traversed by the streamline. Argument is the maximum traversal length in mm (set to 0 to allow search to continue to the streamline midpoint). Maps to a command-line argument: `-assignment_reverse_search %f`.

> vox_lookupa boolean

>   Use a simple voxel lookup value at each streamline endpoint. Maps to a command-line argument: `-assignment_voxel_lookup`.

> zero_diagonala boolean

>   Set all diagonal entries in the matrix to zero (these represent streamlines that connect to the same node at both ends). Maps to a command-line argument: `-zero_diagonal`.

> out_filea pathlike object or string representing an existing file

>   The output response file.

## LabelConfig

Link to code

> Bases: MRTrix3Base

> Wrapped executable: `labelconfig`.

> Re-configure parcellation to be incrementally defined.

> Example

>     >>> import nipype.interfaces.mrtrix3 as mrt
>     >>> labels = mrt.LabelConfig()
>     >>> labels.inputs.in_file = 'aparc+aseg.nii'
>     >>> labels.inputs.in_config = 'mrtrix3_labelconfig.txt'
>     >>> labels.cmdline
>     'labelconfig aparc+aseg.nii mrtrix3_labelconfig.txt parcellation.mif'
>     >>> labels.run()

> in_filea pathlike object or string representing an existing file

>   Input anatomical image. Maps to a command-line argument: `%s` (position: -3).

> out_filea pathlike object or string representing a file

>   Output file after processing. Maps to a command-line argument: `%s` (position: -1). (Nipype default value: `parcellation.mif`)

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

> in_configa pathlike object or string representing an existing file

>   Connectome configuration file. Maps to a command-line argument: `%s` (position: -2).

> lut_aala pathlike object or string representing a file

>   Get information from the AAL lookup table (typically “ROI_MNI_V4.txt”). Maps to a command-line argument: `-lut_aal %s`.

> lut_basica pathlike object or string representing a file

>   Get information from a basic lookup table consisting of index / name pairs. Maps to a command-line argument: `-lut_basic %s`.

> lut_fsa pathlike object or string representing a file

>   Get information from a FreeSurfer lookup table(typically “FreeSurferColorLUT.txt”). Maps to a command-line argument: `-lut_freesurfer %s`.

> lut_itksnapa pathlike object or string representing a file

>   Get information from an ITK - SNAP lookup table(this includes the IIT atlas file “LUT_GM.txt”). Maps to a command-line argument: `-lut_itksnap %s`.

> nthreadsan integer

>   Number of threads. if zero, the number of available cpus will be used. Maps to a command-line argument: `-nthreads %d`.

> spinea pathlike object or string representing a file

>   Provide a manually-defined segmentation of the base of the spine where the streamlines terminate, so that this can become a node in the connection matrix. Maps to a command-line argument: `-spine %s`.

> out_filea pathlike object or string representing an existing file

>   The output response file.

## LabelConvert

Link to code

> Bases: MRTrix3Base

> Wrapped executable: `labelconvert`.

> Re-configure parcellation to be incrementally defined.

> Example

>     >>> import nipype.interfaces.mrtrix3 as mrt
>     >>> labels = mrt.LabelConvert()
>     >>> labels.inputs.in_file = 'aparc+aseg.nii'
>     >>> labels.inputs.in_config = 'mrtrix3_labelconfig.txt'
>     >>> labels.inputs.in_lut = 'FreeSurferColorLUT.txt'
>     >>> labels.cmdline
>     'labelconvert aparc+aseg.nii FreeSurferColorLUT.txt mrtrix3_labelconfig.txt parcellation.mif'
>     >>> labels.run()

> in_filea pathlike object or string representing an existing file

>   Input anatomical image. Maps to a command-line argument: `%s` (position: -4).

> in_luta pathlike object or string representing an existing file

>   Get information from a basic lookup table consisting of index / name pairs. Maps to a command-line argument: `%s` (position: -3).

> out_filea pathlike object or string representing a file

>   Output file after processing. Maps to a command-line argument: `%s` (position: -1). (Nipype default value: `parcellation.mif`)

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

> in_configa pathlike object or string representing an existing file

>   Connectome configuration file. Maps to a command-line argument: `%s` (position: -2).

> num_threadsan integer

>   Number of threads. if zero, the number of available cpus will be used. Maps to a command-line argument: `-nthreads %d`.

> spinea pathlike object or string representing a file

>   Provide a manually-defined segmentation of the base of the spine where the streamlines terminate, so that this can become a node in the connection matrix. Maps to a command-line argument: `-spine %s`.

> out_filea pathlike object or string representing an existing file

>   The output response file.