Re: [Freesurfer] functional to anatomical registration question

2021-04-05 Thread Douglas N. Greve

You can add --aparc+aseg (hit 'c' to toggle on and off), alternatively
You can use tkregsiterfv (same command arguments) but add -aparc+aseg 
-seg-outline

You will need to use the lta registration file (not the .dat)

On 3/29/2021 6:13 PM, Nasiriavanaki, Zahra wrote:

Dear Freesurferers,

I have a question and I appreciate it much if you could please reply.
I need to know how to check *subcortical* functional to anatomical 
registration. I know for checking the cortical registration I can use 
the below command:


tkregister2 --s $subj --mov  template.nii.gz  --surf --reg 
init.register.dof6.dat


Could you please tell me what command should I use to check the 
registration in subcortex?


Thanks
MOna



*Zahra (Mona) Nasiriavanaki, M.D.*
Postdoctoral Research Fellow
Department of Psychiatry
Massachusetts General Hospital
149 13th Street, 149-2615
Boston, MA, USA, 02129


___
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] functional to anatomical registration question

2021-03-29 Thread Nasiriavanaki, Zahra
Dear Freesurferers,

I have a question and I appreciate it much if you could please reply.
I need to know how to check subcortical functional to anatomical registration. 
I know for checking the cortical registration I can use the below command:

tkregister2 --s $subj --mov  template.nii.gz  --surf --reg 
init.register.dof6.dat

Could you please tell me what command should I use to check the registration in 
subcortex?

Thanks
MOna



Zahra (Mona) Nasiriavanaki, M.D.
Postdoctoral Research Fellow
Department of Psychiatry
Massachusetts General Hospital
149 13th Street, 149-2615
Boston, MA, USA, 02129

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] functional to anatomical registration

2017-11-13 Thread Douglas N Greve
Hi David, please post to the list ... answers below


On 11/13/2017 01:48 PM, David Beeler wrote:
> Hi Doug, really helpful thanks!
> So if I want all the motion corrected functional data across runs to be 
> aligned with a downsampled version of my anatomical, is it better to run 
> preproc-sess with -per-session or should I do -per-run and then map each 
> functional to anatomical without resampling using:
> mri_vol2vol --reg register.dof6.lta --mov fmcpr.nii.gz --fstarg \ --o 
> fmcpr.new.vox2ras.nii.gz --no-resample
> and then run selxavg3-sess on the fmcpr.new.vox2ras.nii.gz in each run 
> folder? I've heard motion correction with -per-run is better but I 
> don't understand why... can you explain?
Oh, if you want to do it that way, then you would not use the 
--no-resample (that just changes the geometry in the header). per-run 
registers and resamples to the middle time point, meaning that there is 
generally less interpolation. You should add --fstarg orig.mgz This will 
have it sample into the 1mm orig space. This will create a very 
largefile. If you want to downsample the anat, you can run mri_convert 
--downsample 2 2 2 orig.mgz orig.ds2.mgz and then --fstarg orig.ds2.mgz
> Further, I don't get how selxavg3-sess chooses its input. If I first 
> do preproc-sess with -per-run, do my transformation to downsampled 
> anatomical space (as described above), and then run selxavg3-sess with 
> the -no-preproc flag, what volume will selxavg3-sess use by default? I 
> assume it will search the run folders for fmcpr.nii.gz (because using 
> f.nii.gz would defeat the purpose of doing motion correction in the 
> first place), but is there a flag I could use to tell selxavg3-sess to 
> use my transformed fmcpr.new.vox2ras.nii.gz as input instead? Should I 
> just rename fmcpr.new.vox2ras.nii.gz to fmcpr.nii.gz and then 
> selxavg3-sess will take it automatically?
When you create your analysis, you should put -funcstem fmcpr.new.vox2ras
> Thanks again!
> David
> PS is this the correct way to respond to threads on this mailing list 
> so that the thread is maintained?
> On 11/8/17 5:57 PM, David Beeler wrote:
>
> Hi freesurfer people,
>
> I'm trying to understand preprocessing a little better, especially
> registration of functional data to anatomical space. I am
> currently running everything in the volume, doing motion
> correction per-run and then pooling all the runs in the session
> together for the first level analysis.As far as I can tell,
> running preproc-sess with -per-run takes the rawfunctional data
> (f.nii.gz), pulls out the middle timepoint and calls it
> template.nii.gz, bbregisters func to anat and creates a
> register.dof6.lta file in each of the functional run folders,
> transforms the aparc+aseg from the subject's mri folder and
> binarizes it into a brainmask (brain.nii.gz), and runs mc-afni
> using f.nii.gz as the input vol and template.nii.gz as the
> template vol to create the motion corrected volume (fmcpr.nii.gz).
> Is this correct?
>
> yes
>
> Then when I run selxavg3-sess it somehow mri_converts an
> intermediary motion corrected volume from the mc-afni command
> above (eg /tmp.mc-afni2.20097/outvol.nii.gz) into an
> fmc.nii.gz file in each run folder. Are these fmc.nii.gz's
> supposed to be coregistered between runs? (i.e. if the subject
> moved a bunch between two of the runs, would those two volumes be
> aligned at all?). How do these files work?
>
> Not with -per-run. per-run was designed with the idea that you would 
> beresampling to some common space (eg, surface or mni305 or cvs), and 
> then running sexlavg3-sess on that data. If you want all the 
> fmc.nii.gz to be in the same space, then use -per-session.
>
> At the end I have an analysis directory with my betas, sigmaps,
> etc. What functional volume is everything registered to? Is the
> transform between this functional volume and anatomical space the
> register.dof6.lta file located in the session directory?
>
> Thanks for bearing with me!
> -David
>
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu 
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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 

