External Email - Use Caution        

Hi Cornelius

 

I found something that computes the overlap of labels across the same vertex when doing some research about this, not sure if this is what you mean:

 

MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://surfer.nmr.mgh.harvard.edu/fswiki/mris_label2annot

 

See specifically:

--nhits

<nhits_file>

This option creates a diagnostic file showing whether the cumulative effect of all the label files happens to assign more than one label to each vertex. The output file is a FreeSurfer 'overlay' format file, in which each vertex has an associated value, in this case the count of labels assigned to that vertex. This can be displayed in tksurfer as a color. Setting fthresh to 1.5 will distinguish good vertices (count<=1) from bad (count>=2).

 

I know there is also a command merge_labels that may help?

 

Best,

 

Trisanna Sprung-Much

Research Associate

McGill University

MD Anderson Cancer Centre

-- 

 

 

From: <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of "Dr. Cornelius Kronlage" <Cornelius.Kronlage@med.uni-tuebingen.de>
Reply-To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Date: Tuesday, February 16, 2021 at 11:19 AM
To: "'freesurfer@nmr.mgh.harvard.edu'" <freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] overlap/intersection of labels?

 

        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 MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg11344.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