Dear experts,


I'm trying to obtain a NxN connectivity matrix (N regions from atlas2009) with data (preprocess) from HumanConnectumProject with probtrackx2. I want to have a surface as seed.

I follow the pipeline below but I obtain results which doesn't seem correct : some pixel of the seed surface are not connected to any region.


First, I use the annotation2label to obtain labels :

    mri_annotation2label --subject 105115 \

        --hemi lh \

        --annotation $FREESURFER_RESULT_DIR/label/lh.aparc.a2009s.annot \

        --outdir $FREESURFER_RESULT_DIR/labels \

        --surface white

    mri_annotation2label --subject 105115\

        --hemi rh \

        --annotation $FREESURFER_RESULT_DIR/label/rh.aparc.a2009s.annot \

        --outdir $FREESURFER_RESULT_DIR/labels \

        --surface white


Then, I generate seeds volume from labels and I copy all path to seeds volume in a text file.

Here the script :

    for hemi in {lh,rh}

    do

        for lab in `cat $FREESURFER_RESULT_DIR/label_order.txt`

        do

        label=$FREESURFER_RESULT_DIR/labels/$hemi.$lab.label

        vol=${label/%.label/.nii.gz}

        mri_label2vol --label $label --temp $FREESURFER_RESULT_DIR/anat/orig.nii.gz --o $vol --identity --fillthresh 0.5

        echo $vol >> $FREESURFER_RESULT_DIR/seeds.txt

        done

    done


To obtain the waypoints, I use:

    mri_binarize --i $FREESURFER_RESULT_DIR/mri/aparc+aseg.mgz --match 2 --o $FREESURFER_RESULT_DIR/anat/wm.{r,l}h.nii.gz

And I copy both wm.{r,l}h.nii.gz in a text file waypoints.txt.


To obtain ventricles.nii.gz, I use :

    mri_binarize --i $FREESURFER_RESULT_DIR/mri/aparc+aseg.mgz --ventricles --o $FREESURFER_RESULT_DIR/anat/ventricles.nii.gz


Finally, I use probtrackx2 like that,


    probtrackx2 -V 2 \

        -x \ /Human/HumanConnectome/10unrelatedSubjects_preproc/105115_probtrackx/Structural_preproc/T1w/fsaverage_LR32k/105115.R.white.32k_fs_LR.surf.gii \

        -l --onewaycondition -c 0.2 -S 2000 --steplength=0.5 -P 5000 --fibthresh=0.01 –distthresh=0.0 \

        --sampvox=0.0 –omatrix1 \

        --stop=$FREESURFER_RESULT_DIR/seeds.txt \

        --forcedir --opd \

        -s $BEDPOSTX_RESULT_DIR/merged\

        -m $DIFFUSION_DIR/nodif_brain_mask\

        --waypoints=$FREESURFER_RESULT_DIR/waypoints.txt \

        --waycond='AND' \

        –dir=matrix_surf_rh_to_Nvolume \

        --avoid=$FREESURFER_RESULT_DIR/anat/ventricles.nii.gz


So I have few questions :

First, can you confirm me that all data preprocess from HCP are in the same space : Diffusion / Structural_preproc / Structural_preproc_extented ?

Then, Am I doing something wrong in my pipeline ?

Someone has already succeed to obtain a NxN connectivity matrix with this tools and data from HCP ?


Thank you for your help,


Best regards,


Danaele