Re: [Freesurfer] functional to anatomical registration

2017-11-08 Thread Douglas Greve



On 11/8/17 5:57 PM, David Beeler wrote:

Hi freesurfer people,

I'm trying to understand preprocessing a little better, especially 
registration of functional data to anatomical space. I am currently 
running everything in the volume, doing motion correction per-run and 
then pooling all the runs in the session together for the first level 
analysis.


As far as I can tell, running preproc-sess with -per-run takes the raw 
functional data (f.nii.gz), pulls out the middle timepoint and calls 
it template.nii.gz, bbregisters func to anat and creates a 
register.dof6.lta file in each of the functional run folders, 
transforms the aparc+aseg from the subject's mri folder and binarizes 
it into a brainmask (brain.nii.gz), and runs mc-afni using f.nii.gz as 
the input vol and template.nii.gz as the template vol to create the 
motion corrected volume (fmcpr.nii.gz). Is this correct?

yes


Then when I run selxavg3-sess it somehow mri_converts an intermediary 
motion corrected volume from the mc-afni command above (eg 
/tmp.mc-afni2.20097/outvol.nii.gz) into an fmc.nii.gz file in 
each run folder. Are these fmc.nii.gz's supposed to be coregistered 
between runs? (i.e. if the subject moved a bunch between two of the 
runs, would those two volumes be aligned at all?). How do these files 
work?
Not with -per-run. per-run was designed with the idea that you would be 
resampling to some common space (eg, surface or mni305 or cvs), and then 
running sexlavg3-sess on that data. If you want all the fmc.nii.gz to be 
in the same space, then use -per-session.


At the end I have an analysis directory with my betas, sigmaps, etc. 
What functional volume is everything registered to? Is the transform 
between this functional volume and anatomical space the 
register.dof6.lta file located in the session directory?


Thanks for bearing with me!
-David




___
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


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] functional to anatomical registration

2017-11-08 Thread David Beeler
Hi freesurfer people,

I'm trying to understand preprocessing a little better, especially registration 
of functional data to anatomical space. I am currently running everything in 
the volume, doing motion correction per-run and then pooling all the runs in 
the session together for the first level analysis.

As far as I can tell, running preproc-sess with -per-run takes the raw 
functional data (f.nii.gz), pulls out the middle timepoint and calls it 
template.nii.gz, bbregisters func to anat and creates a register.dof6.lta file 
in each of the functional run folders, transforms the aparc+aseg from the 
subject's mri folder and binarizes it into a brainmask (brain.nii.gz), and runs 
mc-afni using f.nii.gz as the input vol and template.nii.gz as the template vol 
to create the motion corrected volume (fmcpr.nii.gz). Is this correct?

Then when I run selxavg3-sess it somehow mri_converts an intermediary motion 
corrected volume from the mc-afni command above (eg 
/tmp.mc-afni2.20097/outvol.nii.gz) into an fmc.nii.gz file in each run 
folder. Are these fmc.nii.gz's supposed to be coregistered between runs? (i.e. 
if the subject moved a bunch between two of the runs, would those two volumes 
be aligned at all?). How do these files work?

At the end I have an analysis directory with my betas, sigmaps, etc. What 
functional volume is everything registered to? Is the transform between this 
functional volume and anatomical space the register.dof6.lta file located in 
the session directory?

Thanks for bearing with me!
-David


___
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.