[Freesurfer] aparc+aseg to native space issue
External Email - Use Caution Hi, I am having an issue converting the aparc+aseg segmentation into the native space. I have tried using both of the following commands: mri_label2vol --seg aparc+aseg.mgz --temp rawavg.mgz --o aparc+aseg_native.mgz --regheader mri_vol2vol --mov aparc+aseg.mgz --targ rawavg.mgz --regheader --nearest --o aparc+aseg_native.mgz In both cases, the output segmentation in native space is slightly offset along the x axis (given x,y,z coordinates). In fact, mri_label2vol is offset in the opposite direction as mri_vol2vol. All outputs have the same origin as the original native space, so I am wondering if it's a problem with the interpolation. Do you have any advice for how to fix this issue? Thank you! Kathleen Larson (she/her) Medical Image Computing Lab (MedICL) Biomedical Engineering | Ph.D. Candidate Vanderbilt University ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] mri_surf2surf help
External Email - Use Caution I am still having an issue with the command. This is what I am running: (MRI_DIR is the subj/mri, and SURF_DIR is the subj/surf directory) tkregister2 --mov /rawavg.mgz --targ /orig.mgz --reg /register.native.dat --noedit --regheader mri_surf2surf --sval-xyz pial --reg /register.native.dat /rawavg.mgz --hemi lh --tval /lh.native.pial --tval-xyz /rawavg.mgz --s Currently, the surface is centered inside the brain image (rawavg.mgz), but it is rotated and not oriented correctly. Perhaps I am missing a step. Thanks, Katie From: Larson, Kathleen E Sent: Tuesday, April 16, 2019 2:15 PM To: Freesurfer support list Subject: RE: [Freesurfer] mri_surf2surf help Thank you! Yes, I was able to figure it out. However, even when I swap the moving/target inputs, the surface is still not in the correct anatomical space. Also, just so you are aware, the instructions on the website you gave me aren't up to date... the --tval-xyz requires a volume input, but the instructions don't include one, so it you run it exactly like it is there you'll get an error. Thanks, Katie From: freesurfer-boun...@nmr.mgh.harvard.edu [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Greve, Douglas N.,Ph.D. [dgr...@mgh.harvard.edu] Sent: Thursday, April 11, 2019 10:37 AM To: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] mri_surf2surf help You are almost there. You need to swap mov and targ in your tkregister2 command. I also found these instructions on how to do this, but you seemed to have figured it out already https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsAnat-to-NativeAnatdata=02%7C01%7Ckathleen.e.larson%40vanderbilt.edu%7C94991fa8b1e549ea2c9e08d6be93b12c%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636905938873837930sdata=K40k6eVZ40ejC4tNfOrgL%2BWhb6Zh%2FqJwQtpVzpgYM9s%3Dreserved=0 On 4/10/19 6:38 PM, Larson, Kathleen E wrote: > External Email - Use Caution > > Thanks. I'm now able to run the command without error. However, the surface > output is not lined up with the original image that I used as the FS input. > Here is the code I use: > > tkregister2 --mov orig.mgz --targ rawavg.mgz --reg register.native.dat --s > $subject > mri_surf2surf --reg register.native.dat rawavg.mgz --hemi lh --sval-xyz pial > --tval-xyz rawavg.mgz --tval ./lh.native.pial --s SUBJECT_ID > > My guess is that I am somehow not creating the proper transform... do you see > anything here that I should be doing differently? > > Thanks, > Katie > > From: freesurfer-boun...@nmr.mgh.harvard.edu > [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Greve, Douglas N.,Ph.D. > [dgr...@mgh.harvard.edu] > Sent: Monday, April 08, 2019 12:27 PM > To: freesurfer@nmr.mgh.harvard.edu > Subject: Re: [Freesurfer] mri_surf2surf help > > Have you looked at the help? Run with --help and look at example 4 > doug > > On 4/4/19 9:56 PM, Larson, Kathleen E wrote: >> External Email - Use Caution >> >> Hello FreeSurfer developers, >> >> I'm having trouble running the command mri_surf2surf, and I haven't >> been able to find a fix in the message archives (a similar question >> has been asked, but I couldn't find the answer). I am trying to >> convert the pial and white matter surfaces for a series of subjects >> back to the anatomical space. I have computed the registration matrix >> to transform the surfaces, but am having trouble with the >> mri_surf2surf syntax. This is the command I am trying to run: >> >> mri_surf2surf --hemi lh --sval-xyz pial --reg register.native.dat >> rawavg.mgz --tval lh.pial.native --tval-xyz --s >> >> and I get an error saying that --tval-xyz requires an input volume. >> (The syntax described on the website >> (https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsAnat-to-NativeAnatdata=02%7C01%7Ckathleen.e.larson%40vanderbilt.edu%7C94991fa8b1e549ea2c9e08d6be93b12c%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636905938873837930sdata=K40k6eVZ40ejC4tNfOrgL%2BWhb6Zh%2FqJwQtpVzpgYM9s%3Dreserved=0) >> is >> out of date.) I have tried to use rawavg.mgz as the input volume, but >> then I get an output that can only be read as a scalar overlay, and I >> need an actual surface. When I try to use a surface as the input, I >> get an error saying that the file type cannot identified. >> >> Do you have any suggestions for what I am doing wrong? >> >> Thank you, >> >> Kathleen Larson >> Department of Biomedical Engineering >> Vanderbilt University >> 304 Featheringill-
Re: [Freesurfer] mri_surf2surf help
External Email - Use Caution Thank you! Yes, I was able to figure it out. However, even when I swap the moving/target inputs, the surface is still not in the correct anatomical space. Also, just so you are aware, the instructions on the website you gave me aren't up to date... the --tval-xyz requires a volume input, but the instructions don't include one, so it you run it exactly like it is there you'll get an error. Thanks, Katie From: freesurfer-boun...@nmr.mgh.harvard.edu [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Greve, Douglas N.,Ph.D. [dgr...@mgh.harvard.edu] Sent: Thursday, April 11, 2019 10:37 AM To: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] mri_surf2surf help You are almost there. You need to swap mov and targ in your tkregister2 command. I also found these instructions on how to do this, but you seemed to have figured it out already https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsAnat-to-NativeAnatdata=02%7C01%7Ckathleen.e.larson%40vanderbilt.edu%7C94991fa8b1e549ea2c9e08d6be93b12c%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636905938873837930sdata=K40k6eVZ40ejC4tNfOrgL%2BWhb6Zh%2FqJwQtpVzpgYM9s%3Dreserved=0 On 4/10/19 6:38 PM, Larson, Kathleen E wrote: > External Email - Use Caution > > Thanks. I'm now able to run the command without error. However, the surface > output is not lined up with the original image that I used as the FS input. > Here is the code I use: > > tkregister2 --mov orig.mgz --targ rawavg.mgz --reg register.native.dat --s > $subject > mri_surf2surf --reg register.native.dat rawavg.mgz --hemi lh --sval-xyz pial > --tval-xyz rawavg.mgz --tval ./lh.native.pial --s SUBJECT_ID > > My guess is that I am somehow not creating the proper transform... do you see > anything here that I should be doing differently? > > Thanks, > Katie > > From: freesurfer-boun...@nmr.mgh.harvard.edu > [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Greve, Douglas N.,Ph.D. > [dgr...@mgh.harvard.edu] > Sent: Monday, April 08, 2019 12:27 PM > To: freesurfer@nmr.mgh.harvard.edu > Subject: Re: [Freesurfer] mri_surf2surf help > > Have you looked at the help? Run with --help and look at example 4 > doug > > On 4/4/19 9:56 PM, Larson, Kathleen E wrote: >> External Email - Use Caution >> >> Hello FreeSurfer developers, >> >> I'm having trouble running the command mri_surf2surf, and I haven't >> been able to find a fix in the message archives (a similar question >> has been asked, but I couldn't find the answer). I am trying to >> convert the pial and white matter surfaces for a series of subjects >> back to the anatomical space. I have computed the registration matrix >> to transform the surfaces, but am having trouble with the >> mri_surf2surf syntax. This is the command I am trying to run: >> >> mri_surf2surf --hemi lh --sval-xyz pial --reg register.native.dat >> rawavg.mgz --tval lh.pial.native --tval-xyz --s >> >> and I get an error saying that --tval-xyz requires an input volume. >> (The syntax described on the website >> (https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsAnat-to-NativeAnatdata=02%7C01%7Ckathleen.e.larson%40vanderbilt.edu%7C94991fa8b1e549ea2c9e08d6be93b12c%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636905938873837930sdata=K40k6eVZ40ejC4tNfOrgL%2BWhb6Zh%2FqJwQtpVzpgYM9s%3Dreserved=0) >> is >> out of date.) I have tried to use rawavg.mgz as the input volume, but >> then I get an output that can only be read as a scalar overlay, and I >> need an actual surface. When I try to use a surface as the input, I >> get an error saying that the file type cannot identified. >> >> Do you have any suggestions for what I am doing wrong? >> >> Thank you, >> >> Kathleen Larson >> Department of Biomedical Engineering >> Vanderbilt University >> 304 Featheringill-Jacobs Hall >> (425)-894-2005 >> >> ___ >> Freesurfer mailing list >> Freesurfer@nmr.mgh.harvard.edu >> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurferdata=02%7C01%7Ckathleen.e.larson%40vanderbilt.edu%7C94991fa8b1e549ea2c9e08d6be93b12c%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636905938873837930sdata=dY%2BnJIQxhMxco9iSZLCJDE4Fkgc81y4zginC%2BYoSqPM%3Dreserved=0 > > ___ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://nam
Re: [Freesurfer] mri_surf2surf help
External Email - Use Caution Thanks. I'm now able to run the command without error. However, the surface output is not lined up with the original image that I used as the FS input. Here is the code I use: tkregister2 --mov orig.mgz --targ rawavg.mgz --reg register.native.dat --s $subject mri_surf2surf --reg register.native.dat rawavg.mgz --hemi lh --sval-xyz pial --tval-xyz rawavg.mgz --tval ./lh.native.pial --s SUBJECT_ID My guess is that I am somehow not creating the proper transform... do you see anything here that I should be doing differently? Thanks, Katie From: freesurfer-boun...@nmr.mgh.harvard.edu [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Greve, Douglas N.,Ph.D. [dgr...@mgh.harvard.edu] Sent: Monday, April 08, 2019 12:27 PM To: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] mri_surf2surf help Have you looked at the help? Run with --help and look at example 4 doug On 4/4/19 9:56 PM, Larson, Kathleen E wrote: > > External Email - Use Caution > > Hello FreeSurfer developers, > > I'm having trouble running the command mri_surf2surf, and I haven't > been able to find a fix in the message archives (a similar question > has been asked, but I couldn't find the answer). I am trying to > convert the pial and white matter surfaces for a series of subjects > back to the anatomical space. I have computed the registration matrix > to transform the surfaces, but am having trouble with the > mri_surf2surf syntax. This is the command I am trying to run: > > mri_surf2surf --hemi lh --sval-xyz pial --reg register.native.dat > rawavg.mgz --tval lh.pial.native --tval-xyz --s > > and I get an error saying that --tval-xyz requires an input volume. > (The syntax described on the website > (https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsAnat-to-NativeAnatdata=02%7C01%7Ckathleen.e.larson%40vanderbilt.edu%7Cba17f3d3fc0c4afcfd3a08d6bc479a23%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636903413085822718sdata=YnDMci9yiERFJr7aODvHk7b91e7cLbUxBRO1agMZAH8%3Dreserved=0) > is > out of date.) I have tried to use rawavg.mgz as the input volume, but > then I get an output that can only be read as a scalar overlay, and I > need an actual surface. When I try to use a surface as the input, I > get an error saying that the file type cannot identified. > > Do you have any suggestions for what I am doing wrong? > > Thank you, > > Kathleen Larson > Department of Biomedical Engineering > Vanderbilt University > 304 Featheringill-Jacobs Hall > (425)-894-2005 > > ___ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurferdata=02%7C01%7Ckathleen.e.larson%40vanderbilt.edu%7Cba17f3d3fc0c4afcfd3a08d6bc479a23%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636903413085822718sdata=9h3EeskXFr95oJSlYxSWdFmu3RMPo8MEMVMGVTxmW%2FA%3Dreserved=0 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurferdata=02%7C01%7Ckathleen.e.larson%40vanderbilt.edu%7Cba17f3d3fc0c4afcfd3a08d6bc479a23%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636903413085832722sdata=gkL4wO5S4uX%2BO8ZoKY25bn%2BLIkaw7NBdZN%2B1J9AiQVs%3Dreserved=0 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] mri_surf2surf help
External Email - Use Caution Hello FreeSurfer developers, I'm having trouble running the command mri_surf2surf, and I haven't been able to find a fix in the message archives (a similar question has been asked, but I couldn't find the answer). I am trying to convert the pial and white matter surfaces for a series of subjects back to the anatomical space. I have computed the registration matrix to transform the surfaces, but am having trouble with the mri_surf2surf syntax. This is the command I am trying to run: mri_surf2surf --hemi lh --sval-xyz pial --reg register.native.dat rawavg.mgz --tval lh.pial.native --tval-xyz --s and I get an error saying that --tval-xyz requires an input volume. (The syntax described on the website (https://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat) is out of date.) I have tried to use rawavg.mgz as the input volume, but then I get an output that can only be read as a scalar overlay, and I need an actual surface. When I try to use a surface as the input, I get an error saying that the file type cannot identified. Do you have any suggestions for what I am doing wrong? Thank you, Kathleen Larson Department of Biomedical Engineering Vanderbilt University 304 Featheringill-Jacobs Hall (425)-894-2005 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer