interfaces.mrtrix3.connectivity

BuildConnectome

Link to code

Wraps the executable command 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()                                 

Inputs:

[Mandatory]
in_file: (an existing file name)
        input tractography
        argument: ``%s``, position: -3
out_file: (a file name, nipype default value: connectome.csv)
        output file after processing
        argument: ``%s``, position: -1

[Optional]
in_parc: (an existing file name)
        parcellation file
        argument: ``%s``, position: -2
nthreads: (an integer (int or long))
        number of threads. if zero, the number of available cpus will be
        used
        argument: ``-nthreads %d``
vox_lookup: (a boolean)
        use a simple voxel lookup value at each streamline endpoint
        argument: ``-assignment_voxel_lookup``
search_radius: (a 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.
        argument: ``-assignment_radial_search %f``
search_reverse: (a 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).
        argument: ``-assignment_reverse_search %f``
search_forward: (a float)
        project the streamline forwards from the endpoint in search of
        aparcellation node voxel. Argument is the maximum traversal length
        in mm.
        argument: ``-assignment_forward_search %f``
metric: ('count' or 'meanlength' or 'invlength' or 'invnodevolume' or
          'mean_scalar' or 'invlength_invnodevolume')
        specify the edge weight metric
        argument: ``-metric %s``
in_scalar: (an existing file name)
        provide the associated image for the mean_scalar metric
        argument: ``-image %s``
in_weights: (an existing file name)
        specify a text scalar file containing the streamline weights
        argument: ``-tck_weights_in %s``
keep_unassigned: (a 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)
        argument: ``-keep_unassigned``
zero_diagonal: (a boolean)
        set all diagonal entries in the matrix to zero (these represent
        streamlines that connect to the same node at both ends)
        argument: ``-zero_diagonal``
args: (a unicode string)
        Additional parameters to the command
        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', nipype default value: {})
        Environment variables

Outputs:

out_file: (an existing file name)
        the output response file

LabelConfig

Link to code

Wraps the executable command 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()                                 

Inputs:

[Mandatory]
in_file: (an existing file name)
        input anatomical image
        argument: ``%s``, position: -3
out_file: (a file name, nipype default value: parcellation.mif)
        output file after processing
        argument: ``%s``, position: -1

[Optional]
in_config: (an existing file name)
        connectome configuration file
        argument: ``%s``, position: -2
lut_basic: (a file name)
        get information from a basic lookup table consisting of index / name
        pairs
        argument: ``-lut_basic %s``
lut_fs: (a file name)
        get information from a FreeSurfer lookup table(typically
        "FreeSurferColorLUT.txt")
        argument: ``-lut_freesurfer %s``
lut_aal: (a file name)
        get information from the AAL lookup table (typically
        "ROI_MNI_V4.txt")
        argument: ``-lut_aal %s``
lut_itksnap: (a file name)
        get information from an ITK - SNAP lookup table(this includes the
        IIT atlas file "LUT_GM.txt")
        argument: ``-lut_itksnap %s``
spine: (a file name)
        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.
        argument: ``-spine %s``
nthreads: (an integer (int or long))
        number of threads. if zero, the number of available cpus will be
        used
        argument: ``-nthreads %d``
args: (a unicode string)
        Additional parameters to the command
        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', nipype default value: {})
        Environment variables

Outputs:

out_file: (an existing file name)
        the output response file

LabelConvert

Link to code

Wraps the executable command 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()                                 

Inputs:

[Mandatory]
in_file: (an existing file name)
        input anatomical image
        argument: ``%s``, position: -4
in_lut: (an existing file name)
        get information from a basic lookup table consisting of index / name
        pairs
        argument: ``%s``, position: -3
out_file: (a file name, nipype default value: parcellation.mif)
        output file after processing
        argument: ``%s``, position: -1

[Optional]
in_config: (an existing file name)
        connectome configuration file
        argument: ``%s``, position: -2
spine: (a file name)
        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.
        argument: ``-spine %s``
num_threads: (an integer (int or long))
        number of threads. if zero, the number of available cpus will be
        used
        argument: ``-nthreads %d``
args: (a unicode string)
        Additional parameters to the command
        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', nipype default value: {})
        Environment variables

Outputs:

out_file: (an existing file name)
        the output response file