ah in that case you need to multiply the affine stored in one session's bbreg with the inverse of the other bbreg from the target session and then use mri_vol2vol with the composite transform. note: only nearest or trilinear interp
OK, cool, I'll look into this for the future.But back to my original question. If I already have data preprocessed with several runs, each run motion-corrected within-session, and an affine registration from each run's space to the anatomical determined by bbregister, is there any way to use those transformation parameters to take the function scans into a common space that retains the original voxel size?MichaelOn Mon, Dec 19, 2011 at 1:34 PM, Satrajit Ghosh <satra@mit.edu> wrote:
hi michael,so for each frame of every session you get a bbreg file and the script ends up aligning the volumes to some reference. all you need to do is propagate that reference across your sessions. you might for example want this to be the middle volume of your entire experiment.
cheers,
satraOn Mon, Dec 19, 2011 at 10:18 PM, Michael Waskom <mwaskom@stanford.edu> wrote:
Sorry, I guess it's not clear what I'm hoping to do.Because I'm going to use this data for mvpa, I don't want to resample into 1x1x1 voxels or go onto the surface. But I have multiple runs that I want to use, so I need there to be a voxel-to-brain correspondence across the different runs.
MichaelOn Mon, Dec 19, 2011 at 12:46 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu> wrote:
It will output a register.dat for each frame. You can extract the frame from the time series (mri_convert --frame ), apply the reg with mri_vol2vol or mri_vol2surf, then concatenate the results back into a time series (mri_concat)
doug
Michael Waskom wrote:
Hi Satra and Doug,
That script is good to know about. But, from what I can tell, it looks like it will output a timeseries in the same space as the original template (each frame gets transformed with a combination of the matrix specifying its registration to the anatomical and the inverse of the matrix specifying the registration from the template to the anatomical). So this might give me somewhat better motion correction, but it won't give me a common space across runs.
Best,
Michael
On Mon, Dec 19, 2011 at 7:26 AM, Douglas N Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> wrote:
That may or may not do what you want. I think that version keeps the
functional data in the functional space. It would be better to
register
each TR to the anat, then simply sample each TR to the anatomical
space
(volume or surface) rather than going back into functional space.
doug
Satrajit Ghosh wrote:
> hey mike,
>
> take a look at:
>
> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mc-bbr
>
> cheers,
>
> satra
>
>
>
> On Mon, Dec 19, 2011 at 2:04 AM, Michael Waskom
<mwaskom@stanford.edu <mailto:mwaskom@stanford.edu><mailto:Freesurfer@nmr.mgh.harvard.edu> <mailto:mwaskom@stanford.edu <mailto:mwaskom@stanford.edu>>> wrote:
>
> Hi Doug,
>
> Is it possible to use the bbregister parameters to resample a
> functional image such that it is in register with the anatomical
> image but retains the epi geometry? I actually don't care so
much
> about the epi-anat registration, but what I would like to be
able
> to do is motion correct and otherwise preprocess my timeserieses
> within session* and then move different sessions into a common
> volumetric space for analysis. As I have great faith in
> bbregister, ideally the transformation would be determined with
> this method (I suspect it is superior to picking a slice
from one
> of the sessions to use as a motion correction target across all
> sessions). Additionally, I would prefer not to upsample the
source
> voxels either into 1x1x1 anatomical geometry or to surface
> vertices. Unfortunately, my affine understanding isn't deep
enough
> for me to figure this out myself.
>
> Does that make sense, and (if so) do you have any ideas?
>
> Thanks!
> Michael
>
> * Here i use "session" in the sense of "run", which is
different I
> think from FSFast terminology so apologies for any confusion.
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
<mailto:Freesurfer@nmr.mgh.harvard.edu><mailto:Freesurfer@nmr.mgh.harvard.edu>
<mailto: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 mailing list
> Freesurfer@nmr.mgh.harvard.edugreve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
--
Douglas N. Greve, Ph.D.
MGH-NMR Center
Phone Number: 617-724-2358 <tel:617-724-2358>
Fax: 617-726-7422 <tel:617-726-7422>
Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
<http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
<http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
--
Douglas N. Greve, Ph.D.
MGH-NMR Center
greve@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 Fax: 617-726-7422
Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
_______________________________________________
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.