Hi Martha,
A brute force but simple way to do this is to use the list of labels contained in subjects/nnn/label/lh.cortex and rh.cortex.
Given a vertex x,y,z, go through the file and select the lines for which the distance to x,y,z <= 2 mm. This will give you a bunch of labels for points within
a circle with 2 mm radius about x,y,z. And all of them will be on the “white” surface. If your vertex is on a different surface, e.g. pia, or you want a different geometry, e.g. square, there’s likely a simple variant which will work.
In my experience mri_label2label –dilate takes a lot of time and I’m not sure you can restrict it to give you points on the surface that you want. I think
it gives you a new surface which is displaced by a fixed distance from the one where you start.
I hope this is helpful.
Best - Don
From: freesurfer-bounces@nmr.mgh.harvard.edu [mailto:freesurfer-bounces@nmr.mgh.harvard.edu]
On Behalf Of Martha Shiell
Sent: Saturday, February 13, 2016 12:59 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Freesurfer tool to automatically generate label surrounding a given vertex?
Hello Freesurfer community,
I am looking for a way to automatically generate a surface label file of a specific dimension (e.g. a circle with a specific diameter, or a square), given a specific vertex and some measure of the desired size.
I have considered to do so by starting with a label file consisting of a single vertex, and then expanding this label with the mri_label2label tool, using the --dilate option. I wanted to know though if anyone has any better suggestions.
Thank you,
Martha
--
Martha M. Shiell, PhD