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-boun...@nmr.mgh.harvard.edu <freesurfer-boun...@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, 1. 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? 2. Just double-checking something simple – The center of the icosahedron is as the origin, i.e. 0,0,0, yes? Thanks – Don _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu> https://secure-web.cisco.com/16idM-8rH6QjpFpYnDmZSSGt-BzN5B1FVlUlnjuCUr25TDNSM0OezQLe2-tuLfnGRr7QUXNCGeJ4ov1vp44oVWRDE4Da7yJG7ciCSHe5O7FbFt_P8Q6X79Ncg3Mf8jfqQb28L9ZokZDrTGV7WKWxf0-Lddxqi1uqedMHZWVcmhJl5YwMH5EZkREfsFV86adOJy_mvBtHxSHXGNk9oySzJxKnuJEDwkLVRqzG-tzM07812A_Qz137CNAbfXOZeHkkiS4CWAtXa9Xk4b-X1GfvlIslopmYaluKIKe15rqwCY7V7XNjLqXlqiLJWiJpfJ4GL/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer<https://secure-web.cisco.com/14EUxdOYfSPqsz6yqmA6VJiPUdWCUmnXXlumftaDujdxKS3CMVzX3QdHg8PlD7OCKY3aO9iaQK3IhRv-PpD4sCd6MyazcTupDoaJ13FMLzWT2tHFtW5sp7EYA8SUb38WqbMbqU2kBwzHwqIlkrBYF0gvYZ9qPbX-SCtiLLTuo_dFClhH66aKGSGCNRXkv3D79-kLx99MeNh_wGJ7X6aLibbSodFDZYuWocAH5Liz6oqGbaG_7Uli4JjTZjYhAb5E56ptMQnS6vgRe6dtLYQfI_dTik4bukhWbtqUgA-SeD7KU32QZ_XlJ7ajdzNCXk6VK/https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer__%3B%21%21NHLzug%21c-v1hBkNKB3BsDtLDTN8Pj3vnw5Ph3aLIjmOK0eN0QhEmO1aFSTNDyA3zbqb3zGz%24>
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer