External Email - Use Caution        

Dear freesurfers,



is there an elegant way of computing the intersection or overlap of different 
labels or - which would be even more useful for my application - annotations?



I only managed to find labels_intersect (which appears to be from 
https://secure-web.cisco.com/12D3ntbm8RDBV366hh41UjEkFWk2mrjQHSMiY8WEom0naUegbdbmI9Bk7UNIwOTDDV40505y4xUMucZzUUWAKig63gNPrAZl0JMYNPDR9rlE4fUcOuQETynMWSKJG67sRNzzZQq8VF7AEsupWpjkrPP17ola-zMVT-3GDtM_dSs0-j76spejYlLevtumd4uKC8BNXwnxiW47uZxy5cBV4IPlI1yL8DP4GKO7QCjCWHuSjiE1xMapPwxOxVnVfHUKM/https%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg11344.html
 ) which is awfully slow. In case this is of use for anyone else, I attached a 
modified version using 'join' that runs much faster, only has some 
compatibility issues with Mac.




>time labels_intersect precentral.label frontal.label out1.label > /dev/null

real    1m41.862s
user    0m31.052s
sys    0m30.757s
>time bash bash_labels_intersect.sh precentral.label frontal.label out2.label

real    0m0.193s
user    0m0.118s
sys    0m0.015s
>diff -w out1.label out2.label
>





Thank you and best wishes

Cornelius



--
Cornelius Kronlage
Assistenzarzt
Klinik für Neurologie | Neurologie mit Schwerpunkt Epileptologie
Universitätsklinikum Tübingen
Hoppe-Seyler-Str. 3 | 72076 Tübingen





Attachment: bash_labels_intersect.sh
Description: bash_labels_intersect.sh

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to