Hi Foucault,
In the snippet you added you don’t define the labels variable (which you subsequently loop over in for label in ${labels}).
There are two possible mistakes that are easy to fix. One may be that you forgot to read in the labels! And the other is that to get all the values in an array you need ${labels[@]}.
I don’t think you need greater precision than you have. The regions are pretty far apart in mm terms :)
Kirstie
Sent from my iPhone, please excuse any typos or excessive brevity
On 21 Feb 2018, at 03:44, zuxfoucault Wong zuxfoucault@gmail.com wrote:
Dear Freesurfer experts,
Based on this https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/2013-September/033337... , I wrote a short script to extract the centroids from Desikan-Killiany atlas.
###### for hemi in lh rh; do mri_annotation2label --subject fsaverage --hemi ${hemi} --outdir ./labels for label in ${labels}; do mri_surfcluster --in /usr/local/freesurfer/subjects/fsaverage/surf/${hemi}.thickness --clabel ./labels/${label}.label --sum ./labels/sum.${label} --centroid --thmin 0 --hemi ${hemi} --subject fsaverage tail -1 ./labels/sum.${label} | sed 's/ */ /g' | cut -d' ' -f6-8 >> ./labels/68parc.centroids.txt done done #######
However, 1) the value is not precise enough, it is only one digit after decimal point. And 2) I kept getting the same value for each hemisphere. Eg,. 29.8 -20.7 18.0 29.8 -20.7 18.0 29.8 -20.7 18.0 29.8 -20.7 18.0 29.8 -20.7 18.0 29.8 -20.7 18.0 29.8 -20.7 18.0
I would appreciate if you have any suggestions regarding extracting centroids and the aforementioned issues! Thank you for your time!
Best, Foucault
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.