Re: [Freesurfer] longitudinal FreeSurfer help

2020-03-17 Thread Swati Rane
External Email - Use Caution

This is extremely helpful. Thank you, Kersten.

Swati



From:  on behalf of "Diers, Kersten 
/DZNE" 
Reply-To: Freesurfer support list 
Date: Sunday, March 15, 2020 at 1:23 PM
To: Freesurfer support list 
Subject: Re: [Freesurfer] longitudinal FreeSurfer help


External Email - Use Caution
Hello Swati,

a model with two random effects gives greater flexibility in modeling 
individual variation of the slopes. This is why it is recommended; but it is 
not strictly necessary.

Sorry, I have to correct my response to your step #4 in my previous mail: given 
that you have three groups, it will not be necessary / meaningful to explicitly 
include the grp1 or time*grp1 effects in your model, assuming that group 1 is 
your reference group. In general, one of your groups has to be chosen as a 
reference group, and this group's effects will be modeled by the ‚intercept‘ 
and ’time’ effects, so there is no need to give it additional 
columns/regressors in the design matrix. The other columns in the design matrix 
will model the differences in level and slope between any other group and the 
reference group.

Inclusion of the reference group will also lead to the warning message that you 
mention in your follow-up mail, so removing the regressors should also remove 
the warning.

If you compare the example in the Freesurfer wiki: here, we have four groups 
(1: HC, 2: sMCI, 3: cMCI, 4:AD), but we only have additional regressors for 
groups 2-4 in the model. The HC group is chosen as the reference group.

Regarding your further questions:

The lme_mass_F function has to be run once for each contrast that you want to 
estimate.

Note that there can be, loosely speaking, single-row or multiple-row contrasts. 
Single-row contrasts test a single effect, e.g. difference in slope for group 1 
vs 2. Multi-row contrasts jointly test multiple effects, e.g. differences 
between any pair of multiple groups, and hence are of a more global nature. 
Such an example is also given in the tutorial, where the ‚C‘ matrix has three 
rows.

Generally speaking, your contrast vector (single-row) or matrix (multi-row) 
needs to have as many corresponding entries (in case of vector) or columns (in 
case of matrix) as you have beta coefficients in your model (including the 
intercept). Contrast weights (often -1, 0, or 1) are then used to create linear 
combinations (for example, differences) of the coefficients that you want to 
test.

In the univariate tutorial example, which is a little bit easier to explain, we 
have 14 coefficients, and a three-row contrast matrix: we use it to test for 
any difference between the four groups. In principle, each row of this matrix 
could also be used as a single-row contrast, testing for a specific difference.

Looking at the contrast matrix in detail: row 1 sets coefficient #4 (which is 
sMCI * time) to +1,which gives the difference in slopes between the reference 
group (HC) and the sMCI group. Row 2 sets coefficients #4 to -1 and #6 (which 
is cMCI * time) to +1, which gives the difference in slopes between the sMCI 
and cMCI group. Row 3 sets coefficients #6 to -1 and #8 (which is AD * time) to 
+1, which gives the difference in slopes between the cMCI and AD group.

Best regards,

Kersten


Am 13.03.2020 um 22:40 schrieb Swati Rane 
mailto:srle...@uw.edu>>:

External Email - Use Caution


Also, when I run the lme_mass_fit_EMinit, lme_mass_RgGrow, lme_mass_fit_Rgw,



I get a warning: Matrix is close to singular or badle scaled. Results may be 
inaccurate. RCOND=3e-21/ In 
parallel_function>make_general_channel/channel_general (line 914)

In remoteParallelFunction (line 38).

What could cause this warning? I am afraid my results will not be correct.

Swati

Swati Rane Levendovszky, PhD
Interim Director, Diagnostic Imaging Sciences Center
Assistant Professor, Integrated Brain Imaging Center
Radiology
University of Washington
Box 357115 | AA035 HSB | Seattle, WA 98195
srle...@uw.edu | Ph: 206 543 6159
Web: https://sites.google.com/site/uwswatirane/



From: Swati Rane mailto:srle...@uw.edu>>
Date: Thursday, March 12, 2020 at 10:18 PM
To: Freesurfer support list 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] longitudinal FreeSurfer help

Hi Kersten,

Thanks for the reply. I think I am trying to understand the steps that follow.

Do I have to check whether my model with 2 random effects (intercept and time) 
is better than that with one (intercept)?

For the contrast I am interested in group wise longitudinal cortical thinning. 
And also, if the longitudinal thinning is different between groups.
Given that my X=[intercept time grp1 time*grp1 grp2 time*grp2 grp3 time*grp3 
age@timepoint1 gender]

How do I set up CM? Do I need to run the lme_mass_F multiple time per contrast 
I provide?
Will my CM be
For Longitudinal 

Re: [Freesurfer] format bvalues bvectors tracula

2020-03-17 Thread Bruce Fischl

Hi Renew

please have patience. We are all dealing with a lot. Transitioning to 
working at home and trying to figure out how to be productive and such.


cheers
Bruce

On Tue, 17 Mar 2020, Renew Andrade wrote:

   External Email - Use Caution 


Dear Yendiki Anastasia:

I am replying for second time. I haven’t received an answer about this issue. I 
don’t know if it is silly but I don’t know how to fix it. It is not / slashes 
in this case.___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] format bvalues bvectors tracula

2020-03-17 Thread Renew Andrade
External Email - Use Caution

Dear Yendiki Anastasia:

I am replying for second time. I haven’t received an answer about this issue. I 
don’t know if it is silly but I don’t know how to fix it. It is not / slashes 
in this case. 



dmrirc.IXI
Description: Binary data


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

Re: [Freesurfer] mri_glmfit and mri_glmfit-sim

2020-03-17 Thread Varun Chandran
External Email - Use Caution

Dear FS experts,

I am trying to run the cluster-wise correction by using permutation based
multiple comparison. For this, as you would know, we use: mri_glmfit-sim

In attempt to this, I tried running different options

mri_glmfit --y lh.thickness.AT.10B.mgh --fsgd CT91_AT6.fsgd doss --C
Contrast91.txt --surf fsaverage lh --cortex --glmdir glmdirlh_lat3.glmdir

mri_glmfit-sim --glmdir glmdir${i}_lat3.glmdir --cache 1.3 pos --cwp 0.05
--3spaces

Since, there was recommendations in this forum to use --perm for 1.3, I did
so

mri_glmfit --y lh.thickness.AT.10B.mgh --X design_91subjs.txt --C
Contrast_CT91.txt --surf fsaverage lh --cortex --glmdir
glmdirlh_design.glmdir

mri_glmfit-sim --glmdir glmdir_design.glmdir --perm 1000 1.3 pos --cwp 0.05
--3spaces

However, it is displayed an error message 'design matrix is not
orthogonal', though I used CT91_AT.fsgd and not the design matrix --X
option.

Despite that, I tried again starting from design matrix with the
mri_glmfit, it was ok. For the same I used, --perm for the mri-glmfit-sim.
But, it was a same orthogonalisation error message.

I am also attaching my Group Desscriptor file: .fsgd, design matrix:
GLM_all_Scan_Mim_91subjs.txt and the contrast.txt files for your reference.

It would be great, if anyone could please help sort out this issue. Thanks !

kind regards,
Varun



On Fri, Mar 13, 2020 at 10:40 PM Douglas N. Greve 
wrote:

> It looks like you are using gender as a continuous variable. You should
> set up two classes, one for male one for female. You can then test for the
> AT slope with a contrast of
> 0 0 0 0 0.5 0.5
> you don't need separate pos and neg contrasts
>
> For mri_glmfit-sim, a threshold of 1.3 (p<.05) is way too liberal for the
> MCZ simulation. I would use permutation. See
> https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MultipleComparisonsV6.0Perm
>
> On 3/12/2020 6:30 AM, Varun Chandran wrote:
>
> External Email - Use Caution
> Dear FS experts,
>
> I am looking at the relationship between the cortical thickness and a
> behaviour measure, while controlling for the effects of age and gender. In
> this analysis, I am using CT_AT.fsgd, contrast_pos.txt and a
> contrast_neg.txt.
>
> GroupDescriptorFile 1
> Title Autistictraits
> Class AT
> Variables Age Gender   AT
>
> Input   Con_P001   AT   -4.142-0.42821
> Input   Con_P002   AT   -8.142-0.42831
>
> My separate two contrast files:
>
> Contrast_pos.txt  0  0   0 1
>
> Contrast_neg.txt  0  0   0 -1
>
> mri_glmfit --y lh.thickness.AT.10B.mgh --fsgd CT91_4.fsgd doss --C
> Contrast91_pos.txt --surf fsaverage lh --cortex --glmdir
> glmdirlhposlat.glmdir
>
> mri_glmfit --y lh.thickness.AT.10B.mgh --fsgd CT91_4.fsgd doss --C
> Contrast91_neg.txt --surf fsaverage lh --cortex --glmdir
> glmdirlhneglat.glmdir
>
> mri_glmfit-sim --glmdir glmdirlhposlat.glmdir --cache 1.3 pos --cwp 0.05
>
> mri_glmfit-sim --glmdir glmdirlhneglat.glmdir --cache 1.3 neg --cwp 0.05
>
> By changing the commands appropriately, I am looking at the right
> hemisphere too.
>
> Can anyone please help me to clarify, if I am applying the command lines
> correctly? Any sort of help would be very much appreciated. Thanks !
>
> best,
> Varun Arunachalam Chandran
> PhD scholar (Neurosciences)
>
> *School of Psychology and Clinical Language Sciences,  University of
> Reading, Harry Pitt Building, *
> *Whiteknights campus, Reading-RG6 7BE,*
> *Berkshire, United Kingdom.*
>
>
>
>
>
>
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://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
1.00e+002.10e+01-4.142000e+00   -4.28e-01   
1.00e+003.10e+01-8.142000e+00   -4.28e-01   
1.00e+002.00e+01-6.142000e+00   5.72e-01
1.00e+001.90e+01-8.142000e+00   -4.28e-01   
1.00e+001.10e+01-5.142000e+00   -4.28e-01   
1.00e+001.10e+01-3.142000e+00   -4.28e-01   
1.00e+003.00e+00-5.142000e+00   5.72e-01
1.00e+009.00e+00-6.142000e+00   -4.28e-01   
1.00e+003.30e+01-1.142000e+00   5.72e-01
1.00e+001.10e+01-1.014200e+01   -4.28e-01   
1.00e+007.00e+00-5.142000e+00   -4.28e-01   
1.00e+001.70e+01-7.142000e+00   -4.28e-01   
1.00e+001.30e+01-8.142000e+00   5.72e-01
1.00e+002.10e+01-8.142000e+00   5.72e-01
1.00e+002.90e+01-4.142000e+00   5.72e-01
1.00e+001.50e+01-9.142000e+00   5.72e-01
1.00e+004.00e+00  

[Freesurfer] cortical area and volume calculation method

2020-03-17 Thread Ting Li
External Email - Use Caution

Dear Freesurfer Experts,

Where I can find any document that explaining how the cortical area and volume 
were calculated? or Could you give me an introduction about it. 

Thank you so much!

Best regards,
Ting

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


Re: [Freesurfer] overlay threshold in freeview

2020-03-17 Thread Ruopeng Wang
Hi Rachele,

The automatic threshold setting of overlay in freeview was meant to just 
quickly set an initial value for user to see. As I check the code, the high 
threshold is set as the maximum value, the low is set simply as the mid point 
between min and max values. It wasn’t meant to be optimal but I think it can 
definitely be improved. I will update it to 50th percentile in the development 
version.

Best,
Ruopeng

> On Mar 17, 2020, at 4:27 AM, Rachele Sanfelici  wrote:
> 
> External Email - Use Caution
> 
> 
> Dear Freesurfer experts,
> 
> Sorry for catching up so late, you can imagine the situation here in Europe..
> 
> Thank you Ruopeng for your answer! What I’m trying to figure out, though, is 
> how Freeview automatically sets the threshold for overlays, not how to set it 
> myself.
> I tried several combinations with my data (median, mean, 50th percentile), 
> but none gives me the same result as the freeview automatic threshold. Could 
> you please give me more information or a reference? Are you e.g. excluding 
> the highest values (to avoid outliers) or truncating the values after e.g. 8 
> numbers after comma? 
> 
> Thank you again!
> 
> 
>> Il giorno 10 mar 2020, alle ore 16:44, Ruopeng Wang 
>> mailto:rpw...@nmr.mgh.harvard.edu>> ha scritto:
>> 
>> HI Rachele,
>> 
>> You can set overlay threshold from the command-line like this:
>> 
>> freeview -f lh.inflated:overlay=overlay_file:overlay_threshold=low,high 
>> 
>> More information about threshold setting can be found by:
>> 
>> freeview -h
>> 
>> Best,
>> Ruopeng
>> 
>> On 3/10/20 11:29 AM, Rachele Sanfelici wrote:
>>> External Email - Use Caution
>>> 
>>> Dear Freesurfer experts,
>>> 
>>> I created .mgh files from a dimensionality reduction analyses (similar to 
>>> parcels from a known parcellation). These matrices have low values near to 
>>> 0. When I overlay each of the .mgh file in freeview, it gets automatically 
>>> thresholded with what seemed to me the median or mean of all the vertices' 
>>> values (i.e., when looking at the "configure overlay" option)--however, 
>>> this is not the case. 
>>> Thus, I wanted to ask how the threshold is precisely set, so that I can 
>>> automate and incorporate it in other scripts for binarizing my matrices.
>>> 
>>> Thanks a lot in advance for your help,
>>> Rachele
>>> 
>>> 
>>> ___
>>> 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
> 
> Rachele Sanfelici, Psychologin 
> PRONIA Früherkennungsambulanz („Personalized
> Prognostic Tools for Early Psychosis Management“)
>  
> Klinik und Poliklinik für Psychiatrie und Psychotherapie
> Ludwig-Maximilians-Universität München
> Nußbaumstr. 7, 80336 München
> Tel.: +49 (0)89/4400- 52731
> Homepage:http://pronia.eu ​​
> 
> ___
> 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] training set

2020-03-17 Thread javier quilis
External Email - Use Caution

Hello everyone,

I'm trying to do a study of a comparison between the automated methods to 
analyze structural MRI from FSL and Freesurfer. I am interested in the training 
set used by Freesurfer to do the brain segmentation and I can not find a 
detailed description of it. Is there any source where this set is described?

Thanks in advance.
Bests,
Javier Quilis
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] overlay threshold in freeview

2020-03-17 Thread Rachele Sanfelici
External Email - Use Caution

Dear Freesurfer experts,

Sorry for catching up so late, you can imagine the situation here in Europe..

Thank you Ruopeng for your answer! What I’m trying to figure out, though, is 
how Freeview automatically sets the threshold for overlays, not how to set it 
myself.
I tried several combinations with my data (median, mean, 50th percentile), but 
none gives me the same result as the freeview automatic threshold. Could you 
please give me more information or a reference? Are you e.g. excluding the 
highest values (to avoid outliers) or truncating the values after e.g. 8 
numbers after comma? 

Thank you again!


> Il giorno 10 mar 2020, alle ore 16:44, Ruopeng Wang 
>  ha scritto:
> 
> HI Rachele,
> 
> You can set overlay threshold from the command-line like this:
> 
> freeview -f lh.inflated:overlay=overlay_file:overlay_threshold=low,high 
> 
> More information about threshold setting can be found by:
> 
> freeview -h
> 
> Best,
> Ruopeng
> 
> On 3/10/20 11:29 AM, Rachele Sanfelici wrote:
>> External Email - Use Caution
>> 
>> Dear Freesurfer experts,
>> 
>> I created .mgh files from a dimensionality reduction analyses (similar to 
>> parcels from a known parcellation). These matrices have low values near to 
>> 0. When I overlay each of the .mgh file in freeview, it gets automatically 
>> thresholded with what seemed to me the median or mean of all the vertices' 
>> values (i.e., when looking at the "configure overlay" option)--however, this 
>> is not the case. 
>> Thus, I wanted to ask how the threshold is precisely set, so that I can 
>> automate and incorporate it in other scripts for binarizing my matrices.
>> 
>> Thanks a lot in advance for your help,
>> Rachele
>> 
>> 
>> ___
>> 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

Rachele Sanfelici, Psychologin 
PRONIA Früherkennungsambulanz („Personalized
Prognostic Tools for Early Psychosis Management“)
 
Klinik und Poliklinik für Psychiatrie und Psychotherapie
Ludwig-Maximilians-Universität München
Nußbaumstr. 7, 80336 München
Tel.: +49 (0)89/4400- 52731
Homepage:http://pronia.eu​​

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