External Email - Use Caution
Hi Doug,
I’m trying to do two different things but let’s focus on the one which does not involve dilation.
I have a pair of vertices in a “white” label.
I want to compute the shortest distance from one vertex to the other along the “white” surface.
My approach is to project the pair onto the icosahedron, identify the great circle which connect them there, interpolate a bunch of points in the intersection between the great circle arc that connects them,
project all those back to the original “white” label, and then walk from one vertex to the next to count the total distance between the original pair.
I can do the projection from “white” label to ico to “white” label as follows:
Original “white” label à ico
mri_label2label --srcsubject 174 --srclabel lh.pairsets.label --trgsubject ico --trgicoorder 7 --trglabel /dev/shm/ico_1.label --regmethod surface --hemi lh
I add in the great circle interpolated points to ico_1.label to create ico_2.label and then
do the projection back:
mri_label2label --srcsubject ico --srclabel /dev/shm/ico_2.label --trgsubject 174 --srcicoorder 7 --trglabel /dev/shm/lh.pairpaths.label --regmethod surface --hemi
lh
There are two problems that I see.
(1)
Notice that I need to do this for many pairs at a time because mri_label2label startup is slow. But to do that, I need to be able to identify the points in ico_1.label, i.e. in the icosahedron to which
each of the original vertices was projected and of course vica versa for the points projected back from the icosahedron into lh.pairpaths.label. You suggested using mris_apply_reg –nnf to make the projections one-to-one which makes sense but I don’t see the
functionality in that tool that is needed to do the projections to and from the icosahedron or to do so with anything but a volume file. Perhaps I’m missing something.
(2)
mri_label2label appears to rely on the index numbers in column 1 of the label file. I do not, however, understand the correspondence between the index numbers in ico_1.label and their relationship to
the index numbers in /usr/local/pkg/freesurfer//lib/bem/ic7.tri
which looks like a label file but the index numbers with corresponding xyz coordinates for the vertices in ico_1.label don’t match up with those in ic7.tri, even when multiplied by 100 The thing is that when I interpolate
along the great circle route between a pair of vertices in the icosahedron projection, it looks like I need to select points in ic7.tri with the correct index numbers to get the right answer when I project the icosahedron vertices back to the “white” label.
I hope these questions are clear.
Thanks – Don
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu>
On Behalf Of Douglas N. Greve
Sent: Friday, December 10, 2021 6:31 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] mri_label2label: one-to-one for subjectNo --> ico
Don, can you send your command line? If you are using surface-based registration, then the origin should not matter. You are right that there is not a one-to-one correspondence. The way it works is that it
starts on the target surface, goes through all the vertices and finds the closest vertex in the source and maps the value. At this point, each target only has one source, but each source may have multiple targets. By default, it then goes through another loop
where it finds all the source vertices that have not been mapped, finds the closest target vertex, and maps the source to that target (eventually taking the mean or sum of all the sources that map to a given target). If it is the 2nd stage that is giving
you problems, then you can turn it off in mris_apply_reg with --nnf (stands for "nearest-neighbor-forward", vs the default nnfr where r=reverse).
On 12/3/2021 8:41 AM, Krieger, Donald N. wrote:
External Email - Use Caution
Dear Bruce, Doug, and everyone,
- I am projecting labels from a subject’s labels onto the icosahedron and note that the mapping is not one-to-one. Because of this, I cannot tell which subject vertex maps to which icosahedron vertex which I need to able to do. What am I missing here?
- Just double-checking something simple – The center of the icosahedron is as the origin, i.e. 0,0,0, yes?
Thanks – Don
_______________________________________________Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduMailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer