Hi FreeSurfer Users,
I'm still having no luck getting my timepoints to realign to the base space so that I can calculate volume overlap between the timepoints. Here's what I've been trying:
BASEDIR=path to base/mri TPDIR=path to timepoint
Convert the .lta tpNid_to_baseid.lta transform to .xfm and .dat: tkregister2 --mov $BASEDIR/norm.mgz --targ $TPDIR/mri/aseg.mgz --lta $BASEDIR/transforms/${TP}_to_base.lta --reg $TPDIR/aseg_to_base.dat --xfmout $TPDIR/aseg_to_base.xfm
Apply transform using mri_convert or mri_label2vol: mri_convert -T $TPDIR/aseg_to_base.xfm --out_type nii $TPDIR/mri/aseg.mgz $TPDIR/aseg.base.nii OR mri_label2vol --seg $TPDIR/mri/aseg.mgz --temp $BASEDIR/norm.mgz --reg $TPDIR/aseg_to_base.dat --o $TPDIR/aseg.base.mgz
When I do this for multiple scans, I expect them to overlap. But, when I view them as NIfTIs in fslview, they do not align. Any suggestions for what might be going on?
Thank you! Liz
-----Original Message----- From: Sita Kakunoori [mailto:sita@nmr.mgh.harvard.edu] Sent: Tuesday, August 04, 2009 12:33 PM To: Elizabeth Selgrade Cc: 'Martin Reuter'; freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Registering aseg to base for volume overlap calc ulations
Hi Liz,
I think you can run tkregister2 with --noedit flag to convert .lta files to .dat files.
tkregister2 --mov <..> --s <..> --lta <...> --noedit --reg <test.dat>
Sita.
On Tue, 4 Aug 2009, Elizabeth Selgrade wrote:
Martin and FreeSurfer Users,
A few more questions. What is the best way to apply this transform to my aseg.mgz? I've tried using mri_label2vol, but that fails because the transform is a .lta instead of a .dat. Then I used tkregister2 to register my timepoint's aseg.mgz to the base's norm.mgz with the --lta flag, thinking that this would save my .lta as a .dat. But, when I do this (tkregister2 then mri_label2vol) for multiple timepoints and compare the results, the scans are still not overlapping.
So, is there a way to change .lta files into .dat files? Or is there a different tool that I should be using to apply the transform?
Thank you for your help! Liz Selgrade
-----Original Message----- From: Martin Reuter [mailto:mreuter@nmr.mgh.harvard.edu] Sent: Monday, August 03, 2009 5:28 PM To: Elizabeth Selgrade Cc: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Registering aseg to base for volume overlap calc ulations
Liz,
to be precise, this is true for the standard FS stream.
The longitudinal stream is different, as in FS 4.4 the base actually lives in two similar, but slightly different spaces, because the template is created for T1 and recreated for the norm.mgz. The aseg is in the space of the norm and the maps, I pointed you to, map to that
space.
We improved the base for the next FS release 4.5, where it lives only in one space, to make things easier.
Best, Martin
On Mon, 2009-08-03 at 17:05 -0400, Martin Reuter wrote:
Its in the native space of the TP (orig, nu, T1, norm, brainmask, aseg, brain .. all in the same space).
-Martin
On Mon, 2009-08-03 at 16:40 -0400, Elizabeth Selgrade wrote:
Hi Martin,
Thanks for the quick response. I have a follow-up question: In what space do the segmentations take place? (What space is aseg.mgz in?) I'm assuming that it must be in the timepoint's native space in order to use the inverse transform you pointed me to, but I had always thought that they were in a normalized space.
Thank you again! Liz
-----Original Message----- From: Martin Reuter [mailto:mreuter@nmr.mgh.harvard.edu] Sent: Monday, August 03, 2009 4:35 PM To: Elizabeth Selgrade Cc: 'freesurfer@nmr.mgh.harvard.edu' Subject: Re: [Freesurfer] Registering aseg to base for volume overlap calculations
Hi Liz,
the registrations are stored in baseid/mri/transforms look for files baseid_to_tpNid.lta and the inverse tpNid_to_baseid.lta (which is the map you are looking
for).
These should align all your TPs to the base space.
Best, Martin
On Mon, 2009-08-03 at 16:19 -0400, Elizabeth Selgrade wrote:
Hello FreeSurfer Users,
I am using the longitudinal stream to look at four timepoints/subject, and I'd like to transform all of my timepoints to the base scan's unbiased space so that I can calculate ROI volume overlap. I have been using tkregister2 to calculate the transform from my scan.base.long/mri/aseg.mgz to base/mri/rawavg.mgz and then using
mri_label2vol to apply the transform.
When I do this for all of my scans, I expect to see that the brains are overlapping in the same space. But, I'm not getting that. Any suggestions for how to get all of these scans back in the
base space?
Thank you! Liz Selgrade _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi Liz,
try this:
mri_convert -T $BASEDIR/transforms/${TP}_to_base.lta -rl $BASEDIR/norm.mgz -rt nearest --out_type nii $TPDIR/mri/aseg.mgz $TPDIR/aseg.base.nii
(that should work, if not split it into two steps: transform and then convert into nii). The -rl (reslice like) is important, if you want the voxel images to align, otherwise the images are aligned in RAS space (and some viewers cannot deal with that, if they only show the voxel data). Also the -rt (resample type) should be nearest when mapping asegs (because otherwise the values get interpolated).
Cheers, Martin
On Thu, 2009-08-06 at 09:41 -0400, Elizabeth Selgrade wrote:
Hi FreeSurfer Users,
I'm still having no luck getting my timepoints to realign to the base space so that I can calculate volume overlap between the timepoints. Here's what I've been trying:
BASEDIR=path to base/mri TPDIR=path to timepoint
Convert the .lta tpNid_to_baseid.lta transform to .xfm and .dat: tkregister2 --mov $BASEDIR/norm.mgz --targ $TPDIR/mri/aseg.mgz --lta $BASEDIR/transforms/${TP}_to_base.lta --reg $TPDIR/aseg_to_base.dat --xfmout $TPDIR/aseg_to_base.xfm
Apply transform using mri_convert or mri_label2vol: mri_convert -T $TPDIR/aseg_to_base.xfm --out_type nii $TPDIR/mri/aseg.mgz $TPDIR/aseg.base.nii OR mri_label2vol --seg $TPDIR/mri/aseg.mgz --temp $BASEDIR/norm.mgz --reg $TPDIR/aseg_to_base.dat --o $TPDIR/aseg.base.mgz
When I do this for multiple scans, I expect them to overlap. But, when I view them as NIfTIs in fslview, they do not align. Any suggestions for what might be going on?
Thank you! Liz
-----Original Message----- From: Sita Kakunoori [mailto:sita@nmr.mgh.harvard.edu] Sent: Tuesday, August 04, 2009 12:33 PM To: Elizabeth Selgrade Cc: 'Martin Reuter'; freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Registering aseg to base for volume overlap calc ulations
Hi Liz,
I think you can run tkregister2 with --noedit flag to convert .lta files to .dat files.
tkregister2 --mov <..> --s <..> --lta <...> --noedit --reg <test.dat>
Sita.
On Tue, 4 Aug 2009, Elizabeth Selgrade wrote:
Martin and FreeSurfer Users,
A few more questions. What is the best way to apply this transform to my aseg.mgz? I've tried using mri_label2vol, but that fails because the transform is a .lta instead of a .dat. Then I used tkregister2 to register my timepoint's aseg.mgz to the base's norm.mgz with the --lta flag, thinking that this would save my .lta as a .dat. But, when I do this (tkregister2 then mri_label2vol) for multiple timepoints and compare the results, the scans are still not overlapping.
So, is there a way to change .lta files into .dat files? Or is there a different tool that I should be using to apply the transform?
Thank you for your help! Liz Selgrade
-----Original Message----- From: Martin Reuter [mailto:mreuter@nmr.mgh.harvard.edu] Sent: Monday, August 03, 2009 5:28 PM To: Elizabeth Selgrade Cc: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Registering aseg to base for volume overlap calc ulations
Liz,
to be precise, this is true for the standard FS stream.
The longitudinal stream is different, as in FS 4.4 the base actually lives in two similar, but slightly different spaces, because the template is created for T1 and recreated for the norm.mgz. The aseg is in the space of the norm and the maps, I pointed you to, map to that
space.
We improved the base for the next FS release 4.5, where it lives only in one space, to make things easier.
Best, Martin
On Mon, 2009-08-03 at 17:05 -0400, Martin Reuter wrote:
Its in the native space of the TP (orig, nu, T1, norm, brainmask, aseg, brain .. all in the same space).
-Martin
On Mon, 2009-08-03 at 16:40 -0400, Elizabeth Selgrade wrote:
Hi Martin,
Thanks for the quick response. I have a follow-up question: In what space do the segmentations take place? (What space is aseg.mgz in?) I'm assuming that it must be in the timepoint's native space in order to use the inverse transform you pointed me to, but I had always thought that they were in a normalized space.
Thank you again! Liz
-----Original Message----- From: Martin Reuter [mailto:mreuter@nmr.mgh.harvard.edu] Sent: Monday, August 03, 2009 4:35 PM To: Elizabeth Selgrade Cc: 'freesurfer@nmr.mgh.harvard.edu' Subject: Re: [Freesurfer] Registering aseg to base for volume overlap calculations
Hi Liz,
the registrations are stored in baseid/mri/transforms look for files baseid_to_tpNid.lta and the inverse tpNid_to_baseid.lta (which is the map you are looking
for).
These should align all your TPs to the base space.
Best, Martin
On Mon, 2009-08-03 at 16:19 -0400, Elizabeth Selgrade wrote:
Hello FreeSurfer Users,
I am using the longitudinal stream to look at four timepoints/subject, and I'd like to transform all of my timepoints to the base scan's unbiased space so that I can calculate ROI volume overlap. I have been using tkregister2 to calculate the transform from my scan.base.long/mri/aseg.mgz to base/mri/rawavg.mgz and then using
mri_label2vol to apply the transform.
When I do this for all of my scans, I expect to see that the brains are overlapping in the same space. But, I'm not getting that. Any suggestions for how to get all of these scans back in the
base space?
Thank you! Liz Selgrade _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu