Hi,
I need to manually rotate and reslice an anatomical volume. I am pretty sure this can be done using tkregister (or tkregister2?), but the documentation is limited. If tkregister is the way to go, what is the command line I need to enter pull up my volume (e.g raw_rawavg.mgz) in the GUI? If tkregister is not the way to go, what is?
thanks! Rosa
----
Rosa Lafer-Sousa Lab Manager, Bevil Conway Wellesley College - Neuroscience 106 Central Street Wellesley, MA
210-325-3185 rlaferso@wellesley.edu
You can try loading your volume as both the targ and mov, rotating it to where you want, saving the registration, then using mri_vol2vol to apply the transformation. See if that works.
doug
Rosa Lafer-Sousa wrote:
Hi,
I need to manually rotate and reslice an anatomical volume. I am pretty sure this can be done using tkregister (or tkregister2?), but the documentation is limited. If tkregister is the way to go, what is the command line I need to enter pull up my volume (e.g raw_rawavg.mgz) in the GUI? If tkregister is not the way to go, what is?
thanks! Rosa
Rosa Lafer-Sousa Lab Manager, Bevil Conway Wellesley College - Neuroscience 106 Central Street Wellesley, MA
210-325-3185 rlaferso@wellesley.edu mailto:rlaferso@wellesley.edu
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi Rosa,
You could run "tkrefgister2 --help" and "mri_vol2vol --help" on the command line to get some pointers. Assuming Freesurfer version 4.5 to register two volumes use:
tkregister2 --targ ${targ_dir}/${targ_vol} --mov ${src_dir}/${src_vol} --s $session --regheader --reg ${reg_dir}/${out_reg}
Note, "--regheader" will use the header information of bvoth files for initial orientation, you might want to leave this out if the header positions are too different...
to reslice the mov so it "looks" orientated like the tkregister2 target:
mri_vol2vol --mov ${src_dir}/${src_vol} --targ ${src_dir}/${src_vol} --o ${out_dir}/${mov_in_targ_orientation} --reg ${reg_dir}/${out_reg}
(this is what I use, but according to the help you should use "--targ ${targ_dir}/${targ_vol}", but in my case all the volumes share the basic geometry and only differ in orientation so it does not matter).
This will first allow you to create the transformation matrix to orient ${src_dir}/${src_vol} to be aligned with ${targ_dir}/${targ_vol}. Then it will reslice ${src_dir}/${src_vol} applying the just created registration matrix and save the result as ${out_dir}/${mov_in_targ_orientation}.
Obviously you will have to replace all the variables in the example with proper path and file names...
For Freesurfer 3 (assuming 1mm isotropic voxels) use: mri_vol2vol --in ${src_dir}/${src_vol} --out ${out_dir}/${mov_in_targ_orientation} --xfm ${reg_dir}/${reg} --voxres-in-plane 1 1 --invxfm (But really, better not use FS3 anymore)
I have not tested this with Freesurfer 5, but assume it will work like freesurfer 4.5 (famous last words...)
hope this helps...
Best Sebastian
On Jan 5, 2011, at 11:53 , Rosa Lafer-Sousa wrote:
Hi,
I need to manually rotate and reslice an anatomical volume. I am pretty sure this can be done using tkregister (or tkregister2?), but the documentation is limited. If tkregister is the way to go, what is the command line I need to enter pull up my volume (e.g raw_rawavg.mgz) in the GUI? If tkregister is not the way to go, what is?
thanks! Rosa
Rosa Lafer-Sousa Lab Manager, Bevil Conway Wellesley College - Neuroscience 106 Central Street Wellesley, MA
210-325-3185 rlaferso@wellesley.edu
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Hi Rosa,
You could run "tkrefgister2 --help" and "mri_vol2vol --help" on the command line to get some pointers. Assuming Freesurfer version 4.5 to register two volumes use:
tkregister2 --targ ${targ_dir}/${targ_vol} --mov ${src_dir}/${src_vol} --s $session --regheader --reg ${reg_dir}/${out_reg}
Note, "--regheader" will use the header information of bvoth files for initial orientation, you might want to leave this out if the header positions are too different...
to reslice the mov so it "looks" orientated like the tkregister2 target:
mri_vol2vol --mov ${src_dir}/${src_vol} --targ ${src_dir}/${src_vol} --o ${out_dir}/${mov_in_targ_orientation} --reg ${reg_dir}/${out_reg}
(this is what I use, but according to the help you should use "--targ ${targ_dir}/${targ_vol}", but in my case all the volumes share the basic geometry and only differ in orientation so it does not matter).
This will first allow you to create the transformation matrix to orient ${src_dir}/${src_vol} to be aligned with ${targ_dir}/${targ_vol}. Then it will reslice ${src_dir}/${src_vol} applying the just created registration matrix and save the result as ${out_dir}/${mov_in_targ_orientation}.
Obviously you will have to replace all the variables in the example with proper path and file names...
For Freesurfer 3 (assuming 1mm isotropic voxels) use: mri_vol2vol --in ${src_dir}/${src_vol} --out ${out_dir}/${mov_in_targ_orientation} --xfm ${reg_dir}/${reg} --voxres-in-plane 1 1 --invxfm (But really, better not use FS3 anymore)
I have not tested this wit
hope this helps...
Best Sebastian
On Jan 5, 2011, at 11:53 , Rosa Lafer-Sousa wrote:
Hi,
I need to manually rotate and reslice an anatomical volume. I am pretty sure this can be done using tkregister (or tkregister2?), but the documentation is limited. If tkregister is the way to go, what is the command line I need to enter pull up my volume (e.g raw_rawavg.mgz) in the GUI? If tkregister is not the way to go, what is?
thanks! Rosa
Rosa Lafer-Sousa Lab Manager, Bevil Conway Wellesley College - Neuroscience 106 Central Street Wellesley, MA
210-325-3185 rlaferso@wellesley.edu
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
freesurfer@nmr.mgh.harvard.edu