Re: [Freesurfer] DICOM file organization

2022-02-14 Thread Tim Schäfer
External Email - Use Caution

This is typically done *before* running FreeSurfer, and to the best of my 
knowledge, there is no FreeSurfer tool that does it. Also I think there is no 
one way to do it in generak. The names produced depend on your DICOM to NIFTI 
conversion software and can typically be influenced by many different command 
line arguments/settings passed to the software.

We use a bash shell script to run the conversion from DICOM to Nifti (using the 
dcm2niix Software) and then rename the files accordingly, but the script needs 
to be adapted slightly for each new data set.


Tim


--
Dr. Tim Schäfer
Postdoc Computational Neuroimaging
Department of Child and Adolescent Psychiatry, Psychosomatics and Psychotherapy
University Hospital Frankfurt, Goethe University Frankfurt am Main, Germany

> On 02/14/2022 7:53 AM krystaly  wrote:
> 
>  
> External Email - Use Caution
> 
> Dear Freesurfer experts,
> 
> There are a bunch of RAW DICOM files in my dataset.  I recognize that the 
> name of the images begins with Z, i.e. “Z01”, “Z02”… “Z8568”.  After 
> converting them into NIfTI format with mricron, it yields the name in this 
> format: myFolder_MPRAGE_19770703150928_1.nii
> 
> It’s rather inconvenient to have those names and have been stuck on 
> organizing the images in different categories, i.e. T1, T2, M0, FLAIR and 
> PCASL.  I would like to have them named by subject numbers rather than a 
> series of name and digits. For example, T2 DICOM images of a Subject 101 are 
> named 101.nii under a folder called “T2”.
> 
> Could you please advise if there is anyway categorizing the patients’ data 
> into aforementioned categories automatically with Freesurfer?
> 
> You help will be highly appreciated! Thanks.
> 
> Best regards,
> Krystal
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1QEB_FTcj6EbSpYuOrKOSNtDvOkGt82-4DNQltbzE2p12ARmN4AmCAWfnVN4ugAajCuTUNSda0nOSrtyt2zjA7P2g2h9HAP8hGEKpu5DV5qa5U88PsF3Ss8n0VdNzNEPXNDNpPwWKka3rJGqqf3cUyuFo1BI6CmahveK1r-6hohV2UYrEL4x8kXYSQnBwDGEv6lIgtMQ27b5MGC_fDyBIh6NUZb4weeEc5ZdDtWVlnjuxjvtdRW6xfrU1n3Ofp7MVhUm6j_2BIu1CtIQyKKo9uZcZIjm0H4uXidKRI3aqbhUEPg5_jQVyiJXGalVa6J-ekvHx8HKBarMVbYrpRA1LZQ/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer

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

Re: [Freesurfer] using T2 for recon-all

2022-02-14 Thread Douglas N. Greve
You will definitely get systematic differences between using T2 and not, 
so you could have a false positive (or negative) if you are comparing 
those two groups. On the other hand, you probably changed the T1 
protocol a lot between now and 10 years ago, so you are likely to have 
bias either way.


On 2/11/2022 12:53 PM, Eszter Boros wrote:


External Email - Use Caution

Dear FreeSurfer Team,

We have collected T1 and T2 images in our study and running recon-all 
with T2 gives us much better results (it was really good to see it).


Our aim is to compare these structural data (in Group A) to another 
patient group (Group B). The problem is that the data of Group B was 
collected 10 years ago and we did not have a T2 in that study.


I am wondering what would be the best approach? Maybe we should not 
use T2 in Group A because we do not have a T2 in Group B? Or if we do 
the manual corrections correctly in Group B, this should not be a problem?

I am using Freesufer 7.1.1

Thank you for your answer! I greatly appreciate it.

All the best,
Eszter Boros

___
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

Re: [Freesurfer] How to measure correlation using FreeSurfer

2022-02-14 Thread Douglas N. Greve

You can run a group analysis
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis
One of the outputs will be the correlation (along with the sig of the 
correlation)



On 2/13/2022 6:35 PM, Koustav Chatterjee wrote:


External Email - Use Caution

Dear FreeSurfer experts,

I am trying to find the correlation between the regional cortical 
thickness and volume with different clinical measures of a 
neurodegenerative condition. I am using DK atlas to get the cortical 
measures and establish the correlation using SPSS, a statistical 
software.


But, I would like to get FreeSurfer developed images. I would like to 
learn how to get the areas through images (the FreeSurfer pipeline 
generated images showing brain regions associated with clinical 
measures I am interested in).


Looking for your kind help.

Regards,
KC

___
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

Re: [Freesurfer] mri_glmfit error: MatrixMultiplyD(): m2 is null

2022-02-14 Thread Douglas N. Greve

can you send your fsgd file and the Xg.dat file?

On 2/14/2022 1:21 AM, 정현우 wrote:


External Email - Use Caution

Hello FreeSurfer Developers,

I'm attempting to compare cortical surface area among three groups 
while controlling for estimated total intracranial volume (eTIV), as 
described on the Surface Based Group Analysis tutorial (*MailScanner 
has detected a possible fraud attempt from "secure-web.cisco.com" 
claiming to be* 
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysisV6.0 
). 



I ran the following command:

mri_glmfit --y three_group_comparison.area.lh.10.mgh --fsgd 
three_group_comparison.area.fsgd dods --C 
three_group_comparison.area.mtx --surf fsaverage lh --cortex --glmdir 
three_group_comparison.area.lh.glmdir --eres-save


Then I got the following error:

gdfRead(): reading three_group_comparison.area.fsgd
INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done.
Continuous Variable Means (all subjects)
0 eTIV 1.53351e+06 139455
Class Size and Means of each Continuous Variable
1 0 42 1566070.5417
2 1 34 1515147.1360
3 2 15 1483959.5000
INFO: gd2mtx_method is dods
Reading source surface 
/media/sjkim/hd2/subject_data/fsaverage/surf/lh.white

Number of vertices 163842
Number of faces    327680
Total area         65417.00
AvgVtxArea       0.399269
AvgVtxDist       0.721953
StdVtxDist       0.195472

7.2.0
cwd /media/sjkim/hd2/subject_data/glm
cmdline mri_glmfit --y three_group_comparison.area.lh.10.mgh --fsgd 
three_group_comparison.area.fsgd dods --C 
three_group_comparison.area.mtx --surf fsaverage lh --cortex --glmdir 
three_group_comparison.area.lh.glmdir --eres-save

sysname  Linux
hostname sjkim-System-Product-Name
machine  x86_64
user     sjkim
FixVertexAreaFlag = 1
UseMaskWithSmoothing     1
OneSampleGroupMean 0
y  /media/sjkim/hd2/subject_data/glm/three_group_comparison.area.lh.10.mgh
logyflag 0
usedti  0
FSGD three_group_comparison.area.fsgd
labelmask  /media/sjkim/hd2/subject_data/fsaverage/label/lh.cortex.label
maskinv 0
glmdir three_group_comparison.area.lh.glmdir
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating output directory three_group_comparison.area.lh.glmdir
Loading y from 
/media/sjkim/hd2/subject_data/glm/three_group_comparison.area.lh.10.mgh

   ... done reading.
INFO: gd2mtx_method is dods
Saving design matrix to three_group_comparison.area.lh.glmdir/Xg.dat
Computing normalized matrix
Normalized matrix condition is 833.575
Matrix condition is 1e+08
Found 149955 points in label.
Pruning voxels by thr: 1.175494e-38
Found 149953 voxels in mask
Saving mask to three_group_comparison.area.lh.glmdir/mask.mgh
Reshaping mriglm->mask...
search space = 74612.059149
DOF = 85
Starting fit and test
Fit completed in 0.0373833 minutes
Computing spatial AR1 on surface
Residual: ar1mn=0.997826, ar1std=0.000886, gstd=8.674183, fwhm=20.426140
Writing results
  three_group_comparison.area
    maxvox sig=3.0263  F=7.57212  at  index 107440 0 0  seed=1645215319
error: No such file or directory
error: MatrixMultiplyD(): m2 is null
 break 
/home/rd521/space_freesurfer/build/docker_ubuntu18/trunk/rd521-7.2.0/utils/matrix.cpp:596


I used FreeSurfer version 7.2.0 and Ubuntu 20.04.

I've searched the mail archives and similar errors have been reported 
in qdec, but I could not find any specific solution for this problem. 
Do you have any suggestions to solve this problem?


Thank you in advance,

Hyunwoo Jeong

___
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

Re: [Freesurfer] FW: Problems with recon for manually fixed Talairach

2022-02-14 Thread Douglas N. Greve
Yes, I still don't understand. That snippet of code that you point out 
is embedded in an if statement:
  if($DoCleanTal || ! -e $xfm) then
    Copy
  endif

! -e $xfm means that the file must not already exist. So, as long as 
that file exists, it will not copy over it ($DoCleanTal is a special 
flag that you are not using).
So I think I understand what you are doing, but I just don't understand 
why the xfm is changing. One thing you can do is to just change the 
permissions on the file, eg,
chmod a-w talairach.xfm
This will remove write permissions so that the file cannot change.

On 2/14/2022 11:18 AM, Goeckner, Bryna wrote:
>  External Email - Use Caution
>
> Hi Dr. Greve,
>
> Thanks again for your help on this.  I will try to explain things a bit 
> better, but please let me know if you have additional questions.
>
> I used tkregister2 to fix a bad talairach and then tried to redo the 
> recon-all.  Since we had used a few special flags in our recon-all, I tried 
> to repeat those by running this command:
> recon-all -subject $1 \
>  -T2 $2/rawT2.ORIG.nii.gz \
>  -T2pial \
>  -parallel -openmp 12 \
>  -3T \
>  -all
>
> When this was used, the fixed talairach was overwritten.  I believe this is 
> shown by the following line in recon-all.log:cp 
> transforms/talairach.auto.xfm transforms/talairach.xfm
> When I would check the talariach after the recon, the talairach.xfm file 
> would again be the original bad talairach.
>
> In order to avoid this overwrite, I tried running two separate processes 
> (same subject, same fixed talairach): one with -notal-check, and one with 
> -notalairach.  These both preserved the fixed talairach but produced slightly 
> different results (different aparc & aseg values).
> The exact code I used is here:
> #1st process
> recon-all -subject $1 \
>  -T2 $2/rawT2.ORIG.nii.gz \
>  -T2pial \
>  -parallel -openmp 12 \
>  -3T \
>  -all \
>  -notal-check
>
> #2nd process
> recon-all -subject $1 \
>  -T2 $2/rawT2.ORIG.nii.gz \
>  -T2pial \
>  -parallel -openmp 12 \
>  -3T \
>  -all \
>  -notalairach
>
> I am not sure what happens within recon-all to make these two processes 
> generate different values.
>
> Ultimately, what I want to determine is after we fix a talairach, how should 
> we redo the recon to ensure the fixed talairach is being used for all 
> downstream recon-all steps.  Do you have a recommendation about using either 
> -notal-check or -notalairach  (or is there another preferred way to do this)?
>
> Thanks again for your help with this!
>
> Bryna Goeckner (she/her)
> Graduate Student
> Medical College of Wisconsin
> Neuroscience Doctoral Program
>
> -Original Message-
> From: Douglas N. Greve 
> Sent: Sunday, February 13, 2022 4:30 PM
> To: Goeckner, Bryna ; Freesurfer support list 
> 
> Subject: Re: FW: [Freesurfer] Problems with recon for manually fixed Talairach
>
> ATTENTION: This email originated from a sender outside of MCW. Use caution 
> when clicking on links or opening attachments.
> 
>
> I'm a bit puzzled by this. Are you saving the xfm file to talairach.xfm?
> In the log file, it clearly says:
>
> INFO: transforms/talairach.xfm already exists!
> The new transforms/talairach.auto.xfm will not be copied to 
> transforms/talairach.xfm This is done to retain any edits made to 
> transforms/talairach.xfm Add the -clean-tal flag to recon-all to overwrite 
> transforms/talairach.xfm
>
> and there is no command in the log that indicates that it was overwritten, 
> and I cannot replicate this behavior here
>
> On 1/31/2022 10:33 AM, Goeckner, Bryna wrote:
>>   External Email - Use Caution
>>
>> Sorry - Sending these directly since I tried to send these earlier, but they 
>> were blocked by the list-serve.
>>
>> Bryna Goeckner (she/her)
>> Graduate Student
>> Medical College of Wisconsin
>> Neuroscience Doctoral Program
>>
>> -Original Message-
>> From: Goeckner, Bryna
>> Sent: Friday, January 28, 2022 11:36 AM
>> To: freesurfer@nmr.mgh.harvard.edu
>> Subject: Re: [Freesurfer] Problems with recon for manually fixed
>> Talairach
>>
>> I'm attaching the two recon-all.logs. Both were generated for same subject 
>> using the same corrected talairach.xfm file, one with -notal-check and the 
>> other with -notalairach. Please let me know if you have any other questions. 
>> Thanks!
>>
>> Bryna Goeckner (she/her)
>> Graduate Student
>> Medical College of Wisconsin
>> Neuroscience Doctoral Program
>>
>> Subject: Re: [Freesurfer] Problems with recon for manually fixed
>> To: freesurfer@nmr.mgh.harvard.edu
>> Message-ID: <95652ab6-b36a-c708-edd7-b8734c1c7...@mgh.harvard.edu>
>> Content-Type: text/plain; charset=UTF-8; format=flowed
>>
>> Can you send the recon-all.log?
>>
>> On 1/27/2022 9:34 AM, Goeckner, Bryna wrote:
>>>External Email - Use Caution
>>>
>>> We are using FS 7.2
>>>
>>> Bryna Goeckner (she/her)
>>> Graduate S

Re: [Freesurfer] hippocampal segmentation differences pediatric sample

2022-02-14 Thread Douglas N. Greve
I would not expect the different subjects to be the same (they are 
different subjects). I don't know how you'd get them back to native 
space. The opposite of how you normalized them I guess.


On 2/12/2022 8:15 AM, Aleksandra Lecei wrote:


External Email - Use Caution

Hi,

I'm new to this and was wondering if someone could help me out?
I used a T1 preprocessed image (fmriprep), normalized to the NIH 
pediatric cohort 6 (13-18.5 years) template to do recon-all and then 
used the hippocampal segmentation tool v.7.
I have two questions: a) wouldn't one expect the segmentation to be 
the same for different individuals if the normalized T1's are used 
(registration seems to be well aligned to the same space when checked 
in SPM but when looking into the .txt files the volumes are 
different)? and b) (how) do I need to use the -custom-tal-atlas flag 
to get the estimates back to the NIH pediatric atlas (cohort 6) and 
can I make masks from the hippocampal segmentations for ROI analysis 
in other software for this study population?


Thank you!

___
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

Re: [Freesurfer] How to measure correlation using FreeSurfer

2022-02-14 Thread Koustav Chatterjee
External Email - Use Caution

Thanks.
I am afraid since I am working on a single group ( only patient group), can
I run the same?

On Mon, 14 Feb, 2022, 9:51 pm Douglas N. Greve, 
wrote:

> You can run a group analysis
> https://secure-web.cisco.com/1Ff-dG17xkRm3OY5bDYlwFveyhE5l-WyDkWe_cFQyvOPXWqZtusTfsRPvlPr3yJR_a7H0wxgFYw-HsZJFFWr-500I3mRgVJO3GhgT_MzGifPJZXW4OVwN0rpx8Mi51yAC41a-Uihdgf0OE_F8EJ1o4oInwE8B6GJjH_Y6fFTZ0QBGnKj2UFByxPmtaXUAu-5-whHQd7ix5RLtWdRXuhRwZAHKyITK2bG_iOoUR7UBm5dK0M2bP4LV6x92HJGYCw_oJGhpL8tvMhl8UeAmtCU9deV3FLuLoTBkSvHw0-5NJAAQuiJYK1gyeuU3norr7mIYPeZ6qkyiBP0topWayXXHTg/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis
> One of the outputs will be the correlation (along with the sig of the
> correlation)
>
>
> On 2/13/2022 6:35 PM, Koustav Chatterjee wrote:
>
> External Email - Use Caution
> Dear FreeSurfer experts,
>
> I am trying to find the correlation between the regional cortical
> thickness and volume with different clinical measures of a
> neurodegenerative condition. I am using DK atlas to get the cortical
> measures and establish the correlation using SPSS, a statistical software.
>
> But, I would like to get FreeSurfer developed images. I would like to
> learn how to get the areas through images (the FreeSurfer pipeline
> generated images showing brain regions associated with clinical measures I
> am interested in).
>
> Looking for your kind help.
>
> Regards,
> KC
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1vmI2rQNZhXFW1eSQ50tThABmAXKnIkegT3FEjChe5oy0YfRN9qSvq1heX8tLBV6_YgS70TxxUk2qDYJEDjZAWbzc44AinVPSYX-IUWAYWzqaCGzgqcfC0yDy5htaDCtbvRqom9zOtJl41o9DNRgBZopDt-twGierCA-LmhditLTvENqU2PjBo6FUnPj8XTc-bPQtcP5wUtiYLLRAAzNcF4JDHhBc8tDmDcQxTDzA3aSiaImM3vs5mdExCyarv21uPkcw-cHN1En21nkax_b2Dxu_lk7mYQWBJE5667jUSJdYWO3NGOTceCuOjDVUJQ63bQ6x1MK99DKRj7BZhK5tog/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] mri_glmfit of surface CBF maps while regressing out cortical thickness

2022-02-14 Thread Dhungana, Asim
OK, I see. How would you recommend correcting for multiple comparisons if the 
perm option does not work with PVR?

Also, are you saying that I should only use the glm.osgm.lh/eres.mgh file as a 
pvr argument? Does this look correct:

mri_glmfit \
--y lh.cbf.fwhm10.mgh \
--fsgd cbf.fsgd \
--pvr glm.osgm.lh/eres.mgh \
--C contrast.ctx \ # where contrast.ctx = "1 -1 0"
--surf fsaverage lh \
--cortex \
--glmdir lh.cbf.fwhm10.glmdir \
--eres-save

Best,
Asim

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Douglas N. Greve 

Sent: Sunday, February 13, 2022 5:29 PM
To: freesurfer@nmr.mgh.harvard.edu 
Subject: Re: [Freesurfer] mri_glmfit of surface CBF maps while regressing out 
cortical thickness

Re: long run  time. Sorry, permutation will not work with PVR.
Re: mean thickness. Use the eres.mgh from you osgm analysis instead of the raw 
thickness map (lh.thickness.fwhm10.mgh)

On 2/8/2022 4:12 PM, Dhungana, Asim wrote:
Dear Freesurfer experts,

I am trying to run a GLM analysis comparing the difference in the cortical CBF 
maps between two groups, but I would like to regress out cortical thickness. I 
read through a post with a similar question 
(https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg65059.html), 
but I am still a little confused and want to confirm the steps of my analysis 
below:

---

1. Compile/smooth CBF data on surface for all subjects.
mris_preproc
--hemi lh \
--projfrac 0.5 \
--target fsaverage \
--o lh.cbf.00.mgh \
--iv subj1/cbf.mgz  subj1/register_pasl.dat \
--iv subj2/cbf.mgz  subj2/register_pasl.dat \
... until subjN

mri_surf2surf \
--hemi lh \
--s fsaverage \
--sval lh.cbf.00.mgh \
--fwhm 10 \
--cortex \
--tval lh.cbf.fwhm10.mgh

2. Compile/smooth thickness data on surface for all subjects.
mris_preproc \
--fsgd cbf.fsgd \
--target fsaverage \
--hemi lh \
--meas thickness \
--out lh.thickness.00.mgh

mri_surf2surf \
--hemi lh \
--s fsaverage \
--sval lh.thickness.00.mgh \
--fwhm 10 \
--cortex \
--tval lh.thickness.fwhm10.mgh

3. GLM fit of CBF maps, including thickness as a regressor.
mri_glmfit \
--y lh.cbf.fwhm10.mgh \
--fsgd cbf.fsgd \
--pvr lh.thickness.fwhm10.mgh \
--C contrast.ctx \ # where contrast.ctx = "1 -1 0"
--surf fsaverage lh \
--cortex \
--glmdir lh.cbf.fwhm10.glmdir \
--eres-save

4. Multiple comparisons correction
mri_glmfit-sim \
--glmdir lh.cbf.fwhm10.glmdir \
--perm 1000 1.3 abs \
--cwp 0.05 \
--2spaces \
--bg 35

---

I am currently having issues with Step 4; it has been over an hour, and it 
seems that the command will not finish executing. It is also not outputting any 
error messages. Whenever I run this analysis using the same parameters but 
without regressing out thickness, this step takes under five minutes on my 
machine and returns appropriate results. It seems like I must be doing 
something wrong, but I'm not sure. Please let me know if there is anything that 
you would change/add above.

