Replicating the Schafer brain parcellation project

100 views
Skip to first unread message

Ziteng Han

unread,
Mar 16, 2023, 1:44:03 AM3/16/23
to CBIG users
Dear all,

I want to replicate the Schafer brain parcellation project using the HCP data, and I noticed that in the demo of this project you state that "It may up to 2 hours with 1 CPU for the example code to finish running". So, I would like to ask if the code can be processed in parallel with multiple CPUs to speed up the running process.

In addition, the Schafer parcellation code needs to be computed in Freesurfer fsaverage6 surface, and does this mean I need to convert the HCP preprocessed fMRI data in fs_LR space to fsaverage space first?
 
Best regards, 
Ziteng Han

--
School of Life Science 
Beijing Institute of Technology
Beijing, China

Ruby Kong

unread,
Mar 16, 2023, 2:09:28 AM3/16/23
to Ziteng Han, Xiaoxuan Yan, CBIG users
Hi Xiaoxuan,

Can you help?

--
You received this message because you are subscribed to the Google Groups "CBIG users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cbig_users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cbig_users/5c6058b1-ddc2-45e0-a2e9-33fc378f356cn%40googlegroups.com.

Xiaoxuan

unread,
Mar 16, 2023, 3:18:58 AM3/16/23
to Ziteng Han, CBIG users
Hi Ziteng,

Thanks for writing in. For the Schaefer2018 project, the code was written in Matlab and does not explicitly support parallelization. However, as mentioned in this post (https://www.mathworks.com/discovery/matlab-multicore.html), some built-in Matlab functions do support multithreading by default. So running on multiple cores might help, but so far I have not tried on my own.

And yes, the data should be first projected to fsaverage6 surface mesh in order to run our code.

Best regards
Xiaoxuan

--

Ziteng Han

unread,
Mar 16, 2023, 8:38:00 AM3/16/23
to Xiaoxuan, CBIG users
Thanks Xiaoxuan and Ruby!

As for your beautiful work of homotopic parcellation, you mentioned that you defined the homotopic vertex based on the geodesic distance on the spherical surface mesh. Since the fs_LR surface mesh (left and right hemispheres spatially aligned) is the systematic version of fsaverage surface mesh, I can just assume that vertices with the same index (e.g., vertex _1_left and vertex_1_right) are homotopic. Do you think so?

Best Regards
Ziteng Han

Thomas Yeo

unread,
Mar 16, 2023, 9:25:24 PM3/16/23
to Ziteng Han, Xiaoxuan, CBIG users
Hi Ziteng,

In Xiaoxuan's paper, we found homotopic vertices via geodesic distance because fsaverage left and right hemispheres are not anatomically symmetric, so we have to establish correspondence between the two hemispheres.

For fs_LR, the left and right hemispheres are anatomically symmetric so that's not necessary. Yes, vertex 1 on both hemispheres are in spatial correspondence. But if you want to confirm, you should ask the HCP mailing list rather than us :)

Regards,
Thomas

Ziteng Han

unread,
Mar 16, 2023, 9:37:43 PM3/16/23
to Thomas Yeo, Xiaoxuan, CBIG users
Thank you very much, Prof. Yeo.


Best regards,
Ziteng Han

Ziteng Han

unread,
Sep 11, 2023, 5:55:07 AM9/11/23
to CBIG users
Dear CBIG guys, 

I have a follow-up question, that is, are the inputs to the MRF (Schaefer400) and hMRF (Yan400) models only the time series of cortical vertices and do not include the time series of subcortical voxels and the connections between cortical vertices and subcortical voxels?

Thanks for your time and I'll be looking forward to your reply.  

Best regards,
Ziteng Han

Xiaoxuan

unread,
Sep 11, 2023, 8:48:31 AM9/11/23
to Ziteng Han, CBIG users
Hi Ziteng

Yes that’s correct. We only considered time series of cortical vertices for both Schaefer400 and Yan400 parcellations.

Best regards
Xiaoxuan

Ziteng Han

unread,
Sep 11, 2023, 10:04:30 AM9/11/23
to Xiaoxuan, CBIG users
Thanks for your help, Xiaoxuan.

Ziteng Han

unread,
Oct 31, 2023, 2:10:05 AM10/31/23
to Xiaoxuan, CBIG users
Dear CBIG community,

I'd like to ask two further questions if you don't mind.
  1. When I ran Schaefer's clustering code (CBIG_gwMRF_build_data_and_perform_clustering.m) to generate brain parcellations (clusters = 400) using our own data, I noticed that there were some warnings from the optimizer: "Exiting fzero: will terminate the search for intervals containing sign changes. NaN or Inf function value encountered during search. Check function or try again with a different starting value.". The 'fzero' function is also used by Yan's homotopic parcellation project (in CBIG_hMRF_update_labels_via_graphcut.m)Should I be concerned about these warnings? Or can I ignore them?
  2. I also found it a bit perplexing that all of the <improvement> values, <DataCost> values, and <Energy> values are negative in the output log file. But in the log file generated by running the demo data, these values are both positive and negative. I would like to ask if this is normal? 
I attached my log file and the final parcellation. Thanks for your time and patience. 

Best, 
Ziteng

Ziteng_print_Graph_Cut_faster__grad_prior_gordon_cluster_400_datacost_1_smoothcost_5000_iterations_100_seed_1_to_seed_1.txt
Ziteng_clustering_48000_200s_ite100.jpg
Reply all
Reply to author
Forward
0 new messages