Hi Usman,
I'm an not very familiar with mri_vol2vol , maybe Doug knows the difference between --reg and --reg-final. I would also expect it to give the same result in your case (as you don't apply any manual --rot or --trans).
Anyway, happy you got it working.
Best, Martin
On Wed, 2012-07-11 at 16:46 -0400, Usman Khan wrote:
Hi Martin, Thanks for the suggestion. I resolved the issue by using the --regheader flag in tkmregister, and --reg as the default output by mri_vol2vol (even though I did supply a reg-final flag). It seems like I mixed up the difference between reg-final and the default registration matrix. would you mind explaining the difference? in any event, here is my script:
for i in $(ls posterior_left_* posterior_Left-Hippocampus.mgz posterior_right_* posterior_Right-Hippocampus.mgz); do fname=$(basename $i); fname=${fname%%.*}; echo "$fname" tkregister2 --noedit --reg hc_subfields/xfm_"$fname".mgz.reg --regheader --targ nu.mgz --mov "$i" --ltaout hc_subfields/xfm_"$fname".lta mri_concatenate_lta hc_subfields/xfm_"$fname".lta xfm_nu_to_pre.lta hc_subfields/xfm_"$fname"_to_pregado.lta mri_convert -at hc_subfields/xfm_"$fname"_to_pregado.lta "$i" hc_subfields/final/final_"$fname".mgz; done
Thanks,
Usman
On Jul 10, 2012, at 10:40 PM, Martin Reuter mreuter@nmr.mgh.harvard.edu wrote:
Hi Usman ,
Try validating each step by applying each transform. I usually use mri_convert -at For it.
Best Martin
Usman Khan usman@bwh.harvard.edu wrote: Hi Martin, Thanks for the quick reply. I tried the following commands, but it looks like the volumes are still out of line. Is there something I am missing?
to get from hc_subfield --> nu.mgz --> t1_cbv #register and create transforms
- mri_vol2vol --mov hc_subfield.mgz --targ nu.mgz --reg-final
xfm_hcsubfield_to_nu.dat --regheader 2) mri_robust_register --mov nu.mgz --dst t1_cbv.mgz --lta xfm_nu_to_t1.lta --satit
#convert output from (1) from reg-final.dat to .lta 3) tkregister2 --noedit --mov hc_subfield.mgz --targ nu.mgz --reg xfm_hcsubfield_to_nu.dat --ltaout test.lta 4) mri_concatenate_lta test.lta xfm_nu_to_t1.lta final.lta
#apply lta file, using t1_cbv as target and hc_subfield as --mov file 5) mri_vol2vol --mov subfield --targ t1_cbv.mgz --reg final.lta --out test.mgz
On Tue, Jul 10, 2012 at 6:10 PM, Martin Reuter mreuter@nmr.mgh.harvard.edu wrote: Hi Usman,
you need to convert the reg to lta (using tkregister2) and then you can use mri_concatenate_lta . Cheers, Martin On Tue, 2012-07-10 at 17:36 -0400, Usman Khan wrote: > Hi FreeSurfer, > I have two images. One MPRAGE (1x1x1mm) and a T1-weighted > (0.682x0.682x3mm) image used for CBV mapping. We have run FS, with > hippocampal subfields on the MPRAGE and would now like to transform > the posterior probability maps to the T1-weighted CBV space. > > > I have been using > 1) mri_vol2vol with --regheader to map the posterior_* subfield files > to nu.mgz space > 2) mri_robust_register to coregister the nu.mgz file to the > T1-weighted CBV image > > > Is there any way to combine the .reg and .lta files from (1) and (2) > to transform the subfield posterior probability maps directly from > their 0.5mm^3 space to the T1-weighted CBV space? I have been > reluctant to create an intermediate volume between steps 1 and 2, as > resampling the subfield probability maps into 1x1x1mm nu.mgz space > will result in loss of resolution to the 0.68x0.68 (coronal) space in > the T1-weighted CBV scan. > > > Any help would be appreciated > > > Usman > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer