External Email - Use Caution        

Hello Greve,
I am glad to tell you that after 3 hours, something did print more on terminal. when I was doing the GLM follow the tutorial, it only provided the example of the cortical thickness. And I did not know how to transfer it into volume.
Here is my commends

mris_preproc --fsgd FSGD/PDDvsHC.fsgd --cache-in volmue.fwhm10.fsaverage --target fsaverage --hemi lh --out lh.PDDvsHC.volume.10.mgh

 mri_glmfit --y lh.PDDvsHC.volume.10.mgh --fsgd FSGD/PDDvsHC.fsgd --C Contras-HC-PDD.mtx --surf fsaverage lh --cortex --glmdir lh.volume.PDDvsHC.glimdir --eres-save

 mri_glmfit-sim --glmdir rh.PDDvsHC.volume.glmdir --cache 1.3 pos --cwp 999 --2spaces

We I check the results, it still talked about the cortical thickness , so could you tell me how to change this commends to the volume of subcortical. Or do you have the example which use GLM for comparing the difference of subcortical volume between two groups.

Thanks so much for your help

Yours

Zeng

Here is the results


ClusterNo  Max   VtxMax   Size(mm^2)  MNIX   MNIY   MNIZ    CWP    CWPLow    CWPHi   NVtxs    WghtVtx   Annot


   1        6.960   86488   4544.63     15.7  -77.3    6.7  0.00020  0.00000  0.00040   7891    15125.67  pericalcarine


   2        3.529  158070   3287.33     55.0  -52.9    8.2  0.00020  0.00000  0.00040   6796    11225.54  inferiorparietal


   3        2.630   67804   1909.67     43.3   45.8   -9.3  0.00220  0.00140  0.00300   2858     4399.15  parsorbitalis

Here is the terminal output.

 

$Id: mri_glmfit.c,v 1.241.2.4 2016/12/08 22:02:40 zkaufman Exp $


cwd /Volumes/NIU20/volumetric_FS/glm


cmdline mri_glmfit.bin --glmdir lh.PDDvsHC.volume.glmdir --y lh.PDDvsHC.volume.10.mgh --fsgd FSGD/PDDvsHC.fsgd --C Contrasts/lh-thickness-HC-PDD.mtx --surface fsaverage lh --eres-save


sysname  Darwin


hostname dyn3199-104.wlan.ic.ac.uk


machine  x86_64


user     cengzhou


FixVertexAreaFlag = 1


UseMaskWithSmoothing     1


OneSampleGroupMean 0


y    /Volumes/NIU20/volumetric_FS/glm/lh.PDDvsHC.volume.10.mgh


logyflag 0


usedti  0


FSGD FSGD/PDDvsHC.fsgd


labelmask  /Volumes/NIU20/volumetric_FS/glm/fsaverage/label/lh.cortex.label


maskinv 0


glmdir lh.PDDvsHC.volume.glmdir


IllCondOK 0


ReScaleX 1


DoFFx 0


ResidualFWHM 14.826153


SearchSpace 73852.172969


anattype surface


 


 


cd /Volumes/NIU20/volumetric_FS/glm


/Applications/freesurfer/bin/mri_glmfit-sim


--glmdir rh.PDDvsHC.volume.glmdir --cache 1.3 pos --cwp 999 --2spaces


 


$Id: FreeSurferEnv.csh,v 1.89 2016/06/09 14:54:31 zkaufman Exp $


Mon Feb 18 15:52:07 GMT 2019


Darwin dyn3199-104.wlan.ic.ac.uk 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64


cengzhou


setenv SUBJECTS_DIR /Volumes/NIU20/volumetric_FS/glm


FREESURFER_HOME /Applications/freesurfer


 


Original mri_glmfit command line:


cmdline mri_glmfit.bin --glmdir rh.PDDvsHC.volume.glmdir --y rh.PDDvsHC.volume.10.mgh --fsgd FSGD/PDDvsHC.fsgd --C Contrasts/lh-thickness-HC-PDD.mtx --surface fsaverage rh --eres-save


 


DoSim = 0


UseCache = 1


DoPoll = 0


DoPBSubmit = 0


DoBackground = 0


DiagCluster = 0


gd2mtx = dods


fwhm = 14.506572


CSD /Applications/freesurfer/average/mult-comp-cor/fsaverage/rh/cortex/fwhm15/pos/th13/mc-z.csd


mri_surfcluster --in rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/sig.mgh --mask rh.PDDvsHC.volume.glmdir/mask.mgh --cwsig rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.mgh --sum rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.summary --ocn rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.ocn.mgh --annot aparc --cwpvalthresh 999 --o rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.masked.mgh --no-fixmni --csd /Applications/freesurfer/average/mult-comp-cor/fsaverage/rh/cortex/fwhm15/pos/th13/mc-z.csd --csdpdf rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.pdf.dat --vwsig rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.voxel.mgh --vwsigmax rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.voxel.max.dat --oannot rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.ocn.annot --bonferroni 2 --surf white


Creating CDFs from CSD files


csd->threshsign = 1


thsign = pos, id = 1


version $Id: mri_surfcluster.c,v 1.57.2.3 2016/11/17 18:19:42 zkaufman Exp $


hemi           = rh


srcid          = rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/sig.mgh


srcsubjid      = fsaverage


srcsurf        = white


srcframe       = 0


thsign         = pos


thmin          = 1.3


thmax          = -1


fdr            = -1


minarea        = 0


Bonferroni      = 2


xfmfile        = talairach.xfm


nth         = -1


outid    = rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.masked.mgh MGH


ocnid    = rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.ocn.mgh MGH


sumfile  = rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.summary


subjectsdir    = /Volumes/NIU20/volumetric_FS/glm


FixMNI = 0


Found 148399 vertices in mask


Found 148399 vertices in mask


Found 148399 points in clabel.


------------- XFM matrix (RAS2RAS) ---------------


/Volumes/NIU20/volumetric_FS/glm/fsaverage/mri/transforms/talairach.xfm


 1.00000   0.00000   0.00000   0.00000;


 0.00000   1.00000   0.00000   0.00000;


 0.00000   0.00000   1.00000   0.00000;


 0.00000   0.00000   0.00000   1.00000;


----------------------------------------------------


Reading source surface /Volumes/NIU20/volumetric_FS/glm/fsaverage/surf/rh.white


Done reading source surface


Reading annotation /Volumes/NIU20/volumetric_FS/glm/fsaverage/label/rh.aparc.annot


Computing metric properties


Loading source values


number of voxels in search space = 148399


Done loading source values (nvtxs = 163842)


overall max = 6.96049 at vertex 86488


overall min = -2.5107 at vertex 20214


surface nvertices 163842


metric props tot surface area 65020.839844


group_avg_vtxarea_loaded 1


masked surface area 75706.343750


Computing voxel-wise significance


CSDpvalMaxSigMap(): found 7717/163842 above 0, max=2.18117


Adjusting threshold for 1-tailed test.


If the input is not a -log10(p) volume, re-run with --no-adjust.


thminadj = 0.99897


Searching for Clusters ...


thmin=1.300000 (0.998970), thmax=-1.000000 (-1), thsignid=1, minarea=0.000000


Found 38 clusters


Max cluster size 4544.626465


Pruning by CW P-Value 999


Saving thresholded output to  rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.masked.mgh


Saving cluster numbers to rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.ocn.mgh


Saving cluster pval rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.mgh


Constructing output annotation


Writing annotation rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.ocn.annot


mri_segstats --seg rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.ocn.mgh --exclude 0 --i rh.PDDvsHC.volume.10.mgh --avgwf rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.y.ocn.dat --sum /tmp/mri_glmfit-sim.junk.40924


 


$Id: mri_segstats.c,v 1.121 2016/05/31 17:27:11 greve Exp $


cwd


cmdline mri_segstats --seg rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.ocn.mgh --exclude 0 --i rh.PDDvsHC.volume.10.mgh --avgwf rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.y.ocn.dat --sum /tmp/mri_glmfit-sim.junk.40924


sysname  Darwin


hostname dyn3199-104.wlan.ic.ac.uk


machine  x86_64


user     cengzhou


UseRobust  0


Loading rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.ocn.mgh


Loading rh.PDDvsHC.volume.10.mgh


Voxel Volume is 1 mm^3


Generating list of segmentation ids


Found  39 segmentations


Computing statistics for each segmentation


 


Reporting on  38 segmentations


Using PrintSegStat


Computing spatial average of each frame


  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19


 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37


Writing to rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.y.ocn.dat


mri_segstats done


mri_convert rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.mgh rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.mgh --frame 0


mri_convert.bin rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.mgh rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.mgh --frame 0


$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $


reading from rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.mgh...


TR=0.00, TE=0.00, TI=0.00, flip angle=0.00


i_ras = (-1, 0, 0)


j_ras = (0, 0, -1)


k_ras = (0, 1, 0)


keeping frame 0


writing to rh.PDDvsHC.volume.glmdir/rh-volume-HC-PDD/cache.th13.pos.sig.cluster.mgh...


Mon Feb 18 15:52:07 GMT 2019


Mon Feb 18 15:52:12 GMT 2019


mri_glmfit-sim done






------------------ Original ------------------
From:  "Greve, Douglas N.,Ph.D.";<DGREVE@mgh.harvard.edu>;
Send time: Saturday, Feb 16, 2019 4:03 AM
To: "freesurfer@nmr.mgh.harvard.edu"<freesurfer@nmr.mgh.harvard.edu>;
Subject:  Re: [Freesurfer] lh.PDDvsHC.thinckness.00.mris_preproc

how long?

On 2/15/19 2:49 PM, ÄÝ wrote:

        External Email - Use Caution       

Hi
Thanks for your quickly reply, yes continue to run but not print more on terminal anymore.

---Original---
From: "Greve, Douglas N.,Ph.D."<DGREVE@mgh.harvard.edu>
Date: Fri, Feb 15, 2019 19:01 PM
To: "freesurfer@nmr.mgh.harvard.edu"<freesurfer@nmr.mgh.harvard.edu>;
Subject: Re: [Freesurfer] lh.PDDvsHC.thinckness.00.mris_preproc

Do you mean that it continues to run but does not do anything (eg, print more to the terminal) or that it has crashed? If it is hanging, how long? Nothing looks suspicious in the output.

On 2/15/19 12:59 PM, ÄÝ wrote:

        External Email - Use Caution       

Hi Greve,
i solved this problem, but had a new one with recon-all, when i run the recon-all data, sometimes it hang in the very last step of the recon-all. here is the related part of output in terminal. i have attached the recon-all log and status log. Have a nice weekend!
cheers

#@# Curv .H and .K rh Fri Feb 15 17:30:27 GMT 2019

/Users/cengzhou/Desktop/volumetric_FS/subject1/subject/surf

\n mris_curvature -w rh.white.preaparc \n

total integrated curvature = 11.983*4pi (150.582) --> -11 handles

ICI = 180.5, FI = 1886.9, variation=29597.577

writing Gaussian curvature to /Users/cengzhou/Desktop/volumetric_FS/subject1/subject/surf/rh.white.preaparc.K...done.

writing mean curvature to /Users/cengzhou/Desktop/volumetric_FS/subject1/subject/surf/rh.white.preaparc.H...done.

rm -f rh.white.H

ln -s rh.white.preaparc.H rh.white.H

rm -f rh.white.K

ln -s rh.white.preaparc.K rh.white.K

\n mris_curvature -thresh .999 -n -a 5 -w -distances 10 10 rh.inflated \n

normalizing curvature values.

averaging curvature patterns 5 times.

sampling 10 neighbors out to a distance of 10 mm

148 vertices thresholded to be in k1 ~ [-1.38 0.32], k2 ~ [-0.18 0.09]

total integrated curvature = 0.554*4pi (6.968) --> 0 handles

ICI = 1.3, FI = 8.1, variation=139.341

115 vertices thresholded to be in [-0.05 0.02]

writing Gaussian curvature to /Users/cengzhou/Desktop/volumetric_FS/subject1/subject/surf/rh.inflated.K...thresholding curvature at 99.90% level

curvature mean = 0.000, std = 0.001

77 vertices thresholded to be in [-0.20 0.15]

done.

writing mean curvature to /Users/cengzhou/Desktop/volumetric_FS/subject1/subject/surf/rh.inflated.H...curvature mean = -0.018, std = 0.022

done.

\n#-----------------------------------------

#@# Curvature Stats lh Fri Feb 15 17:31:32 GMT 2019

/Users/cengzhou/Desktop/volumetric_FS/subject1/subject/surf

