[Freesurfer] Demeaning in DODS and correlation

2016-12-21 Thread Jennifer Szeto
Hi Freesurfer experts,


I am trying to look at differences in cortical thickness between the following 
three groups : (1) MCI, (2) AD, and (3) control group using mri_glmfit (DODS), 
and want to control for age (continuous) and gender (categorical).


I have read some other posts on the topic of demeaning age (i.e. subtracting 
each participant's age from the entire sample's mean age) but I am not sure if 
I will need it/am on the right track so would like to seek some guidance from 
you.


1) In order to decide whether I should demean age when including age as a 
covariate in the fsgd file (i.e. using demeaned age instead of participants' 
'real' age) and control for gender, I should include gender as a categorical 
factor and check if there are any interactions between groups (MCI/AD/Control) 
x gender x age by running the following:


Research question:

Are the three groups different in terms of cortical thickness, when controlling 
for age and gender


Groups:

FemaleMCI

MaleMCI

FemaleAD

MaleAD

FemaleControl

MaleControl


Contrast:

0 0 0 0 0 0 0.5 -0.5 -0.5 0.5 0 0 for group (i.e. MCI versus AD) x gender x age 
interaction

0 0 0 0 0 0 0.5 -0.5 0 0 -0.5 0.5 for group (i.e. MCI versus control) x gender 
x age interaction, and

0 0 0 0 0 0 0 0 0.5 -0.5 -0.5 0.5 for group (i.e. AD versus control) x gender x 
age interaction


If none of these is significant, then re-run the analyses using DODS/fsgd file 
with contrasts of interest e.g.:

0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0 for differences between MCI and AD. However, 
if there's there're any significant interactions, I will have to demean age? Is 
this correct? Or do i have to check for interactions in the first place at all 
given my research question? Also, say if there's a gender effect, how should I 
control for it?


2) On a separate question, if I want to correlate disease groups (MCI/AD) with 
behavioural data such as depression - i.e. to see if cortical thickness in 
MCI/AD is correlated with depression, do i just have to create fsgd files with 
only one group (MCI OR AD) in each file and correlate with depression by 
running contrast [0 1]? Sorry about this silly question, just wanted to double 
check as I am new to freesurfer!


Thanks for your help in advance!


Regards,

Jen




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


Re: [Freesurfer] Fwd: Registering ASL-CBF maps to fsaverage

2016-12-21 Thread neuroimage analyst
Thank you!

Regards

--VM

On Wed, Dec 21, 2016 at 10:41 AM, Douglas N Greve  wrote:

>
>
> On 12/21/2016 01:02 PM, neuroimage analyst wrote:
> > Hi, Doug.
> >
> > Thank you for your response.
> >
> > _Step 1: _I think what I want to really do is perform group analysis
> > on my CBF maps that are mapped to cortex after smoothing 10mm . In
> > such a scenario, I have to map the CBF to fsavearge to bring all the
> > subjects in the same space and then smooth them and perform statistics.
> > I think to do this I will do:
> >
> > *a)  bbregister --s T1_data --mov asldata_mc_even_brain.nii.gz --reg
> > mean_asl_to_fs_T1 --bold --init-fsl *
> > *b)  mri_vol2vol --mov perfusion_calib.nii.gz --targ
> > T1_data/mri/T1.mgz --interp nearest --o perfusion_CBF_to_T1.nii.gz
> > --reg register.dat --no-save-reg*
> > *c)  mri_vol2surf --mov perfusion_CBF_to_T1.nii.gz --trgsubject
> > fsaverage --regheader T1_data/ --hemi lh --projfrac 0.5 --interp
> > trilinear --o perfusion_CBF_to_T1_surf_lh.mgh --reg register.dat
> > --noreshape --cortex *
> > *d) mris_fwhm --s fsaverage --hemi lh --fwhm 10 --smooth-only --i
> > perfusion_CBF_to_T1_surf_lh --o
> > perfusion_CBF_to_T1_surf_lh_smooth_10mm --cortex *
> >
> I would not include the vol2vol. It will  needlessly introduce another
> interpolation. You can just used vol2surf and go straight from the CBF
> space.
> >
> > _Step 2: _Once and if I want any cluster that are different then I
> > want to use the same cluster and extract the CBF maps in the native
> > space of each subject. Here, I have to use mri_surfcluster and
> > mri_segstats. But, I am not sure what to pass here. *.ocn* file has
> > the values in the cluster but my guess is they are in the fsaverage
> > space. How do I get these values in the native space?
> If you want to make stats based on the cluster, I would not go back to
> native space. There will be a dat file that comes out of the clustering
> with the values for each subject (rows) and cluster (cols).
> >
> > I will again appreciate your response as to whether my steps are right?
> >
> > Thanks
> >
> > Regards
> >
> > --VM
> >
> > On Wed, Dec 21, 2016 at 7:49 AM, Douglas Greve
> > > wrote:
> >
> > Sorry for the delay
> >
> >
> > On 12/21/16 12:15 AM, neuroimage analyst wrote:
> >> Hi,
> >>
> >> I am attaching this message again and I wI'll appreciate if
> >> somebody could kindly comment on the approach.
> >>
> >> Thanks
> >>
> >> Regards
> >>
> >> -VM
> >>
> >> -- Forwarded message --
> >> From: "neuroimage analyst"  >> >
> >> Date: Dec 18, 2016 2:22 PM
> >> Subject: Registering ASL-CBF maps to fsaverage
> >> To: "Freesurfer support list"  >> >
> >> Cc:
> >>
> >> Hi, all.
> >>
> >> I want to register CBF maps derived using pCASL to
> >> freesurfer's surface and derive CBF values in the same
> >> regions where I report my cortical thickness, and volumes.
> >> Hence, I did the following:
> >> 1) bbregister --s T1_data --mov asldata_mc_even_brain.nii.gz
> >> --reg mean_asl_to_fs_T1 --bold --init-fsl
> >>
> >> asldata_mc_even_brain is the mean of the control images
> >>
> >> 2) mri_vol2vol --mov perfusion_calib.nii.gz --targ
> >> T1_data/mri/T1.mgz --interp nearest --o
> >> perfusion_CBF_to_T1.nii.gz --reg register.dat --no-save-reg
> >>
> >> where perfusion_calib is the CBF map in the same space
> >> asldata_mc_even_brain.
> >>
> >> 3) mri_vol2surf --mov perfusion_CBF_to_T1.nii.gz --ref
> >> orig.mgz --regheader T1_data/ --hemi lh --projfrac 0.5
> >> --interp trilinear --o perfusion_CBF_to_T1_surf_gray.mgh
> >> --reg register.dat --noreshape --cortex --surfreg sphere.reg
> >>
> >> Step (3) takes the CBF map to cortical ribbon and hopefully
> >> now I can run mri_segstats and extract CBF values and
> >> thickness + do a group comparison using mri_glmfit. In order
> >> to do the latter, I have to map the perfusion maps to
> >> fsaverage. Can I then simply set --ref to fsaverage in step 3
> >> or what is the correct call to take CBF maps to fsaverage in
> >> (3) ?
> >>
> > No, but you can set --trgsubject fsaverage and it will do what you
> > need. If you want to run mri_segstats to get segmentation
> > statistics, you should run mri_vol2vol to map the CBF to the
> > native anatomical space, then run mri_segstats --seg
> > aparc+aesg.mgz --i cbf-in-anat.nii.gz ... This will give you
> > segstats that are specific to the segmentation of a particular
> > subject; if you use mri_segstats in fsaverage space, then you lose
> > that 

Re: [Freesurfer] Poorly Designed Matrix Two Stage Longitudinal Model

2016-12-21 Thread Douglas N Greve
your 10th column is all 0s


On 12/21/2016 01:26 PM, Timothy Hendrickson wrote:
> Just following up on the message below. I would appreciate a comment on this 
> issue.
>
> -Tim
> FreeSurfer experts,
>
> I am attempting to use the two stage model for longitudinal analysis,
> however I keep receiving an error message that my design matrix is poorly
> scaled.
> I'm curious, I've used the same format of design matrix on cross
> sectional without problem.
> Anyway here is the command line input:
>
>   mri_glmfit --glmdir
> rh.AllSite.gender.group.Age.thickness.fwhm10.twoStage.glmdir \
> --X DOSSDS.twoStage_AllSite_Gender_Group_Age.dat \
> --y rh.testretest.thickness-spc.stack.fwhm10.mgh \
> --C
> DiffDiagnosis_ControlMore_AcctSite_AcctGender_AcctAge_pairedAnalysis.DOSSDS.mtx
> \
> --label rh.testretest.fsaverage.cortex.label \
> --surf fsaverage rh
>
> The error message is attached within file
> error_designMtx_12_19_16.txt
>
> Additionally I've included my analysis script, all timepoint qdec file,
> temporal average qdec file, fsgd file, and design matrix.
> Any help would be extremely beneficial.
>
> -Tim
>
> Timothy Hendrickson
> Department of Psychiatry
> University of Minnesota
> Office: 612-624-6441
> Mobile: 507-259-3434 (texts okay)
> Design matrix --
>   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  
> -1.878;
>   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  
> -2.325;
>   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  
> -1.967;
>   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -0.552   
> 0.000;
>   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000  -0.121   0.000   0.000   
> 0.000;
>   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -0.588   0.000   
> 0.000;
>   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   1.101   
> 0.000;
>   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  
> -2.205;
>   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.775   0.000   0.000   
> 0.000;
>   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   1.316   0.000   0.000   
> 0.000;
>   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -0.590   
> 0.000;
>   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -1.093   0.000   
> 0.000;
>   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -1.880   0.000   
> 0.000;
>   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -2.131   0.000   
> 0.000;
>   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.632   
> 0.000;
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.908   
> 0.000;
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.447   
> 0.000;
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   1.000   0.000   0.000   0.000  -1.635   0.000   
> 0.000;
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   1.000   0.000   0.000   0.000  -0.859   0.000   
> 0.000;
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   1.000   0.000   0.000   0.000  -0.588   0.000   
> 0.000;
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   1.000   0.000   0.000   0.000  -0.858   0.000   
> 0.000;
>   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   
> 0.000
>   0.000   0.000   0.000   

Re: [Freesurfer] Fwd: Registering ASL-CBF maps to fsaverage

2016-12-21 Thread Douglas N Greve


On 12/21/2016 01:02 PM, neuroimage analyst wrote:
> Hi, Doug.
>
> Thank you for your response.
>
> _Step 1: _I think what I want to really do is perform group analysis 
> on my CBF maps that are mapped to cortex after smoothing 10mm . In 
> such a scenario, I have to map the CBF to fsavearge to bring all the 
> subjects in the same space and then smooth them and perform statistics.
> I think to do this I will do:
>
> *a)  bbregister --s T1_data --mov asldata_mc_even_brain.nii.gz --reg 
> mean_asl_to_fs_T1 --bold --init-fsl *
> *b)  mri_vol2vol --mov perfusion_calib.nii.gz --targ 
> T1_data/mri/T1.mgz --interp nearest --o perfusion_CBF_to_T1.nii.gz 
> --reg register.dat --no-save-reg*
> *c)  mri_vol2surf --mov perfusion_CBF_to_T1.nii.gz --trgsubject 
> fsaverage --regheader T1_data/ --hemi lh --projfrac 0.5 --interp 
> trilinear --o perfusion_CBF_to_T1_surf_lh.mgh --reg register.dat 
> --noreshape --cortex *
> *d) mris_fwhm --s fsaverage --hemi lh --fwhm 10 --smooth-only --i 
> perfusion_CBF_to_T1_surf_lh --o 
> perfusion_CBF_to_T1_surf_lh_smooth_10mm --cortex *
>
I would not include the vol2vol. It will  needlessly introduce another 
interpolation. You can just used vol2surf and go straight from the CBF 
space.
>
> _Step 2: _Once and if I want any cluster that are different then I 
> want to use the same cluster and extract the CBF maps in the native 
> space of each subject. Here, I have to use mri_surfcluster and 
> mri_segstats. But, I am not sure what to pass here. *.ocn* file has 
> the values in the cluster but my guess is they are in the fsaverage 
> space. How do I get these values in the native space?
If you want to make stats based on the cluster, I would not go back to 
native space. There will be a dat file that comes out of the clustering 
with the values for each subject (rows) and cluster (cols).
>
> I will again appreciate your response as to whether my steps are right?
>
> Thanks
>
> Regards
>
> --VM
>
> On Wed, Dec 21, 2016 at 7:49 AM, Douglas Greve 
> > wrote:
>
> Sorry for the delay
>
>
> On 12/21/16 12:15 AM, neuroimage analyst wrote:
>> Hi,
>>
>> I am attaching this message again and I wI'll appreciate if
>> somebody could kindly comment on the approach.
>>
>> Thanks
>>
>> Regards
>>
>> -VM
>>
>> -- Forwarded message --
>> From: "neuroimage analyst" > >
>> Date: Dec 18, 2016 2:22 PM
>> Subject: Registering ASL-CBF maps to fsaverage
>> To: "Freesurfer support list" > >
>> Cc:
>>
>> Hi, all.
>>
>> I want to register CBF maps derived using pCASL to
>> freesurfer's surface and derive CBF values in the same
>> regions where I report my cortical thickness, and volumes.
>> Hence, I did the following:
>> 1) bbregister --s T1_data --mov asldata_mc_even_brain.nii.gz
>> --reg mean_asl_to_fs_T1 --bold --init-fsl
>>
>> asldata_mc_even_brain is the mean of the control images
>>
>> 2) mri_vol2vol --mov perfusion_calib.nii.gz --targ
>> T1_data/mri/T1.mgz --interp nearest --o
>> perfusion_CBF_to_T1.nii.gz --reg register.dat --no-save-reg
>>
>> where perfusion_calib is the CBF map in the same space
>> asldata_mc_even_brain.
>>
>> 3) mri_vol2surf --mov perfusion_CBF_to_T1.nii.gz --ref
>> orig.mgz --regheader T1_data/ --hemi lh --projfrac 0.5
>> --interp trilinear --o perfusion_CBF_to_T1_surf_gray.mgh
>> --reg register.dat --noreshape --cortex --surfreg sphere.reg
>>
>> Step (3) takes the CBF map to cortical ribbon and hopefully
>> now I can run mri_segstats and extract CBF values and
>> thickness + do a group comparison using mri_glmfit. In order
>> to do the latter, I have to map the perfusion maps to
>> fsaverage. Can I then simply set --ref to fsaverage in step 3
>> or what is the correct call to take CBF maps to fsaverage in
>> (3) ?
>>
> No, but you can set --trgsubject fsaverage and it will do what you
> need. If you want to run mri_segstats to get segmentation
> statistics, you should run mri_vol2vol to map the CBF to the
> native anatomical space, then run mri_segstats --seg
> aparc+aesg.mgz --i cbf-in-anat.nii.gz ... This will give you
> segstats that are specific to the segmentation of a particular 
> subject; if you use mri_segstats in fsaverage space, then you lose
> that specificity (not sure if it really matters). You can use
> asegstats2table to merge the segstats from different subjects
> together into one file, then use mri_glmfit --table to get the stats.
>>
>>
>> Second, Do i have to pass --surf argument pial or white in
>> step 3? What is the correct way to do 

[Freesurfer] Poorly Designed Matrix Two Stage Longitudinal Model

2016-12-21 Thread Timothy Hendrickson
Just following up on the message below. I would appreciate a comment
on this issue.

-Tim


FreeSurfer experts,

I am attempting to use the two stage model for longitudinal analysis,
however I keep receiving an error message that my design matrix is poorly
scaled.
I'm curious, I've used the same format of design matrix on cross
sectional without problem.

Anyway here is the command line input:

 mri_glmfit --glmdir
rh.AllSite.gender.group.Age.thickness.fwhm10.twoStage.glmdir \
--X DOSSDS.twoStage_AllSite_Gender_Group_Age.dat \
--y rh.testretest.thickness-spc.stack.fwhm10.mgh \
--C
DiffDiagnosis_ControlMore_AcctSite_AcctGender_AcctAge_pairedAnalysis.DOSSDS.mtx
\
--label rh.testretest.fsaverage.cortex.label \
--surf fsaverage rh

The error message is attached within file
error_designMtx_12_19_16.txt

Additionally I've included my analysis script, all timepoint qdec file,
temporal average qdec file, fsgd file, and design matrix.
Any help would be extremely beneficial.

-Tim

Timothy Hendrickson
Department of Psychiatry
University of Minnesota
Office: 612-624-6441
Mobile: 507-259-3434 (texts okay)

Design matrix --
 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -1.878;
 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -2.325;
 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -1.967;
 0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -0.552   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000  -0.121   0.000   0.000   0.000;
 0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000  -0.588   0.000   0.000;
 0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   1.101   0.000;
 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -2.205;
 1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.775   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   1.316   0.000   0.000   0.000;
 0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000  -0.590   0.000;
 0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000  -1.093   0.000   0.000;
 0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000  -1.880   0.000   0.000;
 0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000  -2.131   0.000   0.000;
 0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.632   0.000;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.908   0.000;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.447   0.000;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   1.000   0.000   0.000   0.000  -1.635   0.000   0.000;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   1.000   0.000   0.000   0.000  -0.859   0.000   0.000;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   1.000   0.000   0.000   0.000  -0.588   0.000   0.000;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   1.000   0.000   0.000   0.000  -0.858   0.000   0.000;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000  -0.051;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   1.000   0.000   0.000   0.000  -1.641   0.000   0.000   0.000;
 0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
 0.000   0.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.217;
 0.000   0.000   0.000   0.000   

Re: [Freesurfer] Fwd: Registering ASL-CBF maps to fsaverage

2016-12-21 Thread neuroimage analyst
Hi, Doug.

Thank you for your response.

*Step 1: *I think what I want to really do is perform group analysis on my
CBF maps that are mapped to cortex after smoothing 10mm . In such a
scenario, I have to map the CBF to fsavearge to bring all the subjects in
the same space and then smooth them and perform statistics.
I think to do this I will do:

*a)  bbregister --s T1_data --mov asldata_mc_even_brain.nii.gz --reg
mean_asl_to_fs_T1 --bold --init-fsl *
*b)  mri_vol2vol --mov perfusion_calib.nii.gz --targ T1_data/mri/T1.mgz
--interp nearest --o perfusion_CBF_to_T1.nii.gz --reg register.dat
--no-save-reg*
*c)  mri_vol2surf --mov perfusion_CBF_to_T1.nii.gz --trgsubject fsaverage
--regheader T1_data/ --hemi lh --projfrac 0.5 --interp trilinear --o
perfusion_CBF_to_T1_surf_lh.mgh --reg register.dat --noreshape --cortex *
*d) mris_fwhm --s fsaverage --hemi lh --fwhm 10 --smooth-only --i
perfusion_CBF_to_T1_surf_lh --o perfusion_CBF_to_T1_surf_lh_smooth_10mm
--cortex  *


*Step 2: *Once and if I want any cluster that are different then I want to
use the same cluster and extract the CBF maps in the native space of each
subject. Here, I have to use mri_surfcluster and mri_segstats. But, I am
not sure what to pass here. *.ocn* file has the values in the cluster but
my guess is they are in the fsaverage space. How do I get these values in
the native space?

I will again appreciate your response as to whether my steps are right?

Thanks

Regards

--VM

On Wed, Dec 21, 2016 at 7:49 AM, Douglas Greve 
wrote:

> Sorry for the delay
>
> On 12/21/16 12:15 AM, neuroimage analyst wrote:
>
> Hi,
>
> I am attaching this message again and I wI'll appreciate if somebody could
> kindly comment on the approach.
>
> Thanks
>
> Regards
>
> -VM
>
> -- Forwarded message --
> From: "neuroimage analyst" 
> Date: Dec 18, 2016 2:22 PM
> Subject: Registering ASL-CBF maps to fsaverage
> To: "Freesurfer support list" 
> Cc:
>
> Hi, all.
>
> I want to register CBF maps derived using pCASL to freesurfer's surface
> and derive CBF values in the same regions where I report my cortical
> thickness, and volumes. Hence, I did the following:
> 1) bbregister --s T1_data --mov asldata_mc_even_brain.nii.gz --reg
> mean_asl_to_fs_T1 --bold --init-fsl
>
> asldata_mc_even_brain is the mean of the control images
>
> 2) mri_vol2vol --mov perfusion_calib.nii.gz --targ T1_data/mri/T1.mgz
> --interp nearest --o perfusion_CBF_to_T1.nii.gz --reg register.dat
> --no-save-reg
>
> where perfusion_calib is the CBF map in the same space
> asldata_mc_even_brain.
>
> 3) mri_vol2surf --mov perfusion_CBF_to_T1.nii.gz --ref orig.mgz
> --regheader T1_data/ --hemi lh --projfrac 0.5 --interp trilinear --o
> perfusion_CBF_to_T1_surf_gray.mgh --reg register.dat --noreshape --cortex
> --surfreg sphere.reg
>
> Step (3) takes the CBF map to cortical ribbon and hopefully now I can run
> mri_segstats and extract CBF values and thickness + do a group comparison
> using mri_glmfit. In order to do the latter, I have to map the perfusion
> maps to fsaverage. Can I then simply set --ref to fsaverage in step 3 or
> what is the correct call to take CBF maps to fsaverage in (3) ?
>
> No, but you can set --trgsubject fsaverage and it will do what you need.
> If you want to run mri_segstats to get segmentation statistics, you should
> run mri_vol2vol to map the CBF to the native anatomical space, then run
> mri_segstats --seg aparc+aesg.mgz --i cbf-in-anat.nii.gz ... This will give
> you segstats that are specific to the segmentation of a particular
> subject; if you use mri_segstats in fsaverage space, then you lose that
> specificity (not sure if it really matters). You can use asegstats2table to
> merge the segstats from different subjects together into one file, then use
> mri_glmfit --table to get the stats.
>
>
> Second, Do i have to pass --surf argument pial or white in step 3? What is
> the correct way to do this?
>
> No, it will use white by default (which is what you want). You don't need
> to set --surfreg either (will use sphere.reg by default)
>
>
> Third, The statistical comparisons on thickness were done using 10 mm
> smoothing using -qcache argumentin recon-all.I want to generate several
> smoothing of CBF maps  (5-25 in steps  of 5 mm) In the call to mri_vol2surf
> I can set --surf-fwhm 5 and my understanding is it will smooth the output
> surface 5 mm. Is that right? or should I call mri_fwhm on the output
> returned from step 3.
>
> You can do it like that. It is a little more computationally efficient to
> do them in separate steps, but probably not a big deal unless you have a
> lot of data.
>
>
> Thank you for your suggestions. I will really appreciate your thoughts.
>
> Regards
> -VM
>
>
>
>
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>

Re: [Freesurfer] Fwd: Registering ASL-CBF maps to fsaverage

2016-12-21 Thread Douglas Greve

Sorry for the delay


On 12/21/16 12:15 AM, neuroimage analyst wrote:

Hi,

I am attaching this message again and I wI'll appreciate if somebody 
could kindly comment on the approach.


Thanks

Regards

-VM

-- Forwarded message --
From: "neuroimage analyst" >

Date: Dec 18, 2016 2:22 PM
Subject: Registering ASL-CBF maps to fsaverage
To: "Freesurfer support list" >

Cc:

Hi, all.

I want to register CBF maps derived using pCASL to freesurfer's
surface and derive CBF values in the same regions where I report
my cortical thickness, and volumes. Hence, I did the following:
1) bbregister --s T1_data --mov asldata_mc_even_brain.nii.gz --reg
mean_asl_to_fs_T1 --bold --init-fsl

asldata_mc_even_brain is the mean of the control images

2) mri_vol2vol --mov perfusion_calib.nii.gz --targ
T1_data/mri/T1.mgz --interp nearest --o perfusion_CBF_to_T1.nii.gz
--reg register.dat --no-save-reg

where perfusion_calib is the CBF map in the same space
asldata_mc_even_brain.

3) mri_vol2surf --mov perfusion_CBF_to_T1.nii.gz --ref orig.mgz
--regheader T1_data/ --hemi lh --projfrac 0.5 --interp trilinear
--o perfusion_CBF_to_T1_surf_gray.mgh --reg register.dat
--noreshape --cortex --surfreg sphere.reg

Step (3) takes the CBF map to cortical ribbon and hopefully now I
can run mri_segstats and extract CBF values and thickness + do a
group comparison using mri_glmfit. In order to do the latter, I
have to map the perfusion maps to fsaverage. Can I then simply set
--ref to fsaverage in step 3 or what is the correct call to take
CBF maps to fsaverage in (3) ?

No, but you can set --trgsubject fsaverage and it will do what you need. 
If you want to run mri_segstats to get segmentation statistics, you 
should run mri_vol2vol to map the CBF to the native anatomical space, 
then run mri_segstats --seg aparc+aesg.mgz --i cbf-in-anat.nii.gz ... 
This will give you segstats that are specific to the segmentation of a 
particular  subject; if you use mri_segstats in fsaverage space, then 
you lose that specificity (not sure if it really matters). You can use 
asegstats2table to merge the segstats from different subjects together 
into one file, then use mri_glmfit --table to get the stats.



Second, Do i have to pass --surf argument pial or white in step 3?
What is the correct way to do this?

No, it will use white by default (which is what you want). You don't 
need to set --surfreg either (will use sphere.reg by default)



Third, The statistical comparisons on thickness were done using 10
mm smoothing using -qcache argumentin recon-all.I want to
generate several smoothing of CBF maps  (5-25 in steps  of 5 mm)
In the call to mri_vol2surf I can set --surf-fwhm 5 and my
understanding is it will smooth the output surface 5 mm. Is that
right? or should I call mri_fwhm on the output returned from step 3.

You can do it like that. It is a little more computationally efficient 
to do them in separate steps, but probably not a big deal unless you 
have a lot of data.



Thank you for your suggestions. I will really appreciate your
thoughts.

Regards
-VM





___
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] Tutorial data problems for dt_recon

2016-12-21 Thread Hao wen
Hello, Freesurfer experts:

I followed the tutorial for FStutorial/diffusion:

https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Diffusion

FsTutorial/Diffusion - Free Surfer 
Wiki
surfer.nmr.mgh.harvard.edu
The purpose of this tutorial is to give you experience with the integration of 
Diffusion Tensor Imaging (DTI) with FreeSurfer. The data were collected at MGH 
as part ...

And i export the variables and run the command dt_recon both on my MAC and 
Ubuntu for the tutorial subject which located in:

TUTORIAL_DIR=$TUTORIAL_DATA/diffusion_tutorial/Diff001

Just to be sure, So I run it on both systems, and I got the same errors:


dt_recon --i 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/orig/6-1.dcm
 --s Diff001 --o 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/dtrecon
INFO: SUBJECTS_DIR is 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_recons
dt_recon logfile
Wed Dec 21 15:13:51 CET 2016
VERSION $Id: dt_recon,v 1.15 2011/01/25 21:53:04 greve Exp $
setenv SUBJECTS_DIR 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_recons
cd /Users/junhao.wen/Hao/tutorial/Freesurfer/diffusion
/Applications/freesurfer/bin/dt_recon --i 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/orig/6-1.dcm
 --s Diff001 --o 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/dtrecon
UMR-COGIM-MP008
junhao.wen
/usr/local/fsl/bin/eddy_correct
ECRefTP 0
#@#---
Converting input
Wed Dec 21 15:13:51 CET 2016
cd /Users/junhao.wen/Hao/tutorial/Freesurfer/diffusion
mri_convert 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/orig/6-1.dcm
 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/dtrecon/dwi.nii
mri_convert 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/orig/6-1.dcm
 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/dtrecon/dwi.nii
$Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $
reading from 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/orig/6-1.dcm...
Getting Series No
INFO: Found 3 files in 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/orig
INFO: Scanning for Series Number 6
Scanning Directory
INFO: found 1 files in series
INFO: loading series header info.

RunNo = 5
WARNING: Run 1 appears to be truncated
  Files Found: 1, Files Expected (lRep+1): 120
FileName 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/orig/6-1.dcm
Identification
NumarisVersyngo MR 2002B 4VA21A
ScannerModel  Sonata
PatientName   anon
Date and time
StudyDate 
StudyTime 110208.00
SeriesTime114533.812000
AcqTime   114020.732488
Acquisition parameters
PulseSeq  ep_b0#0
Protocol  DIFFUSION_HighRes_auto
PhEncDir  COL
EchoNo0
FlipAngle 90
EchoTime  80
InversionTime -1
RepetitionTime8900
PhEncFOV  256
ReadoutFOV256
Image information
RunNo 5
SeriesNo  6
ImageNo   1
NImageRows1024
NImageCols1024
NFrames   1
SliceArraylSize   64
IsMosaic  1
ImgPos958.4660 1120.5343 -85.7814
VolRes  2.   2.   2.
VolDim128  128   64
Vc -0.9981  -0.0596  -0.0171
Vr  0.0588  -0.9972   0.0460
Vs -0.0198   0.0449   0.9988
VolCenter   0.   0.   0.
TransferSyntaxUID 1.2.840.10008.1.2
INFO: sorting.
INFO: (128 128  64), nframes = 1, ismosaic=1
Numaris Version: syngo MR 2002B 4VA21A  Maj = 4, Min=2, MinMin = 1
Repetition Time = 8900, TR = 8900 ms
PE Dir COL COL
This looks like an MGH DTI volume
MGH DTI SeqPack Info
0 ep_b0#0  0.00 0
bValue = 700
nB0 = 10
nDir = 60
GradFile 
/Applications/freesurfer/diffusion/mgh-dti-seqpack/gradient_mgh_dti60.gdt
FileName 
/Users/junhao.wen/Hao/Dataset/Freesurfer/FS_tutorial_data/diffusion_tutorial/Diff001/orig/6-1.dcm
Identification
NumarisVersyngo MR 2002B 4VA21A
ScannerModel  Sonata
PatientName   anon
Date and time
StudyDate 
StudyTime 110208.00
SeriesTime114533.812000
AcqTime   114020.732488
Acquisition parameters
PulseSeq  ep_b0#0
Protocol  DIFFUSION_HighRes_auto
PhEncDir  COL
EchoNo0
FlipAngle 90
EchoTime  80
InversionTime -1
RepetitionTime8900
PhEncFOV  256
ReadoutFOV256
Image information
RunNo 5
SeriesNo  6
ImageNo   1
NImageRows1024
NImageCols1024
NFrames   1
SliceArraylSize   64
IsMosaic 

