Voxel Mirrored Homotopic Connectivity Analysis

CPAC.vmhc.create_vmhc(use_ants, name='vmhc_workflow')[source]

Compute the map of brain functional homotopy, the high degree of synchrony in spontaneous activity between geometrically corresponding interhemispheric (i.e., homotopic) regions.


vmhc_workflow : workflow

Voxel Mirrored Homotopic Connectivity Analysis Workflow


Workflow Inputs:

inputspec.brain : string (existing nifti file)
    Anatomical image(without skull)

inputspec.symmetric_brain : string (existing nifti file)

inputspec.rest_res_filt : string (existing nifti file)
    Band passed Image with nuisance signal regressed out(and optionally scrubbed). Recommended bandpass filter (0.001,0.1) )

inputspec.reorient : string (existing nifti file)
    RPI oriented anatomical data

inputspec.example_func2highres_mat : string (existing affine transformation .mat file)
    Specifies an affine transform that should be applied to the example_func before non linear warping

inputspec.standard_for_func: string (existing nifti file)

inputspec.symmetric_skull : string (existing nifti file)

inputspec.twomm_brain_mask_dil : string (existing nifti file)

inputspec.config_file_twomm_symmetric : string (existing .cnf file)

inputspec.rest_mask : string (existing nifti file)
    A mask functional volume(derived by dilation from motion corrected functional volume)

fwhm_input.fwhm : list (float) 
    For spatial smoothing the Z-transformed correlations in MNI space.
    Generally the value of this parameter is 1.5 or 2 times the voxel size of the input Image.

inputspec.mean_functional : string (existing nifti file)
    The mean functional image for use in the func-to-anat registration matrix conversion
    to ITK (ANTS) format, if the user selects to use ANTS.

Workflow Outputs:

outputspec.highres2symmstandard : string (nifti file)
    Linear registration of T1 image to symmetric standard image

outputspec.highres2symmstandard_mat : string (affine transformation .mat file)
    An affine transformation .mat file from linear registration and used in non linear registration

outputspec.highres2symmstandard_warp : string (nifti file)
    warp file from Non Linear registration of T1 to symmetrical standard brain

outputspec.fnirt_highres2symmstandard : string (nifti file)
    Non Linear registration of T1 to symmetrical standard brain

outputspec.highres2symmstandard_jac : string (nifti file)
    jacobian determinant image from Non Linear registration of T1 to symmetrical standard brain

outputspec.rest_res_2symmstandard : string (nifti file)
    nonlinear registration (func to standard) image

outputspec.VMHC_FWHM_img : string (nifti file)
    pearson correlation between res2standard and flipped res2standard

outputspec.VMHC_Z_FWHM_img : string (nifti file)
    Fisher Z transform map

outputspec.VMHC_Z_stat_FWHM_img : string (nifti file)
    Z statistic map

Order of commands:

  • Perform linear registration of Anatomical brain in T1 space to symmetric standard space. For details see flirt:

    -ref MNI152_T1_2mm_symmetric_brain.nii.gz
    -in mprage_brain.nii.gz
    -out highres2symmstandard.nii.gz
    -omat highres2symmstandard.mat
    -cost corratio
    -searchcost corratio
    -dof 12
    -interp trilinear    
  • Perform nonlinear registration (higres to standard) to symmetric standard brain. For details see fnirt:

  • Perform spatial smoothing on the input functional image(inputspec.rest_res_filt). For details see PrinciplesSmoothing fslmaths:

    fslmaths rest_res_filt.nii.gz
    -kernel gauss FWHM/ sqrt(8-ln(2))
    -fmean -mas rest_mask.nii.gz
  • Apply nonlinear registration (func to standard). For details see applywarp:

  • Copy and L/R swap the output of applywarp command (rest_res_2symmstandard.nii.gz). For details see fslswapdim:

    -x y z
  • Calculate pearson correlation between rest_res_2symmstandard.nii.gz and flipped rest_res_2symmstandard.nii.gz(tmp_LRflipped.nii.gz). For details see 3dTcorrelate:

    -polort -1
    -prefix VMHC_FWHM.nii.gz
  • Fisher Z Transform the correlation. For details see 3dcalc:

    -a VMHC_FWHM.nii.gz
    -expr 'log((a+1)/(1-a))/2'
    -prefix VMHC_FWHM_Z.nii.gz
  • Calculate the number of volumes(nvols) in flipped rest_res_2symmstandard.nii.gz(tmp_LRflipped.nii.gz)

    -Use Nibabel to do this
  • Compute the Z statistic map

    -a VMHC_FWHM_Z.nii.gz
    -expr 'a*sqrt('${nvols}'-3)'
    -prefix VMHC_FWHM_Z_stat.nii.gz



Workflow Detailed:

[1]Zuo, X.-N., Kelly, C., Di Martino, A., Mennes, M., Margulies, D. S., Bangaru, S., Grzadzinski, R., et al. (2010). Growing together and growing apart: regional and sex differences in the lifespan developmental trajectories of functional homotopy. The Journal of neuroscience : the official journal of the Society for Neuroscience, 30(45), 15034-43. doi:10.1523/JNEUROSCI.2612-10.2010
>>> vmhc_w = create_vmhc()
>>> vmhc_w.inputs.inputspec.symmetric_brain = 'MNI152_T1_2mm_symmetric_brain.nii.gz'
>>> vmhc_w.inputs.inputspec.symmetric_skull = 'MNI152_T1_2mm_symmetric.nii.gz'
>>> vmhc_w.inputs.inputspec.twomm_brain_mask_dil = 'MNI152_T1_2mm_brain_mask_symmetric_dil.nii.gz'
>>> vmhc_w.inputs.inputspec.config_file_twomm = 'T1_2_MNI152_2mm_symmetric.cnf'
>>> vmhc_w.inputs.inputspec.standard_for_func= 'MNI152_T1_2mm.nii.gz'
>>> vmhc_w.inputs.fwhm_input.fwhm = [4.5, 6]
>>> vmhc_w.get_node('fwhm_input').iterables = ('fwhm', [4.5, 6])
>>> vmhc_w.inputs.inputspec.rest_res = os.path.abspath('/home/data/Projects/Pipelines_testing/Dickstein/subjects/s1001/func/original/rest_res_filt.nii.gz')
>>> vmhc_w.inputs.inputspec.reorient = os.path.abspath('/home/data/Projects/Pipelines_testing/Dickstein/subjects/s1001/anat/mprage_RPI.nii.gz')
>>> vmhc_w.inputs.inputspec.brain = os.path.abspath('/home/data/Projects/Pipelines_testing/Dickstein/subjects/s1001/anat/mprage_brain.nii.gz')
>>> vmhc_w.inputs.inputspec.example_func2highres_mat = os.path.abspath('/home/data/Projects/Pipelines_testing/Dickstein/subjects/s1001/func/original/reg/example_func2highres.mat')
>>> vmhc_w.inputs.inputspec.rest_mask = os.path.abspath('/home/data/Projects/Pipelines_testing/Dickstein/subjects/s1001/func/original/rest_mask.nii.gz')
>>> vmhc_w.run() 

Compute the sigma value, given Full Width Half Max. Further it builds an operand string and returns it

fwhm : float

op_string : string


Calculates the number of volumes in the given nifti image

in_files : string (nifti file)

out : int
number of volumes of input nifti file

Generates operand string

nvols : int

expr : string