\n mris_curvature_stats -m --writeCurvatureFiles -G -o ../stats/lh.curv.stats -F smoothwm subject lh curv sulc \n

            Toggling save flag on curvature files                       [ ok ]

                Outputting results using filestem   [ ../stats/lh.curv.stats ]

            Toggling save flag on curvature files                       [ ok ]

                                  Setting surface      [ subject/lh.smoothwm ]

                                Reading surface...                       [ ok ]

                                  Setting texture                     [ curv ]

                                Reading texture...                       [ ok ]

                                  Setting texture                     [ sulc ]

                                Reading texture...Gb_filter = 0

                      [ ok ]

      Calculating Discrete Principal Curvatures...

  Determining geometric order for vertex faces... [####################] [ ok ]

                      Determining KH curvatures... [####################] [ ok ]

                    Determining k1k2 curvatures... [####################] [ ok ]

                                  deltaViolations                      [ 213 ]

Gb_filter = 0


WARN:    S lookup   min:                          -0.021311

WARN:    S explicit min:                          0.000000 vertex = 907

\n#-----------------------------------------

#@# Curvature Stats rh Fri Feb 15 17:31:38 GMT 2019

/Users/cengzhou/Desktop/volumetric_FS/subject1/subject/surf

\n mris_curvature_stats -m --writeCurvatureFiles -G -o ../stats/rh.curv.stats -F smoothwm subject rh curv sulc \n

            Toggling save flag on curvature files                       [ ok ]

                Outputting results using filestem   [ ../stats/rh.curv.stats ]

            Toggling save flag on curvature files                       [ ok ]

                                  Setting surface      [ subject/rh.smoothwm ]

                                Reading surface...                       [ ok ]

                                  Setting texture                     [ curv ]

                                Reading texture...                       [ ok ]

                                  Setting texture                     [ sulc ]

                                Reading texture...Gb_filter = 0

                      [ ok ]

      Calculating Discrete Principal Curvatures...

  Determining geometric order for vertex faces... [####################] [ ok ]

                      Determining KH curvatures... [####################] [ ok ]

                    Determining k1k2 curvatures... [####################] [ ok ]

                                  deltaViolations                      [ 257 ]

Gb_filter = 0


WARN:    S lookup   min:                          -0.254695

WARN:    S explicit min:        

@# Sphere lh Fri Feb 15 17:31:44 GMT 2019

/Users/cengzhou/Desktop/volumetric_FS/subject1/subject/scripts

\n mris_sphere -rusage /Users/cengzhou/Desktop/volumetric_FS/subject1/subject/touch/rusage.mris_sphere.lh.dat -seed 1234 ../surf/lh.inflated ../surf/lh.sphere \n

setting seed for random number genererator to 1234

$Id: mris_sphere.c,v 1.61 2016/01/20 23:42:15 greve Exp $

  $Id: mrisurf.c,v 1.781.2.6 2016/12/27 16:47:14 zkaufman Exp $

reading original vertex positions...

unfolding cortex into spherical form...

surface projected - minimizing metric distortion...


== Number of threads available to mris_sphere for OpenMP = 1 ==

scaling brain by 0.321...

MRISunfold() max_passes = 1 -------

tol=5.0e-01, sigma=0.0, host=cengz, nav=1024, nbrs=2, l_area=1.000, l_dist=1.000

using quadratic fit line minimization

complete_dist_mat 0

rms 0

smooth_averages 0

remove_neg 0

ico_order 0

which_surface 0

target_radius 0.000000

nfields 0

scale 1.000000

desired_rms_height -1.000000

momentum 0.900000

nbhd_size 7

max_nbrs 8

niterations 25

nsurfaces 0

SURFACES 3

flags 0 (0)

use curv 0

no sulc 0

no rigid align 0

mris->nsize 2

mris->hemisphere 0

randomSeed 1234


------------------ Original ------------------
From:  "Greve, Douglas N.,Ph.D.";<DGREVE@mgh.harvard.edu>;
Send time: Tuesday, Feb 12, 2019 0:41 AM
Subject:  Re: [Freesurfer] lh.PDDvsHC.thinckness.00.mris_preproc

can you send the full mri_surf2surf terminal output?

On 2/11/19 8:08 AM, ÄÝ wrote:
>
>         External Email - Use Caution
>
> Hello FreeSurfer Developers,
>
> I didn't cache the data during recon-all, so I ran the
>
> >        following:
>
> >
>
> >               mris_preproc ¨Cfsgd PDDvsHC.fsgd --target fsaverage
>
> >        --hemi lh
>
> >               --meas thickness --out lh.MMSE-AD.thickness.00.mgh
>
> >
>
> >               It seemed to run smoothly (I've attached the log below)
>
> >        so I
>
> >               ran the next step:
>
> >
>
> >               mri_surf2surf --hemi lh --s fsaverage --sval
>
> >               lh.PDDvsHC.thickness.00.mgh --fwhm 10 --cortex --tval
>
> >               lh.PDDvsHC.thickness.10.mgh
>
> >
>
> >               I got the following error:
>
> >
>
> >               Reading source surface reg
>
> >             
>
> >       freesurfer/subjects/fsaverage/surf/lh.sphere.reg
>
> >               Loading source data
>
> >             
>
> >         
>
> mghRead(/Users/cengzhou/Desktop/volumetric_FS/FS/lh.PDDvsHC.thickness.00.mgh,
> -1): could not open file
>
> recon-all.log: see attached
>
> Platform: mac os 10
>
>
> _______________________________________________
> 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