Also, I noticed that you recommended regressing out the overall mean thickness 
(which you can obtain through mri_glmfit --surf fsaverage lh --osgm --y 
lh.thickness.fwhm10.mgh --o glm.osgm.lh --eres-save). Is glm.osgm.lh the mean 
stratified by class or the overall mean? If I were to include this in my GLM 
fit, would this be the correct command:

mri_glmfit \
--y lh.cbf.fwhm10.mgh \
--fsgd cbf.fsgd \
--pvr lh.thickness.fwhm10.mgh glm.osgm.lh \
--C contrast.ctx \ # where contrast.ctx = "1 -1 0 0"
--surf fsaverage lh \
--cortex \
--glmdir lh.cbf.fwhm10.glmdir \
--eres-save

Thank you for taking a look at this, let me know if you need any other 
information.

Best,
Asim Dhungana

​Freesurfer version: freesurfer-linux-centos7_x86_64-7.1.0-20200511-813297b



___
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

Re: [Freesurfer] How to measure correlation using FreeSurfer

2022-02-14 Thread Douglas N. Greve
Yes, single group just means a single class in the FSGD file. Then just 
include your clinical measure as a variable in the FSGD


On 2/14/2022 11:39 AM, Koustav Chatterjee wrote:


External Email - Use Caution

Thanks.
I am afraid since I am working on a single group ( only patient 
group), can I run the same?


On Mon, 14 Feb, 2022, 9:51 pm Douglas N. Greve, 
 wrote:


You can run a group analysis
*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis


One of the outputs will be the correlation (along with the sig of
the correlation)


On 2/13/2022 6:35 PM, Koustav Chatterjee wrote:


External Email - Use Caution

Dear FreeSurfer experts,

I am trying to find the correlation between the regional cortical
thickness and volume with different clinical measures of a
neurodegenerative condition. I am using DK atlas to get the
cortical measures and establish the correlation using SPSS, a
statistical software.

But, I would like to get FreeSurfer developed images. I would
like to learn how to get the areas through images (the FreeSurfer
pipeline generated images showing brain regions associated with
clinical measures I am interested in).

Looking for your kind help.

Regards,
KC

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer  



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
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 mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] How to measure correlation using FreeSurfer

2022-02-14 Thread Koustav Chatterjee
External Email - Use Caution

Thanks a lot.




On Mon, Feb 14, 2022 at 10:48 PM Douglas N. Greve 
wrote:

> Yes, single group just means a single class in the FSGD file. Then just
> include your clinical measure as a variable in the FSGD
>
> On 2/14/2022 11:39 AM, Koustav Chatterjee wrote:
>
> External Email - Use Caution
> Thanks.
> I am afraid since I am working on a single group ( only patient group),
> can I run the same?
>
> On Mon, 14 Feb, 2022, 9:51 pm Douglas N. Greve, 
> wrote:
>
>> You can run a group analysis
>> *MailScanner has detected a possible fraud attempt from
>> "secure-web.cisco.com" claiming to be*
>> https://secure-web.cisco.com/1pu85rMIoVS6omz09hQIjJs-MYDKG4N-68rPVzWyxtNPcxBifaCZhtc-dBlbH0aciA_EymTNKJ-VRxI7OatAUvM-aOLvNcEjD904Kb4i-6qD8QMie99uRrsz9L04lHGAxq430VxB1DoPFfCezL_yB64qXntUQhMdFghos64Xcdo4_-AobzYKlMFA6ZSZ0cXCyYSqnTvEHxxGRc99DDqfPV_rAFhkruKx7YT7YL1OI1Vm8f0Mif0jF_ONafiUcP4OixgiGJV5x8FCkvvVpGEe3kxVrXdwOnA9TLSBDO307NBEgzivNZkEwFUz8tzqM6JKdpDJhDyEYK9KMOmCzqzusfw/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis
>> 
>> One of the outputs will be the correlation (along with the sig of the
>> correlation)
>>
>>
>> On 2/13/2022 6:35 PM, Koustav Chatterjee wrote:
>>
>> External Email - Use Caution
>> Dear FreeSurfer experts,
>>
>> I am trying to find the correlation between the regional cortical
>> thickness and volume with different clinical measures of a
>> neurodegenerative condition. I am using DK atlas to get the cortical
>> measures and establish the correlation using SPSS, a statistical software.
>>
>> But, I would like to get FreeSurfer developed images. I would like to
>> learn how to get the areas through images (the FreeSurfer pipeline
>> generated images showing brain regions associated with clinical measures I
>> am interested in).
>>
>> Looking for your kind help.
>>
>> Regards,
>> KC
>>
>> ___
>> Freesurfer mailing listfreesur...@nmr.mgh.harvard.edu*MailScanner has 
>> detected a possible fraud attempt from "secure-web.cisco.com" claiming to 
>> be* 
>> https://secure-web.cisco.com/1ikk1uPuujAL2Sdfx5d3Znrn3UL_leQCnqPByI0OjDLIGdIsPavnP4WRbbUI2pSkhSBEM37mUSzI0S0lXX1SH1AJfThPMbHzGnVacWQXNRQgjyvuL5bQszp5ZdsNl1f4qkNz5yIgEHolncKpqO00qkZX6zTcU4hGY8P9OGBvWuNlyUVdTubO_qBb5oTOUs20MFA8s_R3NZL4zs5axHtTynZd93vF8G20ifLQqUrBDjQ5rabWuZ55zkR4xV-xPkIuAC7-_6NKWw48NXiWBUPWOUt-KihNPhF2yPUY_gf8nP9FAA8EqOEELCtHiN6Jzryb-EOM3QyvEkzNgQJ8nN0qGqA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
>>  
>> 
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> *MailScanner has detected a possible fraud attempt from
>> "secure-web.cisco.com" claiming to be*
>> https://secure-web.cisco.com/1ikk1uPuujAL2Sdfx5d3Znrn3UL_leQCnqPByI0OjDLIGdIsPavnP4WRbbUI2pSkhSBEM37mUSzI0S0lXX1SH1AJfThPMbHzGnVacWQXNRQgjyvuL5bQszp5ZdsNl1f4qkNz5yIgEHolncKpqO00qkZX6zTcU4hGY8P9OGBvWuNlyUVdTubO_qBb5oTOUs20MFA8s_R3NZL4zs5axHtTynZd93vF8G20ifLQqUrBDjQ5rabWuZ55zkR4xV-xPkIuAC7-_6NKWw48NXiWBUPWOUt-KihNPhF2yPUY_gf8nP9FAA8EqOEELCtHiN6Jzryb-EOM3QyvEkzNgQJ8nN0qGqA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
>> 
>
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1ikk1uPuujAL2Sdfx5d3Znrn3UL_leQCnqPByI0OjDLIGdIsPavnP4WRbbUI2pSkhSBEM37mUSzI0S

[Freesurfer] autorecon2-wm not reflecting edits in white matter segmentation (7.1.1, 7.2.0)

2022-02-14 Thread Edan Daniel
External Email - Use Caution

We have been having issues with recreating the final surfaces after editing
the white matter segmentation, which used to work smoothly in version 6.
After running a subject through recon-all (version 7.1.1 *without* the
parallel flag) and then editing the white matter, we run the following
command (w v7.1.1):
recon-all -autorecon2-wm -autorecon3 -subjid ' freesurferfoldername '
-cc-crs ' num2str(corpus_point)

The ribbon file and surfaces do update *very slightly* but it’s largely
ignoring our (sometimes large) edits. This pipeline worked well for us in
version 6- do you have any idea what might be going on?

Would love to hear your thoughts about this.

Many thanks!!
Edan, Braindevlab@Princeton
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] How to find mean LGI?

2022-02-14 Thread Zeng, Victor (BIDMC - Keshavan - Psychiatry)
External Email - Use Caution

Hi, I was hoping to extract mean LGI, similar to how there is a mean thickness. 
But the default LGI output includes the eTIV rather. What would the command be 
to collect the stats into a csv for this mean LGI?

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

Re: [Freesurfer] [External] Re: [External] Re: white matter measurements for labels/annotations

2022-02-14 Thread Zeng, Victor (BIDMC - Keshavan - Psychiatry)
External Email - Use Caution

Is there an argument to put in a custom LUT? I don’t see it in the options for 
mri_surf2volseg. I’m assuming I have to put in average/colortable_vpnl.txt and 
average/colortable_BA.txt

Get Outlook for 
iOS

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Douglas N. Greve 

Sent: Sunday, February 13, 2022 10:42:41 AM
To: freesurfer@nmr.mgh.harvard.edu 
Subject: [External] Re: [Freesurfer] [External] Re: white matter measurements 
for labels/annotations

You'll have to create an annotation first (maybe with mris_label2annot), then 
use mri_surf2volseg to create the segmentation. Look at the command line to 
create wmparc.mgz

On 2/4/2022 10:03 AM, Zeng, Victor (BIDMC - Keshavan - Psychiatry) wrote:

External Email - Use Caution

Yes but instead of DKT regions, it would have brodmann area for example

Get Outlook for 
iOS

From: 
freesurfer-boun...@nmr.mgh.harvard.edu
 

 on behalf of Douglas N. Greve 

Sent: Friday, February 4, 2022 7:10:17 AM
To: freesurfer@nmr.mgh.harvard.edu 

Subject: [External] Re: [Freesurfer] white matter measurements for 
labels/annotations

Do you mean something like wmparc.mgz and wmparc.stats?

On 2/1/2022 1:10 AM, Zeng, Victor (BIDMC - Keshavan - Psychiatry) wrote:

External Email - Use Caution

Hi,

is it possible to extract white matter volume estimations for 
labels/annotations? I am specifically wondering about the brodmann atlas and 
the stanford atlas that is already included in latest FS.

Thanks,

Victor Zeng
Beth Israel Deaconess Medical Center
Keshavan Lab
--



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" 
claiming to be 
https://secure-web.cisco.com/1Rp01kzGVLn07O5GcuVa2j2kYnXjZ68JD9o20Ut20m2rZs9zN0WyhfapFKIph_cWpu_Jy1la_6ZqNtPE5tHEREZjlPjOR0tudhRPn3sJuCnv6-y8m4Bqix8UoA0PYei1I5k1zAaqdtADJFPM1LAU7aDHaIanZTWnav-V1OD4Nk_JxHx7QvO7AJtaQps8mS3ICKBljCR98kFtWt3P80-4gC8TgTbbyE02a0cUjB1Rj150q6-DlPvHwvs_vZe3vpYba9TIPpH9FdeqTu5Rcnl4DyD3cCeckN8lRHXavTeAKIvIhepNeKQxJrGyHSV5pcAAc/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer




___

[Freesurfer] PetSurfer: subcortical volume-based analysis

2022-02-14 Thread Jennifer Bramen
External Email - Use Caution

Dear Freesurfer Developers

I am doing an ROI--based amyloid PET scan analysis. I have completed all of the 
steps from the PetSurfer wiki. I now have the preprocessed, averaged, 
resampled, smoothed PET data in MNI305 space which is constrained to the 
subcortical gray matter mask.

How do I extract mean intensity within all of the subcortical ROI?

Thank you!

Warm regards,


Jennifer Bramen, PhD
(she/her/hers)
Senior Research Scientist, Neuroimaging
Assistant Professor
Pacific Brain Health Center | Pacific Neuroscience Institute & Foundation | 
Providence Saint John's Health Center
1301 20th St. #150 Santa Monica, CA 90404
Phone: 310-525-0865  | Fax: 310-315-4069


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

[Freesurfer] PetSurfer: CORTICAL volume-based analysis

2022-02-14 Thread Jennifer Bramen
External Email - Use Caution

Dear Freesurfer Developers

I am doing an ROI--based amyloid PET scan analysis. I am following the steps 
from the PetSurfer wiki. I see instructions for how to do a cortical 
surface-based group analysis. I also see how to do a subcortical ROI-based 
analysis. However, I cannot find detailed instructions for performing a 
cortical ROI-based analysis.



This is how I think I should adapt the instructions from your subcortical 
ROI-based analysis instructions for cortical gray matter:

mri_vol2vol --mov $PET_DIR/$ID/gtmpvc.output/mgx.gm.nii.gz --reg 
$PET_DIR/$ID/gtmpvc.output/aux/bbpet2anat.lta --tal --talres 2 --o 
$PET_DIR/$ID/gtmpvc.output/gm.mni305.2mm.sm00.nii.gz

mri_fwhm --smooth-only --i $PET_DIR/$ID/gtmpvc.output/gm.mni305.2mm.sm00.nii.gz 
--fwhm 5 --o $PET_DIR/$ID/gtmpvc.output/gm.mni305.2mm.sm05.nii.gz --mask 
$FREESURFER_HOME/subjects/fsaverage/mri.2mm/brainmask.mgz


Can someone confirm or correct these commands? I am especially concerned that I 
have selected the wrong mask.


Thanks you!
Warm regards,


Jennifer Bramen, PhD
(she/her/hers)
Senior Research Scientist, Neuroimaging
Assistant Professor
Pacific Brain Health Center | Pacific Neuroscience Institute & Foundation | 
Providence Saint John's Health Center



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

Re: [Freesurfer] mri_glmfit error: MatrixMultiplyD(): m2 is null

2022-02-14 Thread 정현우
External Email - Use Caution

Hi Dr. Greve,

Thank you for your reply. I attached the fsgd file, mtx file and the Xg.dat
file below.

Hyunwoo Jeong

2022년 2월 15일 (화) 오전 1:21, Douglas N. Greve 님이 작성:

> can you send your fsgd file and the Xg.dat file?
>
> On 2/14/2022 1:21 AM, 정현우 wrote:
>
> External Email - Use Caution
> Hello FreeSurfer Developers,
>
> I'm attempting to compare cortical surface area among three groups while
> controlling for estimated total intracranial volume (eTIV), as described on
> the Surface Based Group Analysis tutorial (*MailScanner has detected a
> possible fraud attempt from "secure-web.cisco.com" claiming to be*
> https://secure-web.cisco.com/1czZRw3EoQx6OvftUtPfBxAe8r0M8EZljAEkQmJk1CUdUwVeyBC5XdwccaJukFkj11JSC3rz-4tyXamEaWMTikD43VqkZe3Wrpy-2GcwBeX2w_joRuTh_pbh5A5mpTSm2j-x1w5OnT9UY_mkXIIOrJObGDmx0C3NRfDh2N3WRW5UwYjk4UgXaNQDG52Un3_RjntVjT1IgSdJRooVPNfxqzm-aRfuT9iwwhxdFzZD3CU2Z2f_TJV5cZgVMhPQI9bGBhj7MVsTTD8CBN35Qd_bdwcqODbZc2HEENCLIta0xByr_8Zqrw-0pSBCFAebnlHKWHZwCwHNFmTYrBc6YKuv59g/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysisV6.0
> 
> ).
>
> I ran the following command:
>
> mri_glmfit --y three_group_comparison.area.lh.10.mgh --fsgd
> three_group_comparison.area.fsgd dods --C three_group_comparison.area.mtx
> --surf fsaverage lh --cortex --glmdir three_group_comparison.area.lh.glmdir
> --eres-save
>
> Then I got the following error:
>
> gdfRead(): reading three_group_comparison.area.fsgd
> INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done.
> Continuous Variable Means (all subjects)
> 0 eTIV 1.53351e+06 139455
> Class Size and Means of each Continuous Variable
> 1 0 42 1566070.5417
> 2 1 34 1515147.1360
> 3 2 15 1483959.5000
> INFO: gd2mtx_method is dods
> Reading source surface
> /media/sjkim/hd2/subject_data/fsaverage/surf/lh.white
> Number of vertices 163842
> Number of faces327680
> Total area 65417.00
> AvgVtxArea   0.399269
> AvgVtxDist   0.721953
> StdVtxDist   0.195472
>
> 7.2.0
> cwd /media/sjkim/hd2/subject_data/glm
> cmdline mri_glmfit --y three_group_comparison.area.lh.10.mgh --fsgd
> three_group_comparison.area.fsgd dods --C three_group_comparison.area.mtx
> --surf fsaverage lh --cortex --glmdir three_group_comparison.area.lh.glmdir
> --eres-save
> sysname  Linux
> hostname sjkim-System-Product-Name
> machine  x86_64
> user sjkim
> FixVertexAreaFlag = 1
> UseMaskWithSmoothing 1
> OneSampleGroupMean 0
> y
>  /media/sjkim/hd2/subject_data/glm/three_group_comparison.area.lh.10.mgh
> logyflag 0
> usedti  0
> FSGD three_group_comparison.area.fsgd
> labelmask  /media/sjkim/hd2/subject_data/fsaverage/label/lh.cortex.label
> maskinv 0
> glmdir three_group_comparison.area.lh.glmdir
> IllCondOK 0
> ReScaleX 1
> DoFFx 0
> Creating output directory three_group_comparison.area.lh.glmdir
> Loading y from
> /media/sjkim/hd2/subject_data/glm/three_group_comparison.area.lh.10.mgh
>... done reading.
> INFO: gd2mtx_method is dods
> Saving design matrix to three_group_comparison.area.lh.glmdir/Xg.dat
> Computing normalized matrix
> Normalized matrix condition is 833.575
> Matrix condition is 1e+08
> Found 149955 points in label.
> Pruning voxels by thr: 1.175494e-38
> Found 149953 voxels in mask
> Saving mask to three_group_comparison.area.lh.glmdir/mask.mgh
> Reshaping mriglm->mask...
> search space = 74612.059149
> DOF = 85
> Starting fit and test
> Fit completed in 0.0373833 minutes
> Computing spatial AR1 on surface
> Residual: ar1mn=0.997826, ar1std=0.000886, gstd=8.674183, fwhm=20.426140
> Writing results
>   three_group_comparison.area
> maxvox sig=3.0263  F=7.57212  at  index 107440 0 0seed=1645215319
> error: No such file or directory
> error: MatrixMultiplyD(): m2 is null
>  break
> /home/rd521/space_freesurfer/build/docker_ubuntu18/trunk/rd521-7.2.0/utils/matrix.cpp:596
>
> I used FreeSurfer version 7.2.0 and Ubuntu 20.04.
>
> I've searched the mail archives and similar errors have been reported in
> qdec, but I could not find any specific solution for this problem. Do you
> have any suggestions to solve this problem?
>
> Thank you in advance,
>
> Hyunwoo Jeong
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1e2hDU-pnYJe1fZTYbCeBlfK68223y1O5DfBiwonrp

Re: [Freesurfer] Virtualbox: developer's password

2022-02-14 Thread fsbuild
External Email - Use Caution

Sending the info to your email shortly.
-  R.

On Feb 13, 2022, at 04:56, Francois Leroy  
wrote:External Email - Use 
CautionHi,I am trying to set-up 
Freesurfer (fs_ubuntu_18_04_06) from Oracle VM Virtualbox. Could you send 
me the developer's password useful for login?Thanks for your 
helpRegardsFrancois___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

Re: [Freesurfer] using T2 for recon-all

2022-02-14 Thread Eszter Boros
External Email - Use Caution

Thank you. This is very helpful.
And just a follow-up question about this:
Can we use data that old? (And make a comparison to images collected this
year).
I mean is it possible to compare structural scans which were acquired such
a long time ago and with a different scanner using Freesurfer? (e.g.,
measuring cortical thickness)

All the best,
Eszter Boros

Douglas N. Greve  ezt írta (időpont: 2022. febr.
14., H, 10:48):

> You will definitely get systematic differences between using T2 and not,
> so you could have a false positive (or negative) if you are comparing those
> two groups. On the other hand, you probably changed the T1 protocol a lot
> between now and 10 years ago, so you are likely to have bias either way.
>
> On 2/11/2022 12:53 PM, Eszter Boros wrote:
>
> External Email - Use Caution
> Dear FreeSurfer Team,
>
> We have collected T1 and T2 images in our study and running recon-all with
> T2 gives us much better results (it was really good to see it).
>
> Our aim is to compare these structural data (in Group A) to another
> patient group (Group B). The problem is that the data of Group B was
> collected 10 years ago and we did not have a T2 in that study.
>
> I am wondering what would be the best approach? Maybe we should not use T2
> in Group A because we do not have a T2 in Group B? Or if we do the manual
> corrections correctly in Group B, this should not be a problem?
> I am using Freesufer 7.1.1
>
> Thank you for your answer! I greatly appreciate it.
>
> All the best,
> Eszter Boros
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1wVcWXiNn37WyoR-pT_kwIeNB_UwOvN3uE9E1Dd3XP-QqzG1VfvbJCorre40tYedgIwMS32IlMTAt9BHUGqEv9IQPXXlqL3UU47mruB64O6IcdQ58GGunJ52Oz-phlyvJLdiur1H84UxeHSnyk-zTSLYxb5Edck9henxFtj2Unjk7CQolTzoGW5DRtiaFHzvXy85NS8AbPZfgsLlhz2078w8SXAPIYJsCjG2TNl2y7ngYLDybCK42c-SVg32jvk4kRBLTVXgAEkpd3N10M9LmTav07VlJa9AV_jzYFMotyLHw6W1FGlk8Y66gwKWhl6VnVJ3Z8Zc562IoZPE83g6gCw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer