Re: [Freesurfer] -openmp 8 and -use-gpu questions

2015-05-01 Thread Krieger, Donald N.
Thanks very much for getting back so quickly.
The processing times were 5-6 hours for all instances.
There is an incremental but only modest improvement for 4/6 vs 8/12 processors.
I'll put up more information on the list when I've finished thinking this 
through.

Regards,
 
Don
 

Don Krieger, Ph.D.
Department of Neurological Surgery
University of Pittsburgh
(412)648-9654 Office
(412)521-4431 Cell/Text


> -Original Message-
> From: freesurfer-boun...@nmr.mgh.harvard.edu [mailto:freesurfer-
> boun...@nmr.mgh.harvard.edu] On Behalf Of zkauf...@nmr.mgh.harvard.edu
> Sent: Friday, May 01, 2015 1:41 AM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] -openmp 8 and -use-gpu questions
> 
> > I'm testing the total processing time of recon-all -all using -openmp
> > 4,6,8,12 .
> > The runs with 4 and 6 threads took almost the same amount of time.
> > The runs with 8 and 12 threads took almost the same amount of time.
> >
> > (1)Is the work divided evenly between the threads (mri_ca_register,
> > mri_en_register)?   Or is 4 or 8 preferred and 6 and 12 don't buy you
> > anything?
> 
> 
> I can verify that the gain in processing time due to additional threads falls 
> off
> rapidly with very little gain after 4. I dont know the exact times you got 
> from
> your tests, and I havent done a time analysis in awhile, but we've never 
> noticed
> a correlation preferring 4 and 8 threads over 6 and 12. However its an
> interesting result and could very well be the case.
> 
> 
> > (2)Is there a sync point in the software so that all the "other"
> > threads wait for the slowest one to complete.
> 
> 
> I dont do much of the openmp programming within freesurfer (only for
> debugging purposes) but as far as I can tell all the openmp relevant code 
> blocks
> occur at for-loop where threads are all created and diverge simultaneously and
> then sync and at the same time at the conclusion of the for-loop.
> 
> If you have an 8-12 processor machine and are looking to reduce your runtimes
> you can take advantage of the fact that the left and right hemispheres can be
> processed independently during the autorecon2 stage.
> You could write a custom script along the lines of:
> 
>   recon-all -s subj -autorecon1
>   recon-all -s subj -autorecon2-volonly
>   recon-all -s subj -autorecon2-perhemi -hemi rh -log recon-all-hemi rh.log -
> notify rh-done.log -openmp 4 &
>   recon-all -s subj -autorecon2-perhemi -hemi lh -log recon-all-hemi-lh.log -
> notify lh-done.log -openmp 4 &
>   while (rh-done.log AND lh-done.log do not both exist)
>   do
> sleep 1
>   end loop
>   recon-all -s -autorecon3
> 
> >
> > Also, I tried a run with -use-gpu.
> > I had to add a directory to LD_LIBRARY_PATH or I get an error on
> > failure to find one of the libcuda's That is now ok but I get the
> > following:
> >
> > Testing for CUDA device:
> > ERROR: Unable to acquire a CUDA device!
> > nvcc: NVIDIA (R) Cuda compiler driver
> > Copyright (c) 2005-2012 NVIDIA Corporation Built on
> > Fri_Sep_21_17:28:58_PDT_2012 Cuda compilation tools, release 5.0,
> > V0.2.1221
> >
> > Acquiring CUDA device
> > Using default device
> > Linux comet-30-08.sdsc.edu 3.10.73-1.el6.elrepo.x86_64 #1 SMP Thu Mar
> > 26
> > 16:28:30 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
> >
> > recon-all -s 173_1gpu exited with ERRORS at Thu Apr 30 09:17:42 PDT
> > 2015_PATH  but then I get the following error:
> >
> > Any thoughts would be welcome.
> >
> > Thanks,
> >
> 
> 
> Sorry but weve completely abandoned all support of CUDA in favor of openmp.
> That said, people successfully have and still do use cuda with freesurfer 
> v5.3.
> Assuming you have a cuda device compatible with the cuda libs shipped with
> freesurfer it should simply work without you having to modify
> LD_LIBRARY_PATH, but perhaps someone who has had success in this relm can
> chime in.
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine
> at http://www.partners.org/complianceline . If the e-mail was sent to you in
> error but does not contain patient information, please contact the sender and
> properly dispose of the e-mail.


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


[Freesurfer] 2 factor design. error: matrix is ill-conditioned or badly scaled

2015-05-01 Thread Sanne Oostermeijer
Dear Sir/Madam,

For our longitudinal analyses in freesurfer (5.1) we have a design similar to 
http://freesurfer.net/fswiki/Fsgdf6G0V
However we have 2 factor: one is 3 levels (G1/G2/G3); one is 2 level 
(Male/Female), and a (continues) covariate, and we cant run the analysis due to 
the error: matrix is ill-conditioned or badly scaled, condno = 1e+08.
Is there a way to run this design?
FSGD file and error are attached


> We have the following design:
>
> GroupDescriptorFile 1
> Title SES1-lh-rate-25-sex
> MeasurementName long.thickness-rate
> Class sexfemale-groupG3
> Class sexmale-groupG3
> Class sexfemale-groupG1
> Class sexmale-groupG1
> Class sexfemale-groupG2
> Class sexmale-groupG2
> Variables ses
> Input 110 sexfemale-groupG3 73.40
> Input 218 sexfemale-groupG1 86.20
> Input 221 sexfemale-groupG2 66.10
> Input 227 sexfemale-groupG3 32.40
> Input 331 sexmale-groupG1 31.70
> Input 352 sexfemale-groupG3 65.00
> Input 353 sexmale-groupG1 38.50
> Input 413 sexfemale-groupG3 29.80
> Input 503 sexmale-groupG1 60.10
> Input 711 sexfemale-groupG3 40.00
> Input 915 sexfemale-groupG3 56.20
>
> When trying to run it we get the following error: matrix is ill-conditioned 
> or badly scaled, condno = 1e+08 (see below)
>
> $ mri_glmfit --glmdir output --y y.mgh --fsgd qdec.fsgd --C g1vsg2.mtx --C 
> g1vsg3.mtx --C g2vsg3.mtx --C group.effect.mtx --surf fsaverage lh
> gdfReadHeader: reading qdec.fsgd
> INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done.
> Continuous Variable Means (all subjects)
> 0 ses 57.3925 20.6843
> Class Means of each Continuous Variable
> 1 sexfemale-groupG3  56.7805
> 2 sexmale-groupG3  58.0429
> 3 sexfemale-groupG1  59.7200
> 4 sexmale-groupG1  55.9400
> 5 sexfemale-groupG2  66.1000
> 6 sexmale-groupG2  55.8200
> INFO: gd2mtx_method is dods
> Reading source surface 
> /gpfs/M2Home/soostermeijer/Monash076/Chao/Projects/ADS_FS/Data/fsaverage/surf/lh.white
> Number of vertices 163842
> Number of faces327680
> Total area 65416.648438
> AvgVtxArea   0.399267
> AvgVtxDist   0.721953
> StdVtxDist   0.195470
>
> $Id: mri_glmfit.c,v 1.196.2.6 2011/05/05 20:54:25 greve Exp $
> cwd 
> /gpfs/M2Home/projects/Monash076/Chao/Projects/ADS_FS/Data/qdec/SES1-lh-rate-25-sex
> cmdline mri_glmfit --glmdir output --y y.mgh --fsgd qdec.fsgd --C g1vsg2.mtx 
> --C g1vsg3.mtx --C g2vsg3.mtx --C group.effect.mtx --surf fsaverage lh
> sysname  Linux
> hostname m2107
> machine  x86_64
> user soostermeijer
> FixVertexAreaFlag = 1
> UseMaskWithSmoothing 1
> OneSampleGroupMean 0
> y
> /gpfs/M2Home/projects/Monash076/Chao/Projects/ADS_FS/Data/qdec/SES1-lh-rate-25-sex/y.mgh
> logyflag 0
> usedti  0
> FSGD qdec.fsgd
> labelmask  
> /gpfs/M2Home/soostermeijer/Monash076/Chao/Projects/ADS_FS/Data/fsaverage/label/lh.cortex.label
> maskinv 0
> glmdir output
> IllCondOK 0
> ReScaleX 1
> DoFFx 0
> Creating output directory output
> Loading y from 
> /gpfs/M2Home/projects/Monash076/Chao/Projects/ADS_FS/Data/qdec/SES1-lh-rate-25-sex/y.mgh
> INFO: gd2mtx_method is dods
> Saving design matrix to output/Xg.dat
> Normalized matrix condition is 1e+08
> Design matrix --
> 1.000   0.000   0.000   0.000   0.000   0.000   73.400   0.000   0.000   
> 0.000   0.000   0.000;
> 0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   86.200   
> 0.000   0.000   0.000;
> 0.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000 
>   66.100   0.000;
> 1.000   0.000   0.000   0.000   0.000   0.000   32.400   0.000   0.000   
> 0.000   0.000   0.000;
> 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
> 31.700   0.000   0.000;
> 1.000   0.000   0.000   0.000   0.000   0.000   65.000   0.000   0.000   
> 0.000   0.000   0.000;
> 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
> 38.500   0.000   0.000;
> 1.000   0.000   0.000   0.000   0.000   0.000   29.800   0.000   0.000   
> 0.000   0.000   0.000;
> 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
> 60.100   0.000   0.000;
> 1.000   0.000   0.000   0.000   0.000   0.000   40.000   0.000   0.000   
> 0.000   0.000   0.000;
> 1.000   0.000   0.000   0.000   0.000   0.000   56.200   0.000   0.000   
> 0.000   0.000   0.000;
> 0.000   1.000   0.000   0.000   0.000   0.000   0.000   32.100   0.000   
> 0.000   0.000   0.000;
> 0.000   1.000   0.000   0.000   0.000   0.000   0.000   47.800   0.000   
> 0.000   0.000   0.000;
> 0.000   1.000   0.000   0.000   0.000   0.000   0.000   14.400   0.000   
> 0.000   0.000   0.000;
> 0.000   1.000   0.000   0.000   0.000   0.000   0.000   58.300   0.000   
> 0.000   0.000   0.000;
> 1.000   0.000   0.000   0.000   0.000   0.000   49.200   0.000   0.000   
> 0.000   0.000   0.000;
> 0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   79.300   
> 0.000   0.000   0.000;
> 1.000   0.000   0.000   0.000   0.000   0.000   45.000   0.000   0.000   
> 

Re: [Freesurfer] -openmp 8 and -use-gpu questions

2015-05-01 Thread Bruce Fischl
perhaps Nick can comment, but I think the issue is with the memory 
controller not being efficient with N>4 threads running


cheers
Bruce


On Fri, 1 May 2015, Krieger, Donald N. wrote:


Thanks very much for getting back so quickly.
The processing times were 5-6 hours for all instances.
There is an incremental but only modest improvement for 4/6 vs 8/12 processors.
I'll put up more information on the list when I've finished thinking this 
through.

Regards,
 
Don
 

Don Krieger, Ph.D.
Department of Neurological Surgery
University of Pittsburgh
(412)648-9654 Office
(412)521-4431 Cell/Text



-Original Message-
From: freesurfer-boun...@nmr.mgh.harvard.edu [mailto:freesurfer-
boun...@nmr.mgh.harvard.edu] On Behalf Of zkauf...@nmr.mgh.harvard.edu
Sent: Friday, May 01, 2015 1:41 AM
To: Freesurfer support list
Subject: Re: [Freesurfer] -openmp 8 and -use-gpu questions


I'm testing the total processing time of recon-all -all using -openmp
4,6,8,12 .
The runs with 4 and 6 threads took almost the same amount of time.
The runs with 8 and 12 threads took almost the same amount of time.

(1)Is the work divided evenly between the threads (mri_ca_register,
mri_en_register)?   Or is 4 or 8 preferred and 6 and 12 don't buy you
anything?



I can verify that the gain in processing time due to additional threads falls 
off
rapidly with very little gain after 4. I dont know the exact times you got from
your tests, and I havent done a time analysis in awhile, but we've never noticed
a correlation preferring 4 and 8 threads over 6 and 12. However its an
interesting result and could very well be the case.



(2)Is there a sync point in the software so that all the "other"
threads wait for the slowest one to complete.



I dont do much of the openmp programming within freesurfer (only for
debugging purposes) but as far as I can tell all the openmp relevant code blocks
occur at for-loop where threads are all created and diverge simultaneously and
then sync and at the same time at the conclusion of the for-loop.

If you have an 8-12 processor machine and are looking to reduce your runtimes
you can take advantage of the fact that the left and right hemispheres can be
processed independently during the autorecon2 stage.
You could write a custom script along the lines of:

  recon-all -s subj -autorecon1
  recon-all -s subj -autorecon2-volonly
  recon-all -s subj -autorecon2-perhemi -hemi rh -log recon-all-hemi rh.log -
notify rh-done.log -openmp 4 &
  recon-all -s subj -autorecon2-perhemi -hemi lh -log recon-all-hemi-lh.log -
notify lh-done.log -openmp 4 &
  while (rh-done.log AND lh-done.log do not both exist)
  do
sleep 1
  end loop
  recon-all -s -autorecon3



Also, I tried a run with -use-gpu.
I had to add a directory to LD_LIBRARY_PATH or I get an error on
failure to find one of the libcuda's That is now ok but I get the
following:

Testing for CUDA device:
ERROR: Unable to acquire a CUDA device!
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation Built on
Fri_Sep_21_17:28:58_PDT_2012 Cuda compilation tools, release 5.0,
V0.2.1221

Acquiring CUDA device
Using default device
Linux comet-30-08.sdsc.edu 3.10.73-1.el6.elrepo.x86_64 #1 SMP Thu Mar
26
16:28:30 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

recon-all -s 173_1gpu exited with ERRORS at Thu Apr 30 09:17:42 PDT
2015_PATH  but then I get the following error:

Any thoughts would be welcome.

Thanks,




Sorry but weve completely abandoned all support of CUDA in favor of openmp.
That said, people successfully have and still do use cuda with freesurfer v5.3.
Assuming you have a cuda device compatible with the cuda libs shipped with
freesurfer it should simply work without you having to modify
LD_LIBRARY_PATH, but perhaps someone who has had success in this relm can
chime in.

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine
at http://www.partners.org/complianceline . If the e-mail was sent to you in
error but does not contain patient information, please contact the sender and
properly dispose of the e-mail.



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


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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners

Re: [Freesurfer] Incomplete Cerebellum Segmentation

2015-05-01 Thread Ani Varjabedian

Hi Jessica,

If you want to regenerate the aseg and surfaces you will need to run the 
subject through the rest of the recon-all pipeline (autorecon2 and 
autorecon3).

The -skullstrip is only going to redo that specific step.

Thank you,
Ani Varjabedian


On 04/30/2015 02:00 PM, Jessica Lynn Hanson wrote:


Hi Freesurfers,


I've just completed recon-all -all and pulled up the brain in 
Freesurfer V5.0 on my Linux machine, and realized I needed to run the 
following command "recon-all -skullstrip -wsthresh 30 -clean-bm 
-no-wsgcaatlas -s sub122.fs" to pick up cerebellum that was missing.  
After the command finished the cerebellum was present, but the aseg 
was incompletely segmented (see attached.)  The command I used to view 
the brain is "tkmedit sub122.fs brainmask.mgz -aux T1.mgz -surfs -aseg".



Do you have any advice as to how I can remedy this?


Thanks for your time!!!


*Jessica Hanson*

Project Manager

Affective Neuroscience Laboratory

University of Wisconsin- Milwaukee

Trauma Surgery Department

Froedtert Hospital of Wisconsin



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


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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] 2 factor design. error: matrix is ill-conditioned or badly scaled

2015-05-01 Thread Douglas Greve
Try demeaning your covariates, ie, compute the mean of all ses values, 
then subtract that from each value.
doug

On 5/1/15 7:25 AM, Sanne Oostermeijer wrote:
> Dear Sir/Madam,
>
> For our longitudinal analyses in freesurfer (5.1) we have a design similar to 
> http://freesurfer.net/fswiki/Fsgdf6G0V
> However we have 2 factor: one is 3 levels (G1/G2/G3); one is 2 level 
> (Male/Female), and a (continues) covariate, and we cant run the analysis due 
> to the error: matrix is ill-conditioned or badly scaled, condno = 1e+08.
> Is there a way to run this design?
> FSGD file and error are attached
>
>
>> We have the following design:
>>
>> GroupDescriptorFile 1
>> Title SES1-lh-rate-25-sex
>> MeasurementName long.thickness-rate
>> Class sexfemale-groupG3
>> Class sexmale-groupG3
>> Class sexfemale-groupG1
>> Class sexmale-groupG1
>> Class sexfemale-groupG2
>> Class sexmale-groupG2
>> Variables ses
>> Input 110 sexfemale-groupG3 73.40
>> Input 218 sexfemale-groupG1 86.20
>> Input 221 sexfemale-groupG2 66.10
>> Input 227 sexfemale-groupG3 32.40
>> Input 331 sexmale-groupG1 31.70
>> Input 352 sexfemale-groupG3 65.00
>> Input 353 sexmale-groupG1 38.50
>> Input 413 sexfemale-groupG3 29.80
>> Input 503 sexmale-groupG1 60.10
>> Input 711 sexfemale-groupG3 40.00
>> Input 915 sexfemale-groupG3 56.20
>>
>> When trying to run it we get the following error: matrix is ill-conditioned 
>> or badly scaled, condno = 1e+08 (see below)
>>
>> $ mri_glmfit --glmdir output --y y.mgh --fsgd qdec.fsgd --C g1vsg2.mtx --C 
>> g1vsg3.mtx --C g2vsg3.mtx --C group.effect.mtx --surf fsaverage lh
>> gdfReadHeader: reading qdec.fsgd
>> INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done.
>> Continuous Variable Means (all subjects)
>> 0 ses 57.3925 20.6843
>> Class Means of each Continuous Variable
>> 1 sexfemale-groupG3  56.7805
>> 2 sexmale-groupG3  58.0429
>> 3 sexfemale-groupG1  59.7200
>> 4 sexmale-groupG1  55.9400
>> 5 sexfemale-groupG2  66.1000
>> 6 sexmale-groupG2  55.8200
>> INFO: gd2mtx_method is dods
>> Reading source surface 
>> /gpfs/M2Home/soostermeijer/Monash076/Chao/Projects/ADS_FS/Data/fsaverage/surf/lh.white
>> Number of vertices 163842
>> Number of faces327680
>> Total area 65416.648438
>> AvgVtxArea   0.399267
>> AvgVtxDist   0.721953
>> StdVtxDist   0.195470
>>
>> $Id: mri_glmfit.c,v 1.196.2.6 2011/05/05 20:54:25 greve Exp $
>> cwd 
>> /gpfs/M2Home/projects/Monash076/Chao/Projects/ADS_FS/Data/qdec/SES1-lh-rate-25-sex
>> cmdline mri_glmfit --glmdir output --y y.mgh --fsgd qdec.fsgd --C g1vsg2.mtx 
>> --C g1vsg3.mtx --C g2vsg3.mtx --C group.effect.mtx --surf fsaverage lh
>> sysname  Linux
>> hostname m2107
>> machine  x86_64
>> user soostermeijer
>> FixVertexAreaFlag = 1
>> UseMaskWithSmoothing 1
>> OneSampleGroupMean 0
>> y
>> /gpfs/M2Home/projects/Monash076/Chao/Projects/ADS_FS/Data/qdec/SES1-lh-rate-25-sex/y.mgh
>> logyflag 0
>> usedti  0
>> FSGD qdec.fsgd
>> labelmask  
>> /gpfs/M2Home/soostermeijer/Monash076/Chao/Projects/ADS_FS/Data/fsaverage/label/lh.cortex.label
>> maskinv 0
>> glmdir output
>> IllCondOK 0
>> ReScaleX 1
>> DoFFx 0
>> Creating output directory output
>> Loading y from 
>> /gpfs/M2Home/projects/Monash076/Chao/Projects/ADS_FS/Data/qdec/SES1-lh-rate-25-sex/y.mgh
>> INFO: gd2mtx_method is dods
>> Saving design matrix to output/Xg.dat
>> Normalized matrix condition is 1e+08
>> Design matrix --
>> 1.000   0.000   0.000   0.000   0.000   0.000   73.400   0.000   0.000   
>> 0.000   0.000   0.000;
>> 0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   86.200   
>> 0.000   0.000   0.000;
>> 0.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   
>> 0.000   66.100   0.000;
>> 1.000   0.000   0.000   0.000   0.000   0.000   32.400   0.000   0.000   
>> 0.000   0.000   0.000;
>> 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
>> 31.700   0.000   0.000;
>> 1.000   0.000   0.000   0.000   0.000   0.000   65.000   0.000   0.000   
>> 0.000   0.000   0.000;
>> 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
>> 38.500   0.000   0.000;
>> 1.000   0.000   0.000   0.000   0.000   0.000   29.800   0.000   0.000   
>> 0.000   0.000   0.000;
>> 0.000   0.000   0.000   1.000   0.000   0.000   0.000   0.000   0.000   
>> 60.100   0.000   0.000;
>> 1.000   0.000   0.000   0.000   0.000   0.000   40.000   0.000   0.000   
>> 0.000   0.000   0.000;
>> 1.000   0.000   0.000   0.000   0.000   0.000   56.200   0.000   0.000   
>> 0.000   0.000   0.000;
>> 0.000   1.000   0.000   0.000   0.000   0.000   0.000   32.100   0.000   
>> 0.000   0.000   0.000;
>> 0.000   1.000   0.000   0.000   0.000   0.000   0.000   47.800   0.000   
>> 0.000   0.000   0.000;
>> 0.000   1.000   0.000   0.000   0.000   0.000   0.000   14.400   0.000   
>> 0.000   0.000   0.000;
>> 0.000   1.000   0.000   0.000   0.000   0.000   0.000   58.300   0.000   
>> 0.000   0.000 

[Freesurfer] glmfit-sim question

2015-05-01 Thread Hirsch, Gabriella
Hi FS experts,

I had a quick question about glmfit-sim in monte carlo.

I have followed the FS wiki by using the following command to correct for 
multiple comparisons separately on both hemispheres:

mri_glmfit-sim \
--glmdir_?h.xxx.glmdir \
--sim mc-z 1 1.3 mc-z.absolute \
--sim-sign abs --cwpvalthresh 0.05 \
--overwrite

However I've been reading the mail archive and it seems it is necessary to do a 
bonferroni correction on both hemispheres as well.

My questions are:

1.I can add the --2spaces flag at the end even though I'm using FS v5.3?
2. If not, do I have to change my cwpvalthresh (i.e. to 0.025) or do I need to 
change the -log10(p) value in the third line?

Any help would be appreciated.

P.S
FYI I'm running a simple group analysis on two groups (1 group 2 levels, using 
a 1 -1 contrast).

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


[Freesurfer] problem with left/right parallelization

2015-05-01 Thread Krieger, Donald N.
I have successful runs of recon-all -autorecon1 and recon-all 
-autorecon2-volonly per your suggested sequence:
recon-all -s subj -autorecon1
recon-all -s subj -autorecon2-volonly
recon-all -s subj -autorecon2-perhemi -hemi rh -log recon-all-hemi rh.log 
-notify rh-done.log -openmp 4 &
recon-all -s subj -autorecon2-perhemi -hemi lh -log recon-all-hemi-lh.log 
-notify lh-done.log -openmp 4 &
while (rh-done.log AND lh-done.log do not both exist)
do
   sleep 1
end loop
recon-all -s -autorecon3

However my 2 runs of recon-all -autorecon2-perhemi are ending with no errors 
but after just a few seconds.
Is this correct?
Are there other functions which should be getting executed?
???

Here is one of the 2 recon-all commands.  The 2 log files are attached.
  recon-all   \
-s ${SubNo} \
-autorecon2-perhemi  \
-hemi rh   \
-log ${WD}/${SubNo}/recon-all-hemi_rh.log  \
-notify ${WD}/${SubNo}/rh-done.log  \
-openmp ${nCpus}   \
-no-isrunning   \

&


Thanks,

Don


Don Krieger, Ph.D.
Department of Neurological Surgery
University of Pittsburgh



recon-all-hemi_lh.log
Description: recon-all-hemi_lh.log


recon-all-hemi_rh.log
Description: recon-all-hemi_rh.log
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] glmfit-sim question

2015-05-01 Thread Douglas Greve



On 5/1/15 10:13 AM, Hirsch, Gabriella wrote:


Hi FS experts,

I had a quick question about glmfit-sim in monte carlo.

I have followed the FS wiki by using the following command to correct 
for multiple comparisons separately on both hemispheres:


mri_glmfit-sim \

--glmdir_?h.xxx.glmdir \

--sim mc-z 1 1.3 mc-z.absolute \

--sim-sign abs --cwpvalthresh 0.05 \

--overwrite

However I’ve been reading the mail archive and it seems it is 
necessary to do a bonferroni correction on both hemispheres as well.


My questions are:

1.I can add the --2spaces flag at the end even though I’m using FS v5.3?


Yes


2. If not, do I have to change my cwpvalthresh (i.e. to 0.025) or do I 
need to change the –log10(p) value in the third line?



That would work too.


Any help would be appreciated.

P.S

FYI I’m running a simple group analysis on two groups (1 group 2 
levels, using a 1 -1 contrast).


Thanks!

Gabriella



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


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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


[Freesurfer] binary noise regressor

2015-05-01 Thread SHAHIN NASR
Hi Surfers
I want to remove the possible effects of a binary noise (electric
shock) from the evoked fMRI.  To do so, I have generated a regressor file
in which all TRs in which electric shock has been applied are marked as 1
and the rest of TRs are 0.  I just want to be sure that, this is all I need
to do for the regressor!
   A sample regressor file is attached.  It has 98 rows corresponding to 98
TRs that we have in the experiment!

Regards

-- 
Shahin Nasr

PhD in Cognitive Neuroscience
Martinos Imaging Center, MGH
Harvard Medical School


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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] binary noise regressor

2015-05-01 Thread Douglas Greve
That will do what you want if you expect the shock to have the same 
response to each application. Alternatively, you can set up a time point 
exclude file to exclude those time points. If you use this, then create 
the file by putting the time in seconds of the time points you want to 
exclude.
doug

On 5/1/15 11:45 AM, SHAHIN NASR wrote:
> Hi Surfers
> I want to remove the possible effects of a binary noise (electric 
> shock) from the evoked fMRI.  To do so, I have generated a regressor 
> file in which all TRs in which electric shock has been applied are 
> marked as 1 and the rest of TRs are 0.  I just want to be sure that, 
> this is all I need to do for the regressor!
>A sample regressor file is attached.  It has 98 rows corresponding 
> to 98 TRs that we have in the experiment!
>
> Regards
>
> -- 
> Shahin Nasr
>
> PhD in Cognitive Neuroscience
> Martinos Imaging Center, MGH
> Harvard Medical School
>

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] binary noise regressor

2015-05-01 Thread Douglas Greve
I don't necessarily think the exclude file is a better approach. What 
you are doing is probably fine.
doug

On 5/1/15 12:12 PM, sha...@nmr.mgh.harvard.edu wrote:
> Hi Doug,
> The reason that we did not use that 'exclusion method' was that, we
> were not sure if the effect of shock is limited to that specific TR.
> Actually, like other stimuli/events, we expected shock effect to appear
> slightly (1-2 TRs) later.  In this case, don't you think using a
> regressor is a safer approach?
>  To clarify, I am very open to your suggestions if you have a better
> idea or if you still think that exclusion is a better approach.
>
>
>
>> That will do what you want if you expect the shock to have the same
>> response to each application. Alternatively, you can set up a time point
>> exclude file to exclude those time points. If you use this, then create
>> the file by putting the time in seconds of the time points you want to
>> exclude.
>> doug
>>
>> On 5/1/15 11:45 AM, SHAHIN NASR wrote:
>>> Hi Surfers
>>>  I want to remove the possible effects of a binary noise (electric
>>> shock) from the evoked fMRI.  To do so, I have generated a regressor
>>> file in which all TRs in which electric shock has been applied are
>>> marked as 1 and the rest of TRs are 0.  I just want to be sure that,
>>> this is all I need to do for the regressor!
>>> A sample regressor file is attached.  It has 98 rows corresponding
>>> to 98 TRs that we have in the experiment!
>>>
>>> Regards
>>>
>>> --
>>> Shahin Nasr
>>>
>>> PhD in Cognitive Neuroscience
>>> Martinos Imaging Center, MGH
>>> Harvard Medical School
>>>
>>
>>
>

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



[Freesurfer] Tksurfer_Visualization issue

2015-05-01 Thread Alshikho, Mohamad J.
Hi Doug,
I finished running FSFAST on fmri data set. I corrected the data for multiple 
comparison.In order to visualize the results  I ran the following command line:

tksurfer fsaverage lh inflated -overlay cache.th30.pos.sig.cluster.nii.gz 
-annot cache.th30.pos.sig.ocn.annot -fminmax 1.3 3

I attached two figures (figure 1 is for two groups and no covariates; Figure 2 
is for OSGM)  from the output of this command line:

My questions are:
1. I understood from figure 1 that the yellow color is the annotation's color 
which survived after correcting the results for multiple comparison. Is this 
correct?
2. What are the green and magenta colors means ( the lines around the yellow 
color)?
3. For some cases I noticed that after correcting for multiple comparisons I 
have one or two significant annotations in the file 
"cache.th30.pos.sig.cluster.summary" but when I ran the previous command line I 
see the yellow color is covering wide areas of the brain like how it looks like 
in figure 2. So how can I explain that? Is it related to something wrong in the 
analysis?


Thanks 
Mohamad

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


[Freesurfer] Still time to register for the 2015 HCP Course!

2015-05-01 Thread Jennifer Elam
A reminder that it’s not too late to register for the 2015 HCP Course:
“Exploring the Human Connectome”
,
to be held June 8-12, 2015 at the Marriott Resort Waikiki Beach, in
Honolulu, Hawaii, USA.

Also, a reminder that you might try http://www.vrbo.com/ or
https://www.airbnb.com/ for affordable accommodations in the Waikiki Beach
area, near the Marriott.

This 5-day intensive course is designed for investigators who are
interested in:

   - using data being collected and distributed by HCP
   - acquiring and analyzing HCP-style imaging and behavioral data at your
   own institution
   - processing your own non-HCP data using HCP pipelines and methods
   - learning to use Connectome Workbench tools and the CIFTI connectivity
   data format
   - learning HCP multi-modal neuroimaging analysis methods, including
   those that combine MEG and MRI data
   - positioning yourself to capitalize on HCP-style data from forthcoming
   large-scale projects (e.g., Lifespan HCP and Connectomes Related to Human
   Disease)

Visit the HCP Course website

to register  and for Faculty
listings and the full schedule

of covered topics.

We hope to see you in Hawaii!

Best,
2015 HCP Course Organizers
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] Kurtosis and Skewness

2015-05-01 Thread pfotiad
Thanks a lot Doug!
Additionally, I've been trying to calculate the curvature of an ROI
extracted from a CT scan. Is there a way to do that in Freesurfer even
though this ROI is not part of an MRI? (I was playing with
mris_anatomical_stats and mris_curvature_stats but have been unsuccessful
so far since I could not find a way to convert this file into a
surface/curvature file).

Thank you for your time,
Panos

> Yes. I've attached mri_skew.m as well. There are several ways to
> estimate kurtosis, make sure mri_kurtosis is doing what you want.
>
> On 04/22/2015 01:48 PM, pfot...@nmr.mgh.harvard.edu wrote:
>> Hi FS experts,
>>
>> I was wondering whether there is a tool to measure the kurtosis and
>> skewness of an ROI. (For instance would the mri_kurtosis.m script under
>> the FS home directory be the best option for the measurement of
>> kurtosis?)
>>
>> Thanks in advance,
>> Panos
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>
> --
> Douglas N. Greve, Ph.D.
> MGH-NMR Center
> gr...@nmr.mgh.harvard.edu
> Phone Number: 617-724-2358
> Fax: 617-726-7422
>
> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
> www.nmr.mgh.harvard.edu/facility/filedrop/index.html
> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] problem with left/right parallelization

2015-05-01 Thread Z K
Yup this is a known issue with the mri_segstats binary.

Please go to the following page and download the mri_segstats file that 
corresponds to your version of freesurfer (see contents of 
$FREESURFER_HOME/build-stampt.txt file to determine your version). 
Replace the version of mri_segstats in your $FREESURFER_HOME/bin 
directory with the one you download from the following link. Also, it 
would be good to backup the version you currently have.

ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0-patch/

-Zeke

On 05/01/2015 05:02 PM, Krieger, Donald N. wrote:
> I have completed runs of recon-all -autorecon1 and recon-all
> –autorecon2-volonly per your suggested sequence:
>
> recon-all -s subj -autorecon1
>
> recon-all -s subj -autorecon2-volonly
>
> recon-all -s subj -autorecon2-perhemi -hemi rh -log recon-all-hemi
> rh.log -notify rh-done.log -openmp 4 &
>
> recon-all -s subj -autorecon2-perhemi -hemi lh -log
> recon-all-hemi-lh.log -notify lh-done.log -openmp 4 &
>
> while (rh-done.log AND lh-done.log do not both exist)
>
> do
>
> sleep 1
>
> end loop
>
> recon-all -s -autorecon3
>
> recon-all –s subj –autorecon2-volonly is completing but with an error.
>
> I’ve included below my signature the last 50 lines or so of
> recon-all.log (file attached).
>
> It looks like it’s completing execution of mri_fill successfully and
> then going on to execute mri_segstats out of order.
>
> In the log for a standard run on this same image set, i.e. recon-all
> –all, that mri_segstats cmd doesn’t appear to occur till 3000 lines
> later in the log file.  And as the log file shows, no ribbon.mgz can be
> found and inspection of the directories shows that surf is empty.
>
> It looks like something is missing between recon-all –autorecon2-volonly
> and recon-all –autorecon2-perhemi
>
> What do you think?
>
> Thanks,
>
> Don
>
> Don Krieger, Ph.D.
>
> Department of Neurological Surgery
>
> Universityof Pittsburgh
>
> mri_pretess done
>
> #
>
> #@# Fill Fri May  1 12:28:01 PDT 2015
>
> /home/donkri/Contrib/freesurfer/subjects/173_9sh_lr/mri
>
> mri_fill -a ../scripts/ponscc.cut.log -xform transforms/talairach.lta
> -segmentation aseg.auto_noCCseg.mgz wm.mgz filled.mgz
>
> logging cutting plane coordinates to ../scripts/ponscc.cut.log...
>
> INFO: Using transforms/talairach.lta and its offset for Talairach volume ...
>
> using segmentation aseg.auto_noCCseg.mgz...
>
> reading input volume...done.
>
> searching for cutting planes...voxel to talairach voxel transform
>
> 0.964  -0.026  -0.002   8.591;
>
> 0.022   1.002   0.185  -15.064;
>
> -0.012  -0.183   0.940   20.634;
>
> 0.000   0.000   0.000   1.000;
>
> voxel to talairach voxel transform
>
> 0.964  -0.026  -0.002   8.591;
>
> 0.022   1.002   0.185  -15.064;
>
> -0.012  -0.183   0.940   20.634;
>
> 0.000   0.000   0.000   1.000;
>
> reading segmented volume aseg.auto_noCCseg.mgz...
>
> Looking for area (min, max) = (350, 1400)
>
> area[0] = 2029 (min = 350, max = 1400), aspect = 0.86 (min = 0.10, max =
> 0.75)
>
> need search nearby
>
> using seed (128, 110, 91), TAL = (0.0, -37.0, 18.0)
>
> talairach voxel to voxel transform
>
> 1.037   0.026  -0.003  -8.449;
>
> -0.025   0.963  -0.190   18.642;
>
> 0.009   0.188   1.027  -18.439;
>
> 0.000   0.000   0.000   1.000;
>
> segmentation indicates cc at (128,  110,  91) --> (0.0, -37.0, 18.0)
>
> done.
>
> writing output to filled.mgz...
>
> filling took 0.5 minutes
>
> talairach cc position changed to (0.00, -37.00, 18.00)
>
> Erasing brainstem...done.
>
> seed_search_size = 9, min_neighbors = 5
>
> search rh wm seed point around talairach space:(18.00, -37.00, 18.00)
> SRC: (108.24, 104.54, 96.63)
>
> search lh wm seed point around talairach space (-18.00, -37.00, 18.00),
> SRC: (145.58, 103.65, 96.94)
>
> compute mri_fill using aseg
>
> Erasing Brain Stem and Cerebellum ...
>
> Define left and right masks using aseg:
>
> Building Voronoi diagram ...
>
> Using the Voronoi diagram to separate WM into two hemispheres ...
>
> Find the largest connected component for each hemisphere ...
>
> #
>
> #@# ASeg Stats Fri May  1 12:28:33 PDT 2015
>
> INFO: mri_segstats will not calculate Supratentorial
>
>due to missing ribbon.mgz file
>
> INFO: ?h.white surfaces not available to mri_segstats.
>
> /home/donkri/Contrib/freesurfer/subjects/173_9sh_lr
>
> mri_segstats --seg mri/aseg.mgz --sum stats/aseg.stats --pv mri/norm.mgz
> --empty --brainmask mri/brainmask.mgz --brain-vol-from-seg --excludeid 0
> --excl-ctxgmwm --subcortgray --in mri/norm.mgz --in-intensity-name norm
> --in-intensity-units MR --etiv --ctab /ho
>
> me/donkri/Contrib/freesurfer/ASegStatsLUT.txt --subject 173_9sh_lr
>
> $Id: mri_segstats.c,v 1.75.2.9 2013/02/16 00:09:33 greve Exp $
>
> cwd
>
> cmdline mri_segstats --seg mri/aseg.mgz --sum stats/aseg.stats --pv
> mri/norm.mgz --empty --brainmask mri/brainmask.mgz --brain-vol-from-seg
> --excludeid 0 --excl-ctxg

Re: [Freesurfer] Data interest of the CorticalParcellation_Yeo2011

2015-05-01 Thread Thomas Yeo
Hi Yu-Chieh,

I am cc-ing the freesurfer list who may help you with your issues.

Can you explain what exactly you are trying do? The parcellation is
released in different resolutions including fsaverage5. Why can't you
just use the fsaverage5 parcellation?

Cheers,
Thomas

On Fri, May 1, 2015 at 6:14 PM, 陳昱潔  wrote:
> Dear professor Yeo :
>
>My name is Yu-chieh Chen , I am a graduated student from National Taiwan
> University of medical school, and my supervisor is professor Susan Shur-Fen
> Gau from department of psychiatry, National Taiwan University Hospital &
> College of Medicine. We are very interesting about your paper published in
> 2011 which using resting MRI to separate brain regions to functional
> networks. We'd like to use your percellation to re-separate the brain
> regions based on your released data in Freesurfer(
> http://ftp.nmr.mgh.harvard.edu/fswiki/CorticalParcellation_Yeo2011). And use
> these volume of brain regions for our study, however, there comes the
> problem that we assumed that we can change the fsaverage into fsaverage5,
> thus we may get the new volume of the parcellation_Yeo. But it is not work.
> So I send this email for help. Last , I am very appreciate your kindness and
> very sorry for my inappropriate and rough.
> Thank you very much for read this email and sorry for occupied your time.
>
> Best wishes,
> Yu-chieh Chen
>

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.