[Freesurfer] global measures of volume bug

2020-01-21 Thread Christian Krog Tamnes
External Email - Use Caution

Dear FS experts,

I came across this post about a bug related to global measures of volume from 
version 6.0:
https://surfer.nmr.mgh.harvard.edu/fswiki/BrainVolStatsFixed

I have two questions that I hope someone can clarify:
1) This bug does not affect measures of cortical thickness or area, or specific 
subcortical volumes, correct?
2) For longitudinally processed data, is it sufficient to run the proposed 
solution (recon-all -s subject -segstats -parcstats -parcstats2 -parcstats3 
-wmparc -balabels) on the longitudinal data, or do we need to first do it on 
the cross-sectionally processed data?

Best regards,
Christian

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

Re: [Freesurfer] Qdec error

2020-01-21 Thread vittal korann
External Email - Use Caution

Dear Douglas

I did normalize ICV values. This is something else I guess.

With regards
Vittal



On Tue, Jan 21, 2020 at 6:09 PM vittal korann 
wrote:

> Dear FreeSurfer experts
>
> I ran QDEC and got the following error.
>
> Design matrix --
>  1.0   1.04000  -1.38574   2.0   29.0   19.0;
>  1.0   1.04000  -0.55066   2.0   35.0   19.0;
>  1.0   1.03000   2.31721   2.0   23.0   14.0;
>  1.0   1.03000  -0.22919   2.0   23.0   16.0;
>  1.0   1.03000  -2.69688  -2.0   28.0   19.0;
>  1.0   1.01000   0.84981  -2.0   22.0   19.0;
>  1.0   1.01000   0.43845   2.0   36.0   21.0;
>  1.0   1.06000   1.32888   2.0   28.0   17.0;
>  1.0   1.02000   0.52292   2.0   34.0   22.0;
>  1.0   1.02000   0.18104   2.0   32.0   17.0;
>  1.0   1.03000  -0.33783  -2.0   32.0   22.0;
>  1.0   1.04000   0.65805   2.0   30.0   17.0;
>  1.0   1.03000   1.21888   2.0   37.0   10.0;
>  1.0   1.02000   2.11598   2.0   29.0   10.0;
>  1.0   1.02000  -0.02853   2.0   27.0   16.0;
>  1.0   1.04000   0.21777   2.0   36.0   16.0;
>  1.0   1.01000   0.30821   2.0   29.0   15.0;
>  1.0   1.03000  -0.69389   2.0   30.0   12.0;
>  1.0   1.04000   0.44792   2.0   23.0   15.0;
>  1.0   1.03000   0.15876   2.0   28.0   15.0;
>  1.0   1.02000  -1.05796   2.0   36.0   10.0;
>  1.0   1.05000  -1.51878   2.0   32.0   15.0;
>  1.0   1.03000  -0.91870  -2.0   30.0   15.0;
> 
> ERROR: matrix is ill-conditioned or badly scaled, condno = 68200
> 
> Possible problem with experimental design:
> Check for duplicate entries and/or lack of range of
> continuous variables within a class.
> If you seek help with this problem, make sure to send:
>   1. Your command line:
> mri_glmfit.bin --y /usr/local/freesurfer/subjects/qdec/Untitled/y.mgh
> --fsgd /usr/local/freesurfer/subjects/qdec/Untitled/qdec.fsgd dods --glmdir
> /usr/local/freesurfer/subjects/qdec/Untitled --surf fsaverage lh --label
> /usr/local/freesurfer/subjects/fsaverage/label/lh.aparc.label --C
> /usr/local/freesurfer/subjects/qdec/Untitled/contrasts/lh-Avg-Intercept-thickness.mat
> --C
> /usr/local/freesurfer/subjects/qdec/Untitled/contrasts/lh-Avg-thickness-Vein_Avg_tort-Cor.mat
>
>   2. The FSGD file (if using one)
>   3. And the design matrix above
> Attempting to diagnose further
> SumSq: Min=4.795832 (col 1), Max=145.206757 (col 5)
>  The scale is much different between columns 1 and 5, you may want to
>  normalize by subtracting the mean and dividing by the standard deviation.
>
> Any help would be appreciated!
>
> With regards
> Korann
>
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Extract specific LGI and Volume values

2020-01-21 Thread Tien Pham
External Email - Use Caution

Thank you for your e-mail.
I also could not load the label in freeview. The terminal showed the
following error:

2020-01-22 09:56:18.064 Freeview[51338:303] modalSession has been exited
prematurely - check for a reentrant call to endModalSession:

2020-01-22 09:56:26.655 Freeview[51338:303] modalSession has been exited
prematurely - check for a reentrant call to endModalSession:

freadFloat: fread failed

freadFloat: fread failed


This error was still showing like it never end until I close freeview.


 I draw the ROI in qdec, then add selection to ROI , and save the current
label. That was how I created the label.

I am looking forward to hearing from you. Thank you.

On Wed, Jan 22, 2020 at 12:17 AM Greve, Douglas N.,Ph.D. <
dgr...@mgh.harvard.edu> wrote:

> You can try freeview, but there might be something wrong with the label.
> How was it created?
>
> On 1/16/2020 11:51 PM, Tien Pham wrote:
>
> External Email - Use Caution
> Thank you for your help.
> I cannot load the label on surface, this is the error:
>
> [toyama-no-iMac:/applications/freesurfer/subjects] toyama% qdec
>
>
>
> Reading /applications/freesurfer/tktools/tkUtils.tcl
>
>
>
> Using /applications/freesurfer/lib/tcl/fsgdfPlot.tcl
>
> qdec.bin(41334,0xa15971a8) malloc: *** mach_vm_map(size=114944) failed
> (error code=3)
>
> *** error: can't allocate region
>
> *** set a breakpoint in malloc_error_break to debug
>
> MRISalloc(15124178, 76): could not allocate faces
>
> Cannot allocate memory
>
>
> What do you mean how many point? How do I find it?
>
> On Fri, Jan 17, 2020 at 1:17 PM Greve, Douglas N.,Ph.D. <
> dgr...@mgh.harvard.edu> wrote:
>
>> Is the label valid? Can you load it on a surface? How many points are in
>> it?
>>
>> On 1/16/2020 9:51 PM, Tien Pham wrote:
>>
>> External Email - Use Caution
>> Thank you for your e-mail.
>> It seems I got another error. This is what it showed in terminal:
>>
>> [toyama-no-iMac:/applications/freesurfer/subjects] toyama% mri_segstats
>> --i lh.pial_lgi --slabel VC001_1 lh lh.frontoinsula.label --id 1 --sum
>> sum.dat
>>
>>
>>
>> $Id: mri_segstats.c,v 1.75.2.9 2013/02/16 00:09:33 greve Exp $
>>
>> cwd
>>
>> cmdline mri_segstats --i lh.pial_lgi --slabel VC001_1 lh
>> lh.frontoinsula.label --id 1 --sum sum.dat
>>
>> sysname  Darwin
>>
>> hostname toyama-no-iMac.local
>>
>> machine  x86_64
>>
>> user toyama
>>
>> UseRobust  0
>>
>> Constructing seg from label
>>
>> Segmentation fault
>>
>>
>> Could you help me please?
>>
>> On Fri, Jan 17, 2020 at 11:56 AM Greve, Douglas N.,Ph.D. <
>> dgr...@mgh.harvard.edu> wrote:
>>
>>> Sorry, it should have been --sum instead of --o
>>> the subject name is subject_id
>>> --id 1 just means to take the vertices in the label (--id 0 would mean
>>> to take the background)
>>>
>>> On 1/16/2020 7:07 PM, Tien Pham wrote:
>>>
>>> External Email - Use Caution
>>> Thank you very much for your e-mail.
>>> I tried, but this '' --o '' is unknown showing in terminal and the ''
>>> --id '' flag is subject name?
>>> Could you please help me?
>>> For example, I found the change in frontoinsula region between 2 groups
>>> in my dataset and I want to extract the values of this region.
>>>
>>> On Fri, Jan 17, 2020 at 8:30 AM Greve, Douglas N.,Ph.D. <
>>> dgr...@mgh.harvard.edu> wrote:
>>>
 It might be easier to use mri_segstats, eg,

 mri_segstats --i lh.pial_lgi --slabel subject_id lh lh.untitled.label
 --id 1 --o sum.dat

 The mean value will be in the "Mean" column of the sum.dat


 On 1/14/2020 7:08 PM, Tien Pham wrote:

 External Email - Use Caution
 Dear FreeSurfer Experts,

 I am Tien Pham, I am stucked at this situation. I calculated
 longitudinal LGI changes in my data set with two time points using
 longitudinal pipeline. Now I would like to extract the regional LGI and
 gray matter volume in my longitudinal results using QDEC to draw the ROIs
 which is showed significant differences, label it and map to all subjects.
 Then I get the LGI value of the ROI I saved before using the command below:

 cd $SUBJECTS_DIR
 mris_anatomical_stats -l lh.untitled.label \
  -t lh.pial_lgi \
  -b \
  -f subject_id/stats/lh.untitled.stats subject_id lh

 And this is the result:

 [toyama-no-iMac:/applications/freesurfer/subjects] toyama%
 mris_anatomical_stats -l lh.frontoinsula.label \

 ? -t lh.pial_lgi \

 ? -b \

 ? -f VC019_1/stats/lh.frontoinsula.stats VC019_1 lh

 limiting computations to label lh.frontoinsula.label.

 using thickness file lh.pial_lgi.

 reading volume /applications/freesurfer/subjects/VC019_1/mri/wm.mgz...

 reading input surface
 /applications/freesurfer/subjects/VC019_1/surf/lh.white...

 reading input pial surface
 /applications/freesurfer/subjects/VC019_1/surf/lh.pial...

 

Re: [Freesurfer] Cortical inflation and maintenance of surface voxel intensity

2020-01-21 Thread Greve, Douglas N.,Ph.D.

I've answered one of your questions below.

Ruopeng, there is a question for you too

On 1/21/20 11:02 AM, Assis Lopes, Pedro Augusto wrote:
> Hello Freesurfer experts!
>
> Thank you so much for the explanation Dr. Greve! Attached is the output of 
> our overlaid surfaces:
>
>   1 - Grossly speaking, sorry for any jargon mistaken, this image show 
> the intensity value given a projection, from the WM surf. towards pial surf., 
> of 80% (mri_vol2surf --projfrac 0.8) of a src volume (a registered SWI/T1). 
> (We tried surfproj of 1 but too noisy, and if 0.5, loses much info, that is 
> why we chose the 0.8).
>   -  However, my question is: is the intensity value projected 
> onto the surface an average of this vector of intensities (the projfrac from 
> WM surf to PS) OR just the intensity value of a single voxel (voxel at the 
> "tip" of vector) ?
Just a single voxel
>
>   2 - I plan to first make a mask that covers the range of intensities in 
> black and and blue, then manually select only the black and the surrounding 
> blue.
>   - Is there a way to make this mask out of my vol2surf surfaces?
If you know the intensity threshold, you can use mri_binarize
>   - And later, how would one manually select a given ROI of this 
> surface? (3Dslicer/ matlab or freesurfer can do it?)
Not sure, Ruopeng? I think he just wants to create a label from a 
thresholded overlay.
>
> Thank you so much for the attention!
> Best,
> Pedro
>
>
>
>
> -Original Message-
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>  On Behalf Of Greve, Douglas N.,Ph.D.
> Sent: Friday, January 10, 2020 11:12 AM
> To: freesurfer@nmr.mgh.harvard.edu
> Subject: Re: [Freesurfer] Cortical inflation and maintenance of surface voxel 
> intensity
>
>
> I think the problem is that you apply the registration twice instead of once. 
> the first time is on the volume output of bbregister, but then you do it 
> again when you run mri_vol2surf. I would just use SWI-bet.nii.gz (input to 
> bbregister) as input to mri_vol2surf. Also, it is unnecessary to do bet or 
> mri_binarize or mri_mask for this process (though you may need it for other 
> things). Also, I would use --projfrac 0.5 when running mri_vol2surf
>
>
> On 1/6/2020 10:03 PM, Assis Lopes, Pedro Augusto wrote:
>> Dear Freesurfer experts,
>>
>> Thank you for the quick response Dr. Greve! It`s an attempt to measure 
>> siderosis area, a thin (pathologically), small and blooming cortical signal 
>> seen through SWI (due to B0 inhomogeneity). We did:
>>  Recon-all
>>
>>  SWI BET and registration to T1
>> #BET
>> bet $SUBJECTS_DIR/$subject/SWI_Surface/original/$subject\_SWI.nii.gz 
>> $SUBJECTS_DIR/$subject/SWI_Surface/bet/$subject\_SWI-bet.nii.gz -R   
>>
>>
>> #bbregister (SWI to T1 skull stripped output from recon all) 
>> bbregister --s $subject --mov 
>> $SUBJECTS_DIR/$subject/SWI_Surface/bet/$subject\_SWI-bet.nii.gz --reg 
>> $SUBJECTS_DIR/$subject/SWI_Surface/bbreg/$subject\_SWI_bbreg.dat --o 
>> $SUBJECTS_DIR/$subject/SWI_Surface/bbreg/$subject\_SWI_bbreg.nii.gz --t1
>>
>>  #Divided hemispheres
>> #LH and RH
>> mri_binarize --i
>> $SUBJECTS_DIR/$subject/SWI_Surface/hemi/$subject\_filled.nii.gz
>> --match 255 --o
>> $SUBJECTS_DIR/$subject/SWI_Surface/hemi/$subject\_filled_LH.nii.gz
>> mri_mask
>> $SUBJECTS_DIR/$subject/SWI_Surface/bbreg/$subject\_SWI_bbreg.nii.gz
>> $SUBJECTS_DIR/$subject/SWI_Surface/hemi/$subject\_filled_LH.nii.gz
>> $SUBJECTS_DIR/$subject/SWI_Surface/hemi/$subject\_SWI-LH.nii.gz
>>
>>  #Transform the volume into a surface file with mri_vol2surf #Left
>> Hemi mri_vol2surf --mov
>> $SUBJECTS_DIR/$subject/SWI_Surface/hemi/$subject\_SWI-LH.nii.gz
>> --srcreg
>> $SUBJECTS_DIR/$subject/SWI_Surface/bbreg/$subject\_SWI_bbreg.lta
>> --hemi lh --o
>> $SUBJECTS_DIR/$subject/SWI_Surface/vol2surf/$subject\_SWI-LH_surface.n
>> ii.gz --regheader $subject #and right mri_vol2surf --mov
>> $SUBJECTS_DIR/$subject/SWI_Surface/hemi/$subject\_SWI-RH.nii.gz
>> --srcreg
>> $SUBJECTS_DIR/$subject/SWI_Surface/bbreg/$subject\_SWI_bbreg.lta
>> --hemi rh --o
>> $SUBJECTS_DIR/$subject/SWI_Surface/vol2surf/$subject\_SWI-RH_surface.n
>> ii.gz --regheader $subject
>>
>>  #Freeview and project SWI as an overlay onto the inflated surface
>> freeview -f
>> $SUBJECTS_DIR/$subject/surf/lh.inflated:annot=aparc.annot:annot_outlin
>> e=1:overlay=$SUBJECTS_DIR/$subject/SWI_Surface/vol2surf/$subject\_SWI-
>> LH_surface.nii.gz -f
>> $SUBJECTS_DIR/$subject/surf/rh.inflated:annot=aparc.annot:annot_outlin
>> e=1:overlay=$SUBJECTS_DIR/$subject/SWI_Surface/vol2surf/$subject\_SWI-
>> RH_surface.nii.gz
>>
>> We did not specify any projection fraction in our mri_vol2surf. Sorry for 
>> not being clearer in the step of analyze measured signal. We aim to make a 
>> brain mask of such hypointense signal and obtain its proportional area to 
>> total brain pial surface.
>>
>>Thank you so much for the attention Dr. Greve, I look forward in 

Re: [Freesurfer] Recon-all multiple subjects DICOM

2020-01-21 Thread Benjamin Ineichen
External Email - Use Caution

Thank you, Doug.

Sorry for the misunderstanding but the folders for the individual subjects
in my SUBJECTS_DIR already contain only the T1-MPRAGE-DICOMS and I only
want to feed one DICOM per patient to the recon-all. My problem is the
batch processing of several subjects using the following command:
For SubjectName in `cat *subs2.txt*`; do recon-all -i
$SUBJECTS_DIR/$SubjectName/* -all -qcache; done

the recon-all command requires me to specify one of the DICOM-files for
each subject but each subject has different DICOM-file names. How can I
specify that the command should just take any one DICOM-file within each
subject folder? Using the wild card character * did not solve the problem.

Thanks!

/Ben

Am Di., 21. Jan. 2020 um 22:09 Uhr schrieb Greve, Douglas N.,Ph.D. <
dgr...@mgh.harvard.edu>:

> You can only specify one input dicom file. We have a tutorial on how to
> find that one file in a subject. See
> http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Practice
>
> On 1/21/20 3:58 PM, Benjamin Ineichen wrote:
> >
> > External Email - Use Caution
> >
> > Dear Freesurfer experts,
> >
> > I try to run several subjects one after each other on recon-all using:
> > for SubjectName in `cat *subs2.txt*`; do recon-all -i
> > $SUBJECTS_DIR/$SubjectName/* -all -qcache; done
> >
> > Output:
> > ERROR: Flag
> >
> /Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE018B6B
>
> > unrecognized. -i
> >
> /Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE00C3C4
>
> >
> /Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE018B6B
>
> > ... (all remaining DICOM-files for the first subject)
> >
> > How can I define one of my DICOM-files in the individual subject
> > folders as input (the DICOM-file names are different for each
> > subject)? I tried the character * (wild card) which did not work.
> >
> > Many thanks for your support!
> >
> > Best regards,
> > Benjamin
> >
> >
> >
> > --
> > 
> > Benjamin Victor Ineichen, MD PhD
> > Karolinska Institutet
> > Center for Molecular Medicine
> > Stockholm, Sweden
> > ineic...@protonmail.ch 
> > +41 76 391 04 01
> >
> > Dr. med. et Dr. rer. nat. ETH Benjamin Victor Ineichen
> > Karolinska Institutet
> > Center for Molecular Medicine
> > Stockholm, Sweden
> > ineic...@protonmail.ch 
> > +41 76 391 04 01
> >
> > ___
> > 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



-- 

Benjamin Victor Ineichen, MD PhD
Karolinska Institutet
Center for Molecular Medicine
Stockholm, Sweden
ineic...@protonmail.ch
+41 76 391 04 01

Dr. med. et Dr. rer. nat. ETH Benjamin Victor Ineichen
Karolinska Institutet
Center for Molecular Medicine
Stockholm, Sweden
ineic...@protonmail.ch
+41 76 391 04 01
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Change the subject ID after recon-all?

2020-01-21 Thread Bruce Fischl

Hi Antonin and Tim

you should be able to do:
setenv FS_SKIP_TAGS 1
mri_convert vol_with_tags.mgz vol_without_tags.mgz

and verify it worked with mri_info

cheers
Bruce

On Tue, 21 Jan 2020, Antonin Skoch wrote:



External Email - Use Caution

Hi, Tim,
the subject ID can be also contained in the commandline history which is sto
red in .mgz files. This can be viewed using
mri_info file.mgz --cmds
I am not aware of any direct command which can strip out this info, but you 
surely could convert .mgz file to .nii and then (using path which does not c

ontain subject ID) convert back to .mgz, if needed.
Antonin
Hi Doug,

thanks for the mri_add_xform_to_header idea, I didn't know about that option
!

Best,

Tim

> On January 21, 2020 at 4:24 PM "Greve, Douglas N.,Ph.D." 
>  wrote:
> 
> 
> 
> For the mgz volumes, you should be able to do something like

> mri_add_xform_to_header -c /new/path/to/xfm brain.mgz
> 
> For the labels you could just use something like

> sed s/oldsubjectname/newsubjectname
> 
> 
> 
> 
> On 1/17/2020 3:48 AM, Tim Schäfer wrote:

> >  External Email - Use Caution
> >
> > Hi Douglas,
> >
> > sure, you can get two example files here:
> >
> >  wget http://rcmd.org/tmp/brain.mgz
> >  wget http://rcmd.org/tmp/lh.BA1_exvivo.label
> >
> > The brain volume contains the ID because it stores the full path to the 
> > tairach xfm (which includes the folder name, so the ID). You can check b

y:
> >
> >  mri_info brain.mgz | grep talair
> >
> > (In this case the ID is 'tim').
> >
> > Without mri_info, you can get it as well:
> >
> >  mv brain.mgz brain.gz
> >  gunzip -c brain.gz | strings | grep talair
> >
> > The second file is an ASCII label from the same subject. You can get the
 ID 
> > by running:

> >
> >  head -n 1 lh.BA1_exvivo.label
> >
> > There are some other files which contain the ID, these are just 2 exampl
es.
> >
> >
> > I am currently in contact with the people running the consortium server 
and 
> > I am not really sure whether the rule that the ID must not be in the fil
es 
> > makes any sense at all. Maybe I can get around this.

> >
> >
> > Best,
> >
> > Tim
> >
> >
> >
> >
> >> On January 17, 2020 at 12:23 AM "Greve, Douglas N.,Ph.D." 
> >>  wrote:

> >>
> >>
> >> Hi Tim, can you send a list of files that have the identifier. For
> >> volumes and surfaces, it might be as easy as running
> >> mri_convert/mris_convert using the same file as input and output.
> >>
> >> On 1/13/2020 5:54 AM, Tim Schäfer wrote:
> >>>   External Email - Use Caution
> >>>
> >>> Dear FreeSurfer experts,
> >>>
> >>>
> >>> I have two questions on subject IDs in FreeSurfer output.
> >>>
> >>> 1) is it possible to change to subject identifier in the FreeSurfer 
> >>> output after recon-all has been run?

> >>>
> >>> Background: I would like to upload data pre-processed with FreeSurfer 
to 
> >>> a consortium server. The subject ID is a random identifier, but the 
> >>> upload guidelines say this identifier must only occur in certain file 
> >>> types (Excel files, .log files, and some more, but not in any other 
> >>> files).

> >>>
> >>> I noticed that a lot of the output files produced by FreeSurfer contai
n 
> >>> the subject identifier somewhere, including various binary files, so I


> >>> guess there is no easy way to change it. But maybe there is? Like 
> >>> rerunning a part of recon-all?

> >>>
> >>>
> >>>
> >>> 2) If not, I could rename the source NIFTI files (e.g., from the 
> >>> identifiers to something like 'subject001', 'subject002', ...) and 
> >>> re-process everything. This would take some computational time for the
 > 
> >>> 500 subjects, but it would be okay I guess.

> >>>
> >>> But a large number of the subjects have manual edits applied already. 
Is 
> >>> there a way to keep the manual edits? E.g., I thought maybe I could 
> >>> rename the individual directories of the edited subjects, leave the 
> >>> edited files in there, and run recon-all again. But what would happen?


> >>> Will the new output files have the renamed ID from the directory name 
> >>> (and thus the recon-all command line), or will they still use the old 
ID 
> >>> (from the header of the existing files)? Or will the existing, edited 
> >>> files which contain a different ID be ignored during the new run becau
se 
> >>> the IDs do not match, and thus the existing edits would have no effect

?
> >>>
> >>>
> >>> All the best,
> >>>
> >>> 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

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

Re: [Freesurfer] Change the subject ID after recon-all?

2020-01-21 Thread Antonin Skoch
External Email - Use Caution

Hi, Tim,

the subject ID can be also contained in the commandline history which is stored 
in .mgz files. This can be viewed using
mri_info file.mgz --cmds

I am not aware of any direct command which can strip out this info, but you 
surely could convert .mgz file to .nii and then (using path which does not 
contain subject ID) convert back to .mgz, if needed.

Antonin



Hi Doug,thanks for the mri_add_xform_to_header idea, I didn't know about that 
option!

Best,

Tim

> On January 21, 2020 at 4:24 PM "Greve, Douglas N.,Ph.D." 
>  wrote:
> 
> 
> 
> For the mgz volumes, you should be able to do something like
> mri_add_xform_to_header -c /new/path/to/xfm brain.mgz
> 
> For the labels you could just use something like
> sed s/oldsubjectname/newsubjectname
> 
> 
> 
> 
> On 1/17/2020 3:48 AM, Tim Schäfer wrote:
> >  External Email - Use Caution
> >
> > Hi Douglas,
> >
> > sure, you can get two example files here:
> >
> >  wget http://rcmd.org/tmp/brain.mgz
> >  wget http://rcmd.org/tmp/lh.BA1_exvivo.label
> >
> > The brain volume contains the ID because it stores the full path to the 
> > tairach xfm (which includes the folder name, so the ID). You can check by:
> >
> >  mri_info brain.mgz | grep talair
> >
> > (In this case the ID is 'tim').
> >
> > Without mri_info, you can get it as well:
> >
> >  mv brain.mgz brain.gz
> >  gunzip -c brain.gz | strings | grep talair
> >
> > The second file is an ASCII label from the same subject. You can get the ID 
> > by running:
> >
> >  head -n 1 lh.BA1_exvivo.label
> >
> > There are some other files which contain the ID, these are just 2 examples.
> >
> >
> > I am currently in contact with the people running the consortium server and 
> > I am not really sure whether the rule that the ID must not be in the files 
> > makes any sense at all. Maybe I can get around this.
> >
> >
> > Best,
> >
> > Tim
> >
> >
> >
> >
> >> On January 17, 2020 at 12:23 AM "Greve, Douglas N.,Ph.D." 
> >>  wrote:
> >>
> >>
> >> Hi Tim, can you send a list of files that have the identifier. For
> >> volumes and surfaces, it might be as easy as running
> >> mri_convert/mris_convert using the same file as input and output.
> >>
> >> On 1/13/2020 5:54 AM, Tim Schäfer wrote:
> >>>   External Email - Use Caution
> >>>
> >>> Dear FreeSurfer experts,
> >>>
> >>>
> >>> I have two questions on subject IDs in FreeSurfer output.
> >>>
> >>> 1) is it possible to change to subject identifier in the FreeSurfer 
> >>> output after recon-all has been run?
> >>>
> >>> Background: I would like to upload data pre-processed with FreeSurfer to 
> >>> a consortium server. The subject ID is a random identifier, but the 
> >>> upload guidelines say this identifier must only occur in certain file 
> >>> types (Excel files, .log files, and some more, but not in any other 
> >>> files).
> >>>
> >>> I noticed that a lot of the output files produced by FreeSurfer contain 
> >>> the subject identifier somewhere, including various binary files, so I 
> >>> guess there is no easy way to change it. But maybe there is? Like 
> >>> rerunning a part of recon-all?
> >>>
> >>>
> >>>
> >>> 2) If not, I could rename the source NIFTI files (e.g., from the 
> >>> identifiers to something like 'subject001', 'subject002', ...) and 
> >>> re-process everything. This would take some computational time for the > 
> >>> 500 subjects, but it would be okay I guess.
> >>>
> >>> But a large number of the subjects have manual edits applied already. Is 
> >>> there a way to keep the manual edits? E.g., I thought maybe I could 
> >>> rename the individual directories of the edited subjects, leave the 
> >>> edited files in there, and run recon-all again. But what would happen? 
> >>> Will the new output files have the renamed ID from the directory name 
> >>> (and thus the recon-all command line), or will they still use the old ID 
> >>> (from the header of the existing files)? Or will the existing, edited 
> >>> files which contain a different ID be ignored during the new run because 
> >>> the IDs do not match, and thus the existing edits would have no effect?
> >>>
> >>>
> >>> All the best,
> >>>
> >>> 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
> >>>
> >>> ___
> >>> 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 mailing list
> Freesurfer@nmr.mgh.harvard.edu
> 

Re: [Freesurfer] Recon-all multiple subjects DICOM

2020-01-21 Thread Greve, Douglas N.,Ph.D.
You can only specify one input dicom file. We have a tutorial on how to 
find that one file in a subject. See
http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Practice

On 1/21/20 3:58 PM, Benjamin Ineichen wrote:
>
> External Email - Use Caution
>
> Dear Freesurfer experts,
>
> I try to run several subjects one after each other on recon-all using:
> for SubjectName in `cat *subs2.txt*`; do recon-all -i 
> $SUBJECTS_DIR/$SubjectName/* -all -qcache; done
>
> Output:
> ERROR: Flag 
> /Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE018B6B
>  
> unrecognized. -i 
> /Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE00C3C4
>  
> /Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE018B6B
>  
> ... (all remaining DICOM-files for the first subject)
>
> How can I define one of my DICOM-files in the individual subject 
> folders as input (the DICOM-file names are different for each 
> subject)? I tried the character * (wild card) which did not work.
>
> Many thanks for your support!
>
> Best regards,
> Benjamin
>
>
>
> -- 
> 
> Benjamin Victor Ineichen, MD PhD
> Karolinska Institutet
> Center for Molecular Medicine
> Stockholm, Sweden
> ineic...@protonmail.ch 
> +41 76 391 04 01
>
> Dr. med. et Dr. rer. nat. ETH Benjamin Victor Ineichen
> Karolinska Institutet
> Center for Molecular Medicine
> Stockholm, Sweden
> ineic...@protonmail.ch 
> +41 76 391 04 01
>
> ___
> 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] Recon-all multiple subjects DICOM

2020-01-21 Thread Benjamin Ineichen
External Email - Use Caution

Dear Freesurfer experts,

I try to run several subjects one after each other on recon-all using:
for SubjectName in `cat *subs2.txt*`; do recon-all -i
$SUBJECTS_DIR/$SubjectName/* -all -qcache; done

Output:
ERROR: Flag
/Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE018B6B
unrecognized. -i
/Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE00C3C4
/Users/benine/Desktop/PVS_validation_cohort/MultipleMS_MRI_export/Freesurfer_T1/SW1-1898_M12/EE018B6B
... (all remaining DICOM-files for the first subject)

How can I define one of my DICOM-files in the individual subject folders as
input (the DICOM-file names are different for each subject)? I tried the
character * (wild card) which did not work.

Many thanks for your support!

Best regards,
Benjamin



-- 

Benjamin Victor Ineichen, MD PhD
Karolinska Institutet
Center for Molecular Medicine
Stockholm, Sweden
ineic...@protonmail.ch
+41 76 391 04 01

Dr. med. et Dr. rer. nat. ETH Benjamin Victor Ineichen
Karolinska Institutet
Center for Molecular Medicine
Stockholm, Sweden
ineic...@protonmail.ch
+41 76 391 04 01
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Freeview Surface Loading View Center

2020-01-21 Thread Ruopeng Wang
Hi Alex,

If the there is volume geometry information in the surface header, freeview 
will display the surface in that coordinate. Otherwise it will display it in 
surfaceRAS. The center of the view is automatically set as the center of FOV of 
the surface.

Best,
Ruopeng

> On Jan 19, 2020, at 7:22 PM, Mingjian He  wrote:
> 
> Hi,
> 
>   When using Freeview to load a surface file without volume, how does 
> Freeview set the initial view center and cursor position? I’ve checked mid 
> point of xyz ranges, centroid of vertices, and median. None of these gives me 
> the initial SurfaceRAS values when opening the surface with Freeview. 
> 
>   Thank you! 
> 
> Best,
> Alex
> External Email - Use Caution
> 
> 
> ___
> 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] Qdec and TkSurfer input boxes

2020-01-21 Thread Marcos Martins da Silva
External Email - Use Caution

FreeSurfer 6 over CentOS 7. I have the same problem with 5.3 too. One more
information: CentOS 7 is configured as PT-br instead of English. Could it
be the reason?

Em ter, 21 de jan de 2020 12:29, Greve, Douglas N.,Ph.D. <
dgr...@mgh.harvard.edu> escreveu:

> Which version of FS are you using? I don't have this problem in v6 or dev.
> What OS are you using?
>
>
> On 1/17/2020 9:09 AM, Marcos Martins da Silva wrote:
>
> External Email - Use Caution
> Thank you, Doug! Yes, there is an option to load a fsgd file in Freeview,
> but when you try to use this option Freeview closes wirh error. I tried to
> use the y.fsgd generated by Qdec process. This file works great when you
> use it in TkSurfer, but not in Freeview. I just need to get the thickness
> measure from my subjects at a particular vertex: vtmax. I can use
> mri-segstats to get average thickness from clusters, but not the thickness
> from each subject at vtmax. And I know if the input boxes were working I
> could get the scatter plot from vtmax, so I guess there is a function
> inside both Qdec and TkSurfer to return this information.
>
> Em qui, 16 de jan de 2020 20:36, Greve, Douglas N.,Ph.D. <
> dgr...@mgh.harvard.edu> escreveu:
>
>> Sorry, qdec and tksurfer are becoming (have become?) obsolete. I think
>> you can load an fsgd file in freeview
>>
>> On 1/15/2020 11:02 AM, Marcos Martins da Silva wrote:
>>
>> External Email - Use Caution
>> Hi! I use FreeSurfer 6.0 over CentOS 7. I have just notice a problem with
>> input/entry/edit boxes in Qdec and TkSurfer. I can see box content, click
>> inside the box and even select the content but it seems read only: I can't
>> change it. So it is impossible to see the scatter plot from a specific
>> vertex inputing its number. Any clue about what happened and how to fix it?
>> Thank you for your attention.
>>
>> ___
>> 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
>
>
> ___
> 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
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] recon exited with errors

2020-01-21 Thread Desel, Tenzin
Hello FreeSurfer Developers,

I'm attempting to run recon-all after unpacking data. It is exiting with errors 
- mri_cc: no WM voxels found with norm > 40 -- check skull stripping
 
 I've attached the recon-all.log in case it's of any use.

1) FreeSurfer version: 
freesurfer-Linux-centos7_x86_64-stable-v6-20161229-80ac5eb
2) Platform: centos7_x86_64
3) uname -a: Linux lemmiwinks.nmr.mgh.harvard.edu 3.10.0-1062.4.3.el7.x86_64 #1 
SMP Wed Nov 13 23:58:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
4) recon-all.log: see attached

Thank you!






Mon Jan 13 10:46:26 EST 2020
/autofs/cluster/animal/scan_data/sleep_eeg/SLEEP_TTRA_M_89/recons/FS6
/usr/local/freesurfer/stable6/bin/recon-all
-s FS6 -i raw/MPRAGE/004/mprage.mgz -all
subjid FS6
setenv SUBJECTS_DIR /autofs/cluster/animal/scan_data/sleep_eeg/SLEEP_TTRA_M_89/recons
FREESURFER_HOME /usr/local/freesurfer/stable6
Actual FREESURFER_HOME /autofs/cluster/freesurfer/centos7_x86_64/stable6
build-stamp.txt: freesurfer-Linux-centos7_x86_64-stable-v6-20161229-80ac5eb
Linux lemmiwinks.nmr.mgh.harvard.edu 3.10.0-1062.4.3.el7.x86_64 #1 SMP Wed Nov 13 23:58:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
cputime  unlimited
filesize unlimited
datasize unlimited
stacksizeunlimited
coredumpsize 0 kbytes
memoryuseunlimited
vmemoryuse   unlimited
descriptors  65535 
memorylocked 64 kbytes
maxproc  240728 
maxlocks unlimited
maxsignal240728 
maxmessage   819200 
maxnice  0 
maxrtprio0 
maxrttimeunlimited

  totalusedfree  shared  buff/cache   available
Mem:   61668864 192590853876912  309808 586604458918992
Swap:  25165820   025165820


program versions used
$Id: recon-all,v 1.580.2.15 2016/12/08 22:02:41 zkaufman Exp $
$Id: mri_motion_correct.fsl,v 1.15 2016/02/16 17:17:20 zkaufman Exp $
mri_convert.bin -all-info 
ProgramName: mri_convert.bin  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2020/01/13-15:46:26-GMT  BuildTimeStamp: Dec 29 2016 04:02:37  CVS: $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $  User: td744  Machine: lemmiwinks.nmr.mgh.harvard.edu  Platform: Linux  PlatformVersion: 3.10.0-1062.4.3.el7.x86_64  CompilerName: GCC  CompilerVersion: 40800 
FLIRT version 5.5
$Id: talairach_avi,v 1.13 2015/12/23 04:25:17 greve Exp $
mri_convert.bin --version 
stable6
ProgramName: tkregister2_cmdl  ProgramArguments: --all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2020/01/13-15:46:26-GMT  BuildTimeStamp: Dec 29 2016 04:02:37  CVS: $Id: tkregister2.c,v 1.132.2.1 2016/08/02 21:17:29 greve Exp $  User: td744  Machine: lemmiwinks.nmr.mgh.harvard.edu  Platform: Linux  PlatformVersion: 3.10.0-1062.4.3.el7.x86_64  CompilerName: GCC  CompilerVersion: 40800 
Program nu_correct, built from:
Package MNI N3, version 1.12.0, compiled by nicks@terrier (x86_64-unknown-linux-gnu) on 2015-06-19 at 01:25:34
ProgramName: mri_make_uchar  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2020/01/13-15:46:26-GMT  BuildTimeStamp: Dec 29 2016 04:02:37  CVS: $Id: mri_make_uchar.c,v 1.4 2011/03/02 00:04:14 nicks Exp $  User: td744  Machine: lemmiwinks.nmr.mgh.harvard.edu  Platform: Linux  PlatformVersion: 3.10.0-1062.4.3.el7.x86_64  CompilerName: GCC  CompilerVersion: 40800 
ProgramName: mri_normalize  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2020/01/13-15:46:26-GMT  BuildTimeStamp: Dec 29 2016 04:02:37  CVS: $Id: mri_normalize.c,v 1.88.2.3 2016/12/27 16:47:13 zkaufman Exp $  User: td744  Machine: lemmiwinks.nmr.mgh.harvard.edu  Platform: Linux  PlatformVersion: 3.10.0-1062.4.3.el7.x86_64  CompilerName: GCC  CompilerVersion: 40800 
ProgramName: mri_watershed  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2020/01/13-15:46:26-GMT  BuildTimeStamp: Dec 29 2016 04:02:37  CVS: $Id: mri_watershed.cpp,v 1.103 2016/06/17 18:00:49 zkaufman Exp $  User: td744  Machine: lemmiwinks.nmr.mgh.harvard.edu  Platform: Linux  PlatformVersion: 3.10.0-1062.4.3.el7.x86_64  CompilerName: GCC  CompilerVersion: 40800 
ProgramName: mri_gcut  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2020/01/13-15:46:26-GMT  BuildTimeStamp: Dec 29 2016 04:02:37  CVS: $Id: mri_gcut.cpp,v 1.14 2011/03/02 00:04:16 nicks Exp $  User: td744  Machine: lemmiwinks.nmr.mgh.harvard.edu  Platform: Linux  PlatformVersion: 3.10.0-1062.4.3.el7.x86_64  CompilerName: GCC  CompilerVersion: 40800 
ProgramName: mri_segment  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2020/01/13-15:46:26-GMT  BuildTimeStamp: Dec 29 2016 04:02:37  CVS: $Id: mri_segment.c,v 1.43.2.1 2016/10/27 22:24:52 zkaufman Exp $  User: td744  Machine: lemmiwinks.nmr.mgh.harvard.edu  Platform: Linux  PlatformVersion: 3.10.0-1062.4.3.el7.x86_64  CompilerName: GCC  CompilerVersion: 40800 
ProgramName: mri_label2label.bin  ProgramArguments: -all-info  ProgramVersion: 

[Freesurfer] recon exited with errors

2020-01-21 Thread Desel, Tenzin


Hello FreeSurfer Developers,

I'm attempting to run recon-all after unpacking data. It is exiting with errors 
- mri_cc: no WM voxels found with norm > 40 -- check skull stripping
 
 I've attached the recon-all.log in case it's of any use.

1) FreeSurfer version: 
freesurfer-Linux-centos7_x86_64-stable-v6-20161229-80ac5eb
2) Platform: centos7_x86_64
3) uname -a: Linux lemmiwinks.nmr.mgh.harvard.edu 3.10.0-1062.4.3.el7.x86_64 #1 
SMP Wed Nov 13 23:58:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
4) recon-all.log: see attached

Thank you!








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


Re: [Freesurfer] Retinotopy, design ill-conditioned

2020-01-21 Thread Marco Ninghetto
External Email - Use Caution

Thank you for your reply. I think I've better explained the situation in a
further email, which I paste in here.

I used expanding ring and rotating wedge. For my pilot, unfortunately, we
used only 2 cycles for each stimulus and 1 cycle lasted 200 seconds (for
sure I will change it to have more cycles, lasting less). TR = 2.5.

Retinotopy paradigm files are as follow:
-for expanding ring ("pos" direction since it expands):
stimtype eccen
direction pos
-for rotating wedge ("neg" direction since is counter-clockwise):
stimtype polar
direction neg

To compute analyses, I ran the following pipeline:
1) recon-all
2) preproc-sess
3) mkanalysis-sess
4) selxavg3-sess
Having only two cycles for each stimulus, in mkanalysis-sess, I used the
option -hpf and lowered the filter to 0.5.

In the last level (selxavg3-sess), I get the error.
Basically this step runs up to when MATLAB starts to calculate. Here I get
the following error:

MATLAB is selecting SOFTWARE OPENGL rendering.
< M A T L A B (R) >
  Copyright 1984-2019 The MathWorks, Inc.
  R2019b Update 3 (9.7.0.1261785) 64-bit (glnxa64)
 November 27, 2019

To get started, type doc.
For product information, visit www.mathworks.com.

>> >> >> >> /usr/local/freesurfer/fsfast/toolbox/fast_selxavg3.m
>> /usr/local/freesurfer/fsfast/toolbox/fast_ldanaflac.m
>> /usr/local/freesurfer/matlab/MRIread.m
>> >> >> starting fast_selxavg3b

#@# SUBJ02 ###
/media/sf_w_Desktop/w_pRF/retinotopy/SUBJ02
-
$Id: fast_selxavg3b.m,v 1.4 2016/05/04 22:16:47 greve Exp $
-
outtop = /media/sf_w_Desktop/w_pRF/retinotopy
Extension format = nii.gz
INFO: key nSliceGroups unrecognized, line 11, skipping
nruns = 2
autostimdur =


outanadir = /media/sf_w_Desktop/w_pRF/retinotopy/SUBJ02/bold/retinotopy.lh
Found 118266/125623 (94.1) voxels in mask 1
Creating Design Matrix
 ... creation time =  0.008 sec
DoMCFit = 1
ntptot = 260, nX = 158, DOF = 102
Saving X matrix to
/media/sf_w_Desktop/w_pRF/retinotopy/SUBJ02/bold/retinotopy.lh/Xtmp.mat
XCond = 6.85663e+16 (normalized)
ERROR: design is ill-conditioned
ans =
 1
>> --
ERROR: fast_selxavg3() failed\n


I tried to modify, out of curiosity, the duration of 1 cycle lower than 100
seconds in "mkanalysis-sess". It made the job. So I assume that the problem
is with that parameter. For further subjects I'll use different timings.
But is there still a way to compute calculations on these stimuli?
Moreover, now I acquire only one functional img for each stimulus. Do you
recommend me to do more runs? (maybe having only 1 run causes the issue).

Thank you for your help!
Marco





On Tue, 21 Jan 2020, 16:16 Greve, Douglas N.,Ph.D., 
wrote:

> Actually, I was able to get those files from your previous emails
>
> On 1/15/2020 11:24 AM, Marco Ninghetto wrote:
>
> External Email - Use Caution
> Sorry for the late reply, the message was non stop bounced.
>
> So, here You will find:
> - terminal output for `selxavg3-sess` (filename: terminal_output.txt). I
> copied only the last part when freesurfer accesses to MATLAB and where the
> error occurs;
> - the mat file from expanding ring and for rotating wedge (filename:
> expring_SUBJ02_20191122.mat and rotwedge_SUBJ02_20191122.mat).
> 
> - paradigm files for expanding ring and for rotating wedge
>
> Thank you for your precious help,
> Marco
>
> On Fri, 3 Jan 2020 at 17:51, Greve, Douglas N.,Ph.D. <
> dgr...@mgh.harvard.edu> wrote:
>
>> Can you send your paradigm files? Can you also send the terminal output?
>> One more thing, can you send the X.mat file from the output folder?
>>
>> On 1/2/2020 3:19 AM, Marco Ninghetto wrote:
>>
>> External Email - Use Caution
>> Hello experts,
>> I'm performing retinotopy analysis but when running the command
>>
>> selxavg3-sess
>>
>> It starts, but after some lines, I get the following error:
>>
>> ERROR: design is ill-conditioned
>>
>> I don't know how to proceed from here to solve the error.
>> My retinotopy stimuli make 2 cycles (e.g.: rotating wedge makes 2 full
>> cycles before quit) and each cycle takes 200 seconds to complete. TR is set
>> to 2.5 seconds.
>>
>> Please, does anyone have any advice?
>> Thanks in advance,
>> Marco
>>
>> --
>> ---
>> Marco Ninghetto, PhD candidate
>> Laboratory of Neuroplasticity
>> Nencki Institute of Experimental Biology
>> Polish Academy of Sciences
>> 3 Pasteur Street, 02-093 Warsaw, Poland
>>
>> ___
>> Freesurfer mailing 
>> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>> ___
>> Freesurfer mailing list
>> 

Re: [Freesurfer] Qdec error

2020-01-21 Thread Greve, Douglas N.,Ph.D.
Try normalizing your covariates (ie, remove the mean and divide by the stddev)

On 1/21/2020 7:39 AM, vittal korann wrote:

External Email - Use Caution

Dear FreeSurfer experts

I ran QDEC and got the following error.

Design matrix --
 1.0   1.04000  -1.38574   2.0   29.0   19.0;
 1.0   1.04000  -0.55066   2.0   35.0   19.0;
 1.0   1.03000   2.31721   2.0   23.0   14.0;
 1.0   1.03000  -0.22919   2.0   23.0   16.0;
 1.0   1.03000  -2.69688  -2.0   28.0   19.0;
 1.0   1.01000   0.84981  -2.0   22.0   19.0;
 1.0   1.01000   0.43845   2.0   36.0   21.0;
 1.0   1.06000   1.32888   2.0   28.0   17.0;
 1.0   1.02000   0.52292   2.0   34.0   22.0;
 1.0   1.02000   0.18104   2.0   32.0   17.0;
 1.0   1.03000  -0.33783  -2.0   32.0   22.0;
 1.0   1.04000   0.65805   2.0   30.0   17.0;
 1.0   1.03000   1.21888   2.0   37.0   10.0;
 1.0   1.02000   2.11598   2.0   29.0   10.0;
 1.0   1.02000  -0.02853   2.0   27.0   16.0;
 1.0   1.04000   0.21777   2.0   36.0   16.0;
 1.0   1.01000   0.30821   2.0   29.0   15.0;
 1.0   1.03000  -0.69389   2.0   30.0   12.0;
 1.0   1.04000   0.44792   2.0   23.0   15.0;
 1.0   1.03000   0.15876   2.0   28.0   15.0;
 1.0   1.02000  -1.05796   2.0   36.0   10.0;
 1.0   1.05000  -1.51878   2.0   32.0   15.0;
 1.0   1.03000  -0.91870  -2.0   30.0   15.0;

ERROR: matrix is ill-conditioned or badly scaled, condno = 68200

Possible problem with experimental design:
Check for duplicate entries and/or lack of range of
continuous variables within a class.
If you seek help with this problem, make sure to send:
  1. Your command line:
mri_glmfit.bin --y /usr/local/freesurfer/subjects/qdec/Untitled/y.mgh 
--fsgd /usr/local/freesurfer/subjects/qdec/Untitled/qdec.fsgd dods --glmdir 
/usr/local/freesurfer/subjects/qdec/Untitled --surf fsaverage lh --label 
/usr/local/freesurfer/subjects/fsaverage/label/lh.aparc.label --C 
/usr/local/freesurfer/subjects/qdec/Untitled/contrasts/lh-Avg-Intercept-thickness.mat
 --C 
/usr/local/freesurfer/subjects/qdec/Untitled/contrasts/lh-Avg-thickness-Vein_Avg_tort-Cor.mat
  2. The FSGD file (if using one)
  3. And the design matrix above
Attempting to diagnose further
SumSq: Min=4.795832 (col 1), Max=145.206757 (col 5)
 The scale is much different between columns 1 and 5, you may want to
 normalize by subtracting the mean and dividing by the standard deviation.

Any help would be appreciated!

With regards
Korann




___
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] Fwd: Input PET images for PetSurfer Analysis

2020-01-21 Thread Greve, Douglas N.,Ph.D.
Don't smooth them! Smoothing creates partial volume effects. When you convert 
to nifti, you have to be careful to make sure that any DICOM intensity scaling 
is taken into effect; it is becoming more common these days. The only other 
thing may be to remove the gradient distortion from the MRI if possible (you  
would need to rerun recon-all)

On 1/20/2020 3:22 PM, Ferraro, Pilar wrote:

External Email - Use Caution

Dear Freesurfer experts,
I am starting a new analysis using PetSurfer to evaluate the effect of 
different PVC corrections on brain metabolism in a set of patients.
I have already analyzed all the T1 MRI data using the normal stream, however I 
have never worked on PET data before.
I have the original DICOMS from a static PET acquisition but I’d like to know 
more about the preprocessing steps needed for these PET data.
I am thinking I should simply convert PET DICOMS to NifTI, normalize them to a 
standard template and then smooth them with 8- mm full width at half maximum 
Gaussian Kernel to obtain the input images for the PetSurfer analysis.
Am I correct or should I add further preprocessing steps?
Thanks,

Pilar






Il giorno 16 gen 2020, alle ore 6:00 PM, 
freesurfer-requ...@nmr.mgh.harvard.edu
 ha scritto:

Send Freesurfer mailing list submissions to
freesurfer@nmr.mgh.harvard.edu

To subscribe or unsubscribe via the World Wide Web, visit
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
or, via email, send a message with subject or body 'help' to
freesurfer-requ...@nmr.mgh.harvard.edu

You can reach the person managing the list at
freesurfer-ow...@nmr.mgh.harvard.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Freesurfer digest..."


Today's Topics:

  1. Qdec and TkSurfer input boxes (Marcos Martins da Silva)
  2. FreeSurfer analyses in MatLab (Graduate Imaging)
  3. Re: Oval shape in average subject inflated (Marina Fern?ndez)
  4. Segfault in mris_topo_fixer (Christian O'Reilly, Dr)
  5. Re: Segfault in mris_topo_fixer (Hoopes, Andrew)
  6. Segmentation Fault during recon-all using FLAIR Image
 (Swanson,Clayton)


--

Message: 1
Date: Wed, 15 Jan 2020 14:02:26 -0300
From: Marcos Martins da Silva 

Subject: [Freesurfer] Qdec and TkSurfer input boxes
To: freesurfer 

Message-ID:

Content-Type: text/plain; charset="utf-8"

   External Email - Use Caution

Hi! I use FreeSurfer 6.0 over CentOS 7. I have just notice a problem with
input/entry/edit boxes in Qdec and TkSurfer. I can see box content, click
inside the box and even select the content but it seems read only: I can't
change it. So it is impossible to see the scatter plot from a specific
vertex inputing its number. Any clue about what happened and how to fix it?
Thank you for your attention.
-- next part --
An HTML attachment was scrubbed...
URL: 
http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20200115/11a8c25a/attachment-0001.html

--

Message: 2
Date: Wed, 15 Jan 2020 16:08:12 -0500
From: Graduate Imaging 

Subject: [Freesurfer] FreeSurfer analyses in MatLab
To: freesurfer@nmr.mgh.harvard.edu
Message-ID:

Content-Type: text/plain; charset="utf-8"

   External Email - Use Caution

Hello,

I recently ran a vertex wise analysis on two different projects the first
had three groups with three co-variates that looked at if group membership
was associated with brain volume. The second project had two groups with
three co-variates looking at psychiatric x BMI interaction effect on brain
volume. I'm interested in running ROI analyses in matlab to ensure the same
matrices were used.

To run the ROI analyses I'm going to important the design matrix from the
vertex wise analysis and use the fast_glmfit and fast_fratio commands as
shown below:
X = load('Xg.dat');
C = load('C.dat');
y = load('ROI.dat'); text file containing participant ROI values from the
DKT atlas.
[beta rvar] = fast_glmfit(y,X);
[F pvalues] = fast_fratio(beta,X,rvar,C

My first question is the beta values that are calculated from fast_glmfit
are unstandardized is there anyway way to have it compute standardized
values?

My second question is when I ran the ROI analyses looking at the diagnosis
x BMI interaction effect it outputs an array of beta values for each
regressor. In addition to each groups beta value (for BMI) I'm interested
in the beta value of the interaction (ie diagnosis x BMI). I 

Re: [Freesurfer] FreeSurfer analyses in MatLab

2020-01-21 Thread Greve, Douglas N.,Ph.D.


On 1/17/2020 10:39 AM, Graduate Imaging wrote:

External Email - Use Caution

Hello,

I recently ran a vertex wise analysis on two different projects the first had 
three groups with three co-variates that looked at if group membership was 
associated with brain volume. The second project had two groups with three 
co-variates looking at psychiatric x BMI interaction effect on brain volume. 
I'm interested in running ROI analyses in matlab to ensure the same matrices 
were used.

To run the ROI analyses I'm going to important the design matrix from the 
vertex wise analysis and use the fast_glmfit and fast_fratio commands as shown 
below:
X = load('Xg.dat');
C = load('C.dat');
y = load('ROI.dat'); text file containing participant ROI values from the DKT 
atlas.
[beta rvar] = fast_glmfit(y,X);
[F pvalues] = fast_fratio(beta,X,rvar,C

My first question is the beta values that are calculated from fast_glmfit are 
unstandardized is there anyway way to have it compute standardized values?
I think this is how you would compute that
betastddev = sqrt(rvar*diag(inv(X'*X)));
betastandard = beta./betastddev;
When I try running this in Matlab I get the Error using  *  incorrect 
dimensions for matrix multiplication message.
That means that the number of items in y (ie, number of subjects in ROI.dat) is 
different than the number of rows in X (number of subjects in the fsgd). What 
are the sizes of y and X?

My second question is when I ran the ROI analyses looking at the diagnosis x 
BMI interaction effect it outputs an array of beta values for each regressor. 
In addition to each groups beta value (for BMI) I'm interested in the beta 
value of the interaction (ie diagnosis x BMI). I was wondering how do i go 
about obtaining this? Would I have to create a new matrix with the interaction 
term included in it?

If so would the analysis essentially be one group with the diagnosis x BMI 
interaction term plus the three co-variates?
If you are using an FSGD file and have used DODS, then you can create an 
interaction contrast. Send me your fsgd file if you want further help
Yes I was using DODS approach for this analysis, I've attached my FSGD file to 
this email.

You have 2 groups and 4 coviariates so 10 regressors. The dx BMI interaction 
would need a contrast matrix
0 0 1 -1 0 0 ... the rest 0s
BTW, sex should not be a covariate. You really need to have four groups, 
P-male, P-female, HC-male, and HC-female (which would change the contrast above)
Also, I would normalize the age and ICV




___
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 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] Change the subject ID after recon-all?

2020-01-21 Thread Tim Schäfer
External Email - Use Caution

Hi Doug,

thanks for the mri_add_xform_to_header idea, I didn't know about that option!

Best,

Tim

> On January 21, 2020 at 4:24 PM "Greve, Douglas N.,Ph.D." 
>  wrote:
> 
> 
> 
> For the mgz volumes, you should be able to do something like
> mri_add_xform_to_header -c /new/path/to/xfm brain.mgz
> 
> For the labels you could just use something like
> sed s/oldsubjectname/newsubjectname
> 
> 
> 
> 
> On 1/17/2020 3:48 AM, Tim Schäfer wrote:
> >  External Email - Use Caution
> >
> > Hi Douglas,
> >
> > sure, you can get two example files here:
> >
> >  wget http://rcmd.org/tmp/brain.mgz
> >  wget http://rcmd.org/tmp/lh.BA1_exvivo.label
> >
> > The brain volume contains the ID because it stores the full path to the 
> > tairach xfm (which includes the folder name, so the ID). You can check by:
> >
> >  mri_info brain.mgz | grep talair
> >
> > (In this case the ID is 'tim').
> >
> > Without mri_info, you can get it as well:
> >
> >  mv brain.mgz brain.gz
> >  gunzip -c brain.gz | strings | grep talair
> >
> > The second file is an ASCII label from the same subject. You can get the ID 
> > by running:
> >
> >  head -n 1 lh.BA1_exvivo.label
> >
> > There are some other files which contain the ID, these are just 2 examples.
> >
> >
> > I am currently in contact with the people running the consortium server and 
> > I am not really sure whether the rule that the ID must not be in the files 
> > makes any sense at all. Maybe I can get around this.
> >
> >
> > Best,
> >
> > Tim
> >
> >
> >
> >
> >> On January 17, 2020 at 12:23 AM "Greve, Douglas N.,Ph.D." 
> >>  wrote:
> >>
> >>
> >> Hi Tim, can you send a list of files that have the identifier. For
> >> volumes and surfaces, it might be as easy as running
> >> mri_convert/mris_convert using the same file as input and output.
> >>
> >> On 1/13/2020 5:54 AM, Tim Schäfer wrote:
> >>>   External Email - Use Caution
> >>>
> >>> Dear FreeSurfer experts,
> >>>
> >>>
> >>> I have two questions on subject IDs in FreeSurfer output.
> >>>
> >>> 1) is it possible to change to subject identifier in the FreeSurfer 
> >>> output after recon-all has been run?
> >>>
> >>> Background: I would like to upload data pre-processed with FreeSurfer to 
> >>> a consortium server. The subject ID is a random identifier, but the 
> >>> upload guidelines say this identifier must only occur in certain file 
> >>> types (Excel files, .log files, and some more, but not in any other 
> >>> files).
> >>>
> >>> I noticed that a lot of the output files produced by FreeSurfer contain 
> >>> the subject identifier somewhere, including various binary files, so I 
> >>> guess there is no easy way to change it. But maybe there is? Like 
> >>> rerunning a part of recon-all?
> >>>
> >>>
> >>>
> >>> 2) If not, I could rename the source NIFTI files (e.g., from the 
> >>> identifiers to something like 'subject001', 'subject002', ...) and 
> >>> re-process everything. This would take some computational time for the > 
> >>> 500 subjects, but it would be okay I guess.
> >>>
> >>> But a large number of the subjects have manual edits applied already. Is 
> >>> there a way to keep the manual edits? E.g., I thought maybe I could 
> >>> rename the individual directories of the edited subjects, leave the 
> >>> edited files in there, and run recon-all again. But what would happen? 
> >>> Will the new output files have the renamed ID from the directory name 
> >>> (and thus the recon-all command line), or will they still use the old ID 
> >>> (from the header of the existing files)? Or will the existing, edited 
> >>> files which contain a different ID be ignored during the new run because 
> >>> the IDs do not match, and thus the existing edits would have no effect?
> >>>
> >>>
> >>> All the best,
> >>>
> >>> 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
> >>>
> >>> ___
> >>> 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 mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

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

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu

Re: [Freesurfer] Qdec and TkSurfer input boxes

2020-01-21 Thread Greve, Douglas N.,Ph.D.
Which version of FS are you using? I don't have this problem in v6 or dev. What 
OS are you using?


On 1/17/2020 9:09 AM, Marcos Martins da Silva wrote:

External Email - Use Caution

Thank you, Doug! Yes, there is an option to load a fsgd file in Freeview, but 
when you try to use this option Freeview closes wirh error. I tried to use the 
y.fsgd generated by Qdec process. This file works great when you use it in 
TkSurfer, but not in Freeview. I just need to get the thickness measure from my 
subjects at a particular vertex: vtmax. I can use mri-segstats to get average 
thickness from clusters, but not the thickness from each subject at vtmax. And 
I know if the input boxes were working I could get the scatter plot from vtmax, 
so I guess there is a function inside both Qdec and TkSurfer to return this 
information.

Em qui, 16 de jan de 2020 20:36, Greve, Douglas N.,Ph.D. 
mailto:dgr...@mgh.harvard.edu>> escreveu:
Sorry, qdec and tksurfer are becoming (have become?) obsolete. I think you can 
load an fsgd file in freeview

On 1/15/2020 11:02 AM, Marcos Martins da Silva wrote:

External Email - Use Caution

Hi! I use FreeSurfer 6.0 over CentOS 7. I have just notice a problem with 
input/entry/edit boxes in Qdec and TkSurfer. I can see box content, click 
inside the box and even select the content but it seems read only: I can't 
change it. So it is impossible to see the scatter plot from a specific vertex 
inputing its number. Any clue about what happened and how to fix it? Thank you 
for your attention.



___
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 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] question about curv.mgh

2020-01-21 Thread Bruce Fischl

Hi Rafael

the ?h.curv files are spatially smoothed mean curvature

cheers
Bruce
On Tue, 21 Jan 
2020, Raffaele Dubbioso wrote:




External Email - Use Caution

Hello FS team, 
can you please tell me what is the measurement scale of the curv.mg file?
Is it a mean curvature (mm-1) or a gaussian curvature (mm-2)? I got values
between 0.02 and -0.08 and it seems they are gaussian curvature. 

Thanks a lot for your help

Best regards
Rafael


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

Re: [Freesurfer] Change the subject ID after recon-all?

2020-01-21 Thread Greve, Douglas N.,Ph.D.

For the mgz volumes, you should be able to do something like
mri_add_xform_to_header -c /new/path/to/xfm brain.mgz

For the labels you could just use something like
sed s/oldsubjectname/newsubjectname




On 1/17/2020 3:48 AM, Tim Schäfer wrote:
>  External Email - Use Caution
>
> Hi Douglas,
>
> sure, you can get two example files here:
>
>  wget http://rcmd.org/tmp/brain.mgz
>  wget http://rcmd.org/tmp/lh.BA1_exvivo.label
>
> The brain volume contains the ID because it stores the full path to the 
> tairach xfm (which includes the folder name, so the ID). You can check by:
>
>  mri_info brain.mgz | grep talair
>
> (In this case the ID is 'tim').
>
> Without mri_info, you can get it as well:
>
>  mv brain.mgz brain.gz
>  gunzip -c brain.gz | strings | grep talair
>
> The second file is an ASCII label from the same subject. You can get the ID 
> by running:
>
>  head -n 1 lh.BA1_exvivo.label
>
> There are some other files which contain the ID, these are just 2 examples.
>
>
> I am currently in contact with the people running the consortium server and I 
> am not really sure whether the rule that the ID must not be in the files 
> makes any sense at all. Maybe I can get around this.
>
>
> Best,
>
> Tim
>
>
>
>
>> On January 17, 2020 at 12:23 AM "Greve, Douglas N.,Ph.D." 
>>  wrote:
>>
>>
>> Hi Tim, can you send a list of files that have the identifier. For
>> volumes and surfaces, it might be as easy as running
>> mri_convert/mris_convert using the same file as input and output.
>>
>> On 1/13/2020 5:54 AM, Tim Schäfer wrote:
>>>   External Email - Use Caution
>>>
>>> Dear FreeSurfer experts,
>>>
>>>
>>> I have two questions on subject IDs in FreeSurfer output.
>>>
>>> 1) is it possible to change to subject identifier in the FreeSurfer output 
>>> after recon-all has been run?
>>>
>>> Background: I would like to upload data pre-processed with FreeSurfer to a 
>>> consortium server. The subject ID is a random identifier, but the upload 
>>> guidelines say this identifier must only occur in certain file types (Excel 
>>> files, .log files, and some more, but not in any other files).
>>>
>>> I noticed that a lot of the output files produced by FreeSurfer contain the 
>>> subject identifier somewhere, including various binary files, so I guess 
>>> there is no easy way to change it. But maybe there is? Like rerunning a 
>>> part of recon-all?
>>>
>>>
>>>
>>> 2) If not, I could rename the source NIFTI files (e.g., from the 
>>> identifiers to something like 'subject001', 'subject002', ...) and 
>>> re-process everything. This would take some computational time for the > 
>>> 500 subjects, but it would be okay I guess.
>>>
>>> But a large number of the subjects have manual edits applied already. Is 
>>> there a way to keep the manual edits? E.g., I thought maybe I could rename 
>>> the individual directories of the edited subjects, leave the edited files 
>>> in there, and run recon-all again. But what would happen? Will the new 
>>> output files have the renamed ID from the directory name (and thus the 
>>> recon-all command line), or will they still use the old ID (from the header 
>>> of the existing files)? Or will the existing, edited files which contain a 
>>> different ID be ignored during the new run because the IDs do not match, 
>>> and thus the existing edits would have no effect?
>>>
>>>
>>> All the best,
>>>
>>> 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
>>>
>>> ___
>>> 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 mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Extract specific LGI and Volume values

2020-01-21 Thread Greve, Douglas N.,Ph.D.
You can try freeview, but there might be something wrong with the label. How 
was it created?

On 1/16/2020 11:51 PM, Tien Pham wrote:

External Email - Use Caution

Thank you for your help.
I cannot load the label on surface, this is the error:

[toyama-no-iMac:/applications/freesurfer/subjects] toyama% qdec

Reading /applications/freesurfer/tktools/tkUtils.tcl

Using /applications/freesurfer/lib/tcl/fsgdfPlot.tcl
qdec.bin(41334,0xa15971a8) malloc: *** mach_vm_map(size=114944) failed 
(error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
MRISalloc(15124178, 76): could not allocate faces
Cannot allocate memory

What do you mean how many point? How do I find it?

On Fri, Jan 17, 2020 at 1:17 PM Greve, Douglas N.,Ph.D. 
mailto:dgr...@mgh.harvard.edu>> wrote:
Is the label valid? Can you load it on a surface? How many points are in it?

On 1/16/2020 9:51 PM, Tien Pham wrote:

External Email - Use Caution

Thank you for your e-mail.
It seems I got another error. This is what it showed in terminal:

[toyama-no-iMac:/applications/freesurfer/subjects] toyama% mri_segstats --i 
lh.pial_lgi --slabel VC001_1 lh lh.frontoinsula.label --id 1 --sum sum.dat

$Id: mri_segstats.c,v 1.75.2.9 2013/02/16 00:09:33 greve Exp $
cwd
cmdline mri_segstats --i lh.pial_lgi --slabel VC001_1 lh lh.frontoinsula.label 
--id 1 --sum sum.dat
sysname  Darwin
hostname toyama-no-iMac.local
machine  x86_64
user toyama
UseRobust  0
Constructing seg from label
Segmentation fault

Could you help me please?

On Fri, Jan 17, 2020 at 11:56 AM Greve, Douglas N.,Ph.D. 
mailto:dgr...@mgh.harvard.edu>> wrote:
Sorry, it should have been --sum instead of --o
the subject name is subject_id
--id 1 just means to take the vertices in the label (--id 0 would mean to take 
the background)

On 1/16/2020 7:07 PM, Tien Pham wrote:

External Email - Use Caution

Thank you very much for your e-mail.
I tried, but this '' --o '' is unknown showing in terminal and the '' --id '' 
flag is subject name?
Could you please help me?
For example, I found the change in frontoinsula region between 2 groups in my 
dataset and I want to extract the values of this region.

On Fri, Jan 17, 2020 at 8:30 AM Greve, Douglas N.,Ph.D. 
mailto:dgr...@mgh.harvard.edu>> wrote:
It might be easier to use mri_segstats, eg,

mri_segstats --i lh.pial_lgi --slabel subject_id lh lh.untitled.label --id 1 
--o sum.dat

The mean value will be in the "Mean" column of the sum.dat


On 1/14/2020 7:08 PM, Tien Pham wrote:

External Email - Use Caution

Dear FreeSurfer Experts,

I am Tien Pham, I am stucked at this situation. I calculated longitudinal LGI 
changes in my data set with two time points using longitudinal pipeline. Now I 
would like to extract the regional LGI and gray matter volume in my 
longitudinal results using QDEC to draw the ROIs which is showed significant 
differences, label it and map to all subjects. Then I get the LGI value of the 
ROI I saved before using the command below:

cd $SUBJECTS_DIR
mris_anatomical_stats -l lh.untitled.label \
 -t lh.pial_lgi \
 -b \
 -f subject_id/stats/lh.untitled.stats subject_id lh

And this is the result:

[toyama-no-iMac:/applications/freesurfer/subjects] toyama% 
mris_anatomical_stats -l lh.frontoinsula.label \
? -t lh.pial_lgi \
? -b \
? -f VC019_1/stats/lh.frontoinsula.stats VC019_1 lh
limiting computations to label lh.frontoinsula.label.
using thickness file lh.pial_lgi.
reading volume /applications/freesurfer/subjects/VC019_1/mri/wm.mgz...
reading input surface /applications/freesurfer/subjects/VC019_1/surf/lh.white...
reading input pial surface 
/applications/freesurfer/subjects/VC019_1/surf/lh.pial...
reading input white surface 
/applications/freesurfer/subjects/VC019_1/surf/lh.white...

table columns are:
number of vertices
total surface area (mm^2)
total gray matter volume (mm^3)
average cortical thickness +- standard deviation (mm)
integrated rectified mean curvature
integrated rectified Gaussian curvature
folding index
intrinsic curvature index
structure name

 6595   4368  15935  3.311 0.895 0.158 0.077  13519.7  
lh.frontoinsula.label

As I saw there was no columns showing the LGI value, I did similar with gray 
matter volume, the result displayed the different in some values of the columns.
Could you please help me to explain about this?
Thank you very much.

Best regards,
Tien Pham



___
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 mailing list

Re: [Freesurfer] Retinotopy, design ill-conditioned

2020-01-21 Thread Greve, Douglas N.,Ph.D.
sorry, for the delay. The par files are both empty and that link cannot be 
found (maybe expired)

On 1/15/2020 11:24 AM, Marco Ninghetto wrote:

External Email - Use Caution

Sorry for the late reply, the message was non stop bounced.

So, here You will find:
- terminal output for `selxavg3-sess` (filename: terminal_output.txt). I copied 
only the last part when freesurfer accesses to MATLAB and where the error 
occurs;
- the mat file from expanding ring and for rotating wedge (filename: 
expring_SUBJ02_20191122.mat and 
rotwedge_SUBJ02_20191122.mat).
- paradigm files for expanding ring and for rotating wedge

Thank you for your precious help,
Marco

On Fri, 3 Jan 2020 at 17:51, Greve, Douglas N.,Ph.D. 
mailto:dgr...@mgh.harvard.edu>> wrote:
Can you send your paradigm files? Can you also send the terminal output? One 
more thing, can you send the X.mat file from the output folder?

On 1/2/2020 3:19 AM, Marco Ninghetto wrote:

External Email - Use Caution

Hello experts,
I'm performing retinotopy analysis but when running the command

selxavg3-sess

It starts, but after some lines, I get the following error:

ERROR: design is ill-conditioned

I don't know how to proceed from here to solve the error.
My retinotopy stimuli make 2 cycles (e.g.: rotating wedge makes 2 full cycles 
before quit) and each cycle takes 200 seconds to complete. TR is set to 2.5 
seconds.

Please, does anyone have any advice?
Thanks in advance,
Marco

--
---
Marco Ninghetto, PhD candidate
Laboratory of Neuroplasticity
Nencki Institute of Experimental Biology
Polish Academy of Sciences
3 Pasteur Street, 02-093 Warsaw, Poland



___
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


--
---
Marco Ninghetto, PhD candidate
Laboratory of Neuroplasticity
Nencki Institute of Experimental Biology
Polish Academy of Sciences
3 Pasteur Street, 02-093 Warsaw, Poland



___
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] Retinotopy, design ill-conditioned

2020-01-21 Thread Greve, Douglas N.,Ph.D.
Actually, I was able to get those files from your previous emails

On 1/15/2020 11:24 AM, Marco Ninghetto wrote:

External Email - Use Caution

Sorry for the late reply, the message was non stop bounced.

So, here You will find:
- terminal output for `selxavg3-sess` (filename: terminal_output.txt). I copied 
only the last part when freesurfer accesses to MATLAB and where the error 
occurs;
- the mat file from expanding ring and for rotating wedge (filename: 
expring_SUBJ02_20191122.mat and 
rotwedge_SUBJ02_20191122.mat).
- paradigm files for expanding ring and for rotating wedge

Thank you for your precious help,
Marco

On Fri, 3 Jan 2020 at 17:51, Greve, Douglas N.,Ph.D. 
mailto:dgr...@mgh.harvard.edu>> wrote:
Can you send your paradigm files? Can you also send the terminal output? One 
more thing, can you send the X.mat file from the output folder?

On 1/2/2020 3:19 AM, Marco Ninghetto wrote:

External Email - Use Caution

Hello experts,
I'm performing retinotopy analysis but when running the command

selxavg3-sess

It starts, but after some lines, I get the following error:

ERROR: design is ill-conditioned

I don't know how to proceed from here to solve the error.
My retinotopy stimuli make 2 cycles (e.g.: rotating wedge makes 2 full cycles 
before quit) and each cycle takes 200 seconds to complete. TR is set to 2.5 
seconds.

Please, does anyone have any advice?
Thanks in advance,
Marco

--
---
Marco Ninghetto, PhD candidate
Laboratory of Neuroplasticity
Nencki Institute of Experimental Biology
Polish Academy of Sciences
3 Pasteur Street, 02-093 Warsaw, Poland



___
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


--
---
Marco Ninghetto, PhD candidate
Laboratory of Neuroplasticity
Nencki Institute of Experimental Biology
Polish Academy of Sciences
3 Pasteur Street, 02-093 Warsaw, Poland



___
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] question about curv.mgh

2020-01-21 Thread Raffaele Dubbioso
External Email - Use Caution

Hello FS team,

can you please tell me what is the measurement scale of the curv.mg file?
Is it a mean curvature (mm-1) or a gaussian curvature (mm-2)? I got values
between 0.02 and -0.08 and it seems they are gaussian curvature.

Thanks a lot for your help

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

[Freesurfer] Qdec error

2020-01-21 Thread vittal korann
External Email - Use Caution

Dear FreeSurfer experts

I ran QDEC and got the following error.

Design matrix --
 1.0   1.04000  -1.38574   2.0   29.0   19.0;
 1.0   1.04000  -0.55066   2.0   35.0   19.0;
 1.0   1.03000   2.31721   2.0   23.0   14.0;
 1.0   1.03000  -0.22919   2.0   23.0   16.0;
 1.0   1.03000  -2.69688  -2.0   28.0   19.0;
 1.0   1.01000   0.84981  -2.0   22.0   19.0;
 1.0   1.01000   0.43845   2.0   36.0   21.0;
 1.0   1.06000   1.32888   2.0   28.0   17.0;
 1.0   1.02000   0.52292   2.0   34.0   22.0;
 1.0   1.02000   0.18104   2.0   32.0   17.0;
 1.0   1.03000  -0.33783  -2.0   32.0   22.0;
 1.0   1.04000   0.65805   2.0   30.0   17.0;
 1.0   1.03000   1.21888   2.0   37.0   10.0;
 1.0   1.02000   2.11598   2.0   29.0   10.0;
 1.0   1.02000  -0.02853   2.0   27.0   16.0;
 1.0   1.04000   0.21777   2.0   36.0   16.0;
 1.0   1.01000   0.30821   2.0   29.0   15.0;
 1.0   1.03000  -0.69389   2.0   30.0   12.0;
 1.0   1.04000   0.44792   2.0   23.0   15.0;
 1.0   1.03000   0.15876   2.0   28.0   15.0;
 1.0   1.02000  -1.05796   2.0   36.0   10.0;
 1.0   1.05000  -1.51878   2.0   32.0   15.0;
 1.0   1.03000  -0.91870  -2.0   30.0   15.0;

ERROR: matrix is ill-conditioned or badly scaled, condno = 68200

Possible problem with experimental design:
Check for duplicate entries and/or lack of range of
continuous variables within a class.
If you seek help with this problem, make sure to send:
  1. Your command line:
mri_glmfit.bin --y /usr/local/freesurfer/subjects/qdec/Untitled/y.mgh
--fsgd /usr/local/freesurfer/subjects/qdec/Untitled/qdec.fsgd dods --glmdir
/usr/local/freesurfer/subjects/qdec/Untitled --surf fsaverage lh --label
/usr/local/freesurfer/subjects/fsaverage/label/lh.aparc.label --C
/usr/local/freesurfer/subjects/qdec/Untitled/contrasts/lh-Avg-Intercept-thickness.mat
--C
/usr/local/freesurfer/subjects/qdec/Untitled/contrasts/lh-Avg-thickness-Vein_Avg_tort-Cor.mat

  2. The FSGD file (if using one)
  3. And the design matrix above
Attempting to diagnose further
SumSq: Min=4.795832 (col 1), Max=145.206757 (col 5)
 The scale is much different between columns 1 and 5, you may want to
 normalize by subtracting the mean and dividing by the standard deviation.

Any help would be appreciated!

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