Dear HCP users/experts,
We are interested in calculating the functional connectivities of a lesion mask, which has been drawn in MNI space. The lesion involves both cortical and subcortical areas. These are the steps I took to find the associated CIFTI-indices of the lesion to use and calculate the functional connectivity of the lesioned areas with other cifti greyordinate time-series data. This is the pipeline:
- Make a "lesion.txt" labeling value 1 as "Lesion" and color code it into the red.
- -volume-label-import lesion_MNI.nii lesion.txt lesion_wb.nii #import into WorkBench format
- -volume-label-to-surface-mapping lesion_wb.nii groupavg_midthickness.[L/R].gii lesion_[L/R].label.gii -ribbon-constrained groupavg_white.gii groupavg_pial.gii #Map to surface
- -cifti-create-label -volume lesion_wb.nii Atlas_ROIs.2.nii.gz -left-label Lesion_L.label.gii -right-label lesion_R.label.gii lesion.dlabel.nii #Map to volume and merge with surface labels
The final lesion.dlabel.nii can be opened by workbench and clearly shows lesions on the cortical surface and subcortical volumes (visually exactly what I expected). But, it has 96k indices when I open with ciftiopen in MATLAB, possibly due to the inclusion of medial wall in volume label to surface mapping. Thus, it is hard if not impossible to map it with 91k greyordinate time-series data. I chose another strategy by changing the target surface for -volume-label-to-surface-mapping:
- Download https://github.com/Washington-University/HCPpipelines/blob/master/global/templates/91282_Greyordinates/91282_Greyordinates.dscalar.nii
- -cifti-separate 91282_Greyordinates.dscalar.nii COLUMN -metric CORTEX_[RIGHT/LEFT] [right/left]cortex.shape.gii
- Open the resulting cortex.shape.gii files using gifti tools in MATLAB (32k with 1 for not medial wall and 0 values for medial wall), open the groupavg_midthickness.surf.gii, dot product them (cortex.cdata .* midthickness.vertices), remove the rows with 0 values, change the "faces" of midthickness manually (I couldn't find any description on what faces correspond to), saving rows 1:59105 for right and 1:59065 for left hemisphere .vertices, save them into new midthickness files.
- Repeat the steps 3 and 4 in the previous part
Here we will have ~91k indices, that can be matched row-wise with dtseries files. However, when I try to visualize them here is the error I get from workbench:
"Surface file contains 29696 vertices but the CortexLeft contains 32492 vertices."
I believe that I have done everything correct (am I?) and I can proceed to calculate functional connectivity of the lesion mask with other greyordinates in dtseries file. But, I'd like to visualize the label file I have generated, to visually check whether it has been mapped correctly or not.
Any comments regarding the pipeline or how to correct the error I encountered is appreciated.
Best,
AmirHussein Abdolalizadeh