ThomasYeoLab / CBIG

MIT License
570 stars 380 forks source link

apply gradient computed from speedup_gradients to Schaefer2018 parcellation code #37

Closed snapfinger closed 2 years ago

snapfinger commented 2 years ago

Hi, I successfully ran the example code of speedup_gradients with sample data in fsaverage6 space. Its output is a 74947 1 array, which I believe corresponds to the left hem non-medial wall vertices (37476 1) plus the right hem non-medial wall vertices (37471 * 1). I prepare to similarly use the output from other data as gradient prior for Schaefer parcellation code.

However, the length of the example left hem gradient prior (border) in Schaefer parcellation is 40962, which includes medial wall. Taking a closer look at the values of the sample gradient prior, the medial wall indices' values are not simply zeros, but something similar to other non-medial wall vertices, so it does not seem to be simply put the non-medial wall vertices' values back to the whole surface.

I wonder how the gradient output from speedup_gradients can be converted to the gradient prior for Schaefer parcellation?

snapfinger commented 2 years ago

update:

If use ft_read_cifti to read the generated gradient file, it gives the whole surface dimension (including medial wall vertices as NaNs). Previously I used read_cifti.

Besides, medial-wall vertices are masked in the clustering procedure so the values there do not matter