Re: [Freesurfer] recon-all -use-gpu instances on a node with multiple GPUs

2016-12-21 Thread basile pinsard
Hi Simone,

I ran into the same issue in the past.
You need to set environment variable CUDA_VISIBLE_DEVICES to only contain
the device you want to submit the recon-all to.
eg. export CUDA_VISIBLE_DEVICES=0 ;recon-all -s ... -i ..
You have to balance yourself between the GPU available.

Basile

On Wed, Dec 21, 2016 at 9:48 AM, simone coscetti  wrote:

> Hello FreeSurfer Developers,
>
> I’m attempting to make some performances evaluation on recon-all using
> GPUs on a node with 4 nVidia K80.
> Submitting different instances of recon-all on 8 different subjects, every
> instance run on the same device (#0), compromising the efficiency of the
> test.
> Is there a way to address different instances on different devices?
> Thank you in advance.
>
> FreeSurfer version: freesurfer-Linux-centos6_x86_
> 64-stable-pub-v5.3.0.tar.gz
> cudawn9:~ # cat /etc/SuSE-release
> SUSE Linux Enterprise Server 11 (x86_64)
> VERSION = 11
> PATCHLEVEL = 4
> cudawn9:~ # uname -a
> Linux cudawn9 3.0.101-63-default #1 SMP Tue Jun 23 16:02:31 UTC 2015
> (4b89d0c) x86_64 x86_64 x86_64 GNU/Linux
>
> Simone
>
>
>
> ___
> 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.
>
>


-- 
Basile Pinsard

*PhD candidate, *
Laboratoire d'Imagerie Biomédicale, UMR S 1146 / UMR 7371, Sorbonne
Universités, UPMC, INSERM, CNRS
*Brain-Cognition-Behaviour Doctoral School **, *ED3C*, *UPMC, Sorbonne
Universités
Biomedical Sciences Doctoral School, Faculty of Medicine, Université de
Montréal
CRIUGM, Université de Montréal
___
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] recon-all -use-gpu instances on a node with multiple GPUs

2016-12-21 Thread simone coscetti
Hello FreeSurfer Developers,

I’m attempting to make some performances evaluation on recon-all using GPUs
on a node with 4 nVidia K80.
Submitting different instances of recon-all on 8 different subjects, every
instance run on the same device (#0), compromising the efficiency of the
test.
Is there a way to address different instances on different devices?
Thank you in advance.

FreeSurfer version: freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0.tar.gz
cudawn9:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 4
cudawn9:~ # uname -a
Linux cudawn9 3.0.101-63-default #1 SMP Tue Jun 23 16:02:31 UTC 2015
(4b89d0c) x86_64 x86_64 x86_64 GNU/Linux

Simone
___
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] (no subject)

2016-12-21 Thread simone coscetti
Hello FreeSurfer Developers,

I’m attempting to make some performances evaluation on recon-all using GPUs
on a node with 4 nVidia K80.
Submitting different instances of recon-all on 8 different subjects, every
instance run on the same device (#0), compromising the efficiency of the
test.
Is there a way to address different instances on different devices?
Thank you in advance.

FreeSurfer version: freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0.tar.gz
cudawn9:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 4
cudawn9:~ # uname -a
Linux cudawn9 3.0.101-63-default #1 SMP Tue Jun 23 16:02:31 UTC 2015
(4b89d0c) x86_64 x86_64 x86_64 GNU/Linux

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