Hello,
We are looking for a way to reorient the orig.mgz files and the segmentation (aseg.mgz) into a different plane, and we have a couple of questions. We've used tkregister2 to reorient the orig image:
tkregister2 –mov orig.mgz –tar orig.mgz –regheader –reg myregister.dat
myregister.dat is created by this command line. We rotate the brain in the tkregister2 gui, then save the registration. Finally, we use the mri_vol2vol command line to rotate the orig and the aseg images.
For aseg.mgz: mri_vol2vol --mov aseg.mgz --targ orig.mgz --reg myregister.dat --interp nearest --o rotaseg.mgz
For orig.mgz: mri_vol2vol --mov orig.mgz --targ aseg.mgz --reg myregister.dat --o rotorig.mgz
This seems to look decent when we load it up in tkmedit, but we have two questions about the use of mri_vol2vol
1) Why does the algorithm need a target (won't run without it), since the transformation info is saved in myregister.dat? Also, how does it manage to work (which it does), given than neither of the targets entered are in the reoriented space? Should we use a different target? What is the role of the target?
2) A previous post specifies that "interp nearest" should be used to rotate the aseg.mgz file. What is the function played by that command? Should we also use it when rotating the orig.mgz file? It works without it, but do we risk distorting the image?
Thanks in advance!
Tim Al-Khindi
Hi Timour
I'll leave 1) to Doug. As for 2), the aseg.mgz is an index map into the FreeSurferColorLUT.txt (e.g. voxel value 17 means Left Hippocampus), so nearest nbr interpolation is the only kind that makes sense. Otherwise you will average index value which will give you a useless image.
cheers Bruce
On Tue, 9 Nov 2010, Timour Al-Khindi wrote:
Hello,
We are looking for a way to reorient the orig.mgz files and the segmentation (aseg.mgz) into a different plane, and we have a couple of questions. We've used tkregister2 to reorient the orig image:
tkregister2 ?mov orig.mgz ?tar orig.mgz ?regheader ?reg myregister.dat
myregister.dat is created by this command line. We rotate the brain in the tkregister2 gui, then save the registration. Finally, we use the mri_vol2vol command line to rotate the orig and the aseg images.
For aseg.mgz: mri_vol2vol --mov aseg.mgz --targ orig.mgz --reg myregister.dat --interp nearest --o rotaseg.mgz
For orig.mgz: mri_vol2vol --mov orig.mgz --targ aseg.mgz --reg myregister.dat --o rotorig.mgz
This seems to look decent when we load it up in tkmedit, but we have two questions about the use of mri_vol2vol
- Why does the algorithm need a target (won't run without it), since the
transformation info is saved in myregister.dat? Also, how does it manage to work (which it does), given than neither of the targets entered are in the reoriented space? Should we use a different target? What is the role of the target?
- A previous post specifies that "interp nearest" should be used to rotate
the aseg.mgz file. What is the function played by that command? Should we also use it when rotating the orig.mgz file? It works without it, but do we risk distorting the image?
Thanks in advance!
Tim Al-Khindi
The target information is not stored in the registration file, so you have to specify it on the command-line of mri_vol2vol. I don't know what your command line was, but you have to specify a mov and a targ and a reg. Information about the reoriented space is basically stored in a combination of the reg file and the geometry in the target volume.
doug
Bruce Fischl wrote:
Hi Timour
I'll leave 1) to Doug. As for 2), the aseg.mgz is an index map into the FreeSurferColorLUT.txt (e.g. voxel value 17 means Left Hippocampus), so nearest nbr interpolation is the only kind that makes sense. Otherwise you will average index value which will give you a useless image.
cheers Bruce
On Tue, 9 Nov 2010, Timour Al-Khindi wrote:
Hello,
We are looking for a way to reorient the orig.mgz files and the segmentation (aseg.mgz) into a different plane, and we have a couple of questions. We've used tkregister2 to reorient the orig image:
tkregister2 ?mov orig.mgz ?tar orig.mgz ?regheader ?reg myregister.dat
myregister.dat is created by this command line. We rotate the brain in the tkregister2 gui, then save the registration. Finally, we use the mri_vol2vol command line to rotate the orig and the aseg images.
For aseg.mgz: mri_vol2vol --mov aseg.mgz --targ orig.mgz --reg myregister.dat --interp nearest --o rotaseg.mgz
For orig.mgz: mri_vol2vol --mov orig.mgz --targ aseg.mgz --reg myregister.dat --o rotorig.mgz
This seems to look decent when we load it up in tkmedit, but we have two questions about the use of mri_vol2vol
- Why does the algorithm need a target (won't run without it), since the
transformation info is saved in myregister.dat? Also, how does it manage to work (which it does), given than neither of the targets entered are in the reoriented space? Should we use a different target? What is the role of the target?
- A previous post specifies that "interp nearest" should be used to rotate
the aseg.mgz file. What is the function played by that command? Should we also use it when rotating the orig.mgz file? It works without it, but do we risk distorting the image?
Thanks in advance!
Tim Al-Khindi
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu