Re: [Freesurfer] recon-all with FLAIR error no FSL installed

2013-05-27 Thread Popescu, Veronica
Dear Bruce,
They look good to me. Should I upload a couple of them, so you can have a look? 
They're about 230MB each. 
My question is: how serious is the BBR not initializing? Should I run 
everything again with FSL installed? 
Best wishes,
Veronica

-Original Message-
From: Bruce Fischl [mailto:fis...@nmr.mgh.harvard.edu] 
Sent: vrijdag 24 mei 2013 15:59
To: Popescu, Veronica
Cc: 'freesurfer@nmr.mgh.harvard.edu'
Subject: Re: [Freesurfer] recon-all with FLAIR error no FSL installed

Hi Veronica

BBR can use FSL or SPM to initialize, although we'll probably add an option 
in the future to use some things that Martin Reuter and Christian Wachinger 
are working on. How did the refinement work? We've only run it on a handful 
of cases, so it's pretty bleeding edge and I'm interested in feedback.

cheers
Bruce


On Fri, 24 May 2013, Popescu, Veronica 
wrote:

 Dear all,
 I am running FreeSurfer 5.3 with FLAIR refinement. I do not have FSL 
 installed. I do get results but there's an
 error message in the log file (attached) about the FSL installation missing.  
 How bad is it? Do I have to rerun everything with FSL installed? And if so, 
 is there any version that is
 preferable?
 Thank you very much in advance!
 Best wishes,
 Veronica
  
 



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


Re: [Freesurfer] FMRI surface transformation for vertex-wise connectivity analysis

2013-05-27 Thread Thomas Yeo
Hi Doug and Bruce,

Doug's comment about vertex spacing and its dependence on the surface
of choice has gotten me thinking:

When I smooth my fMRI data using 6mm kernel, I use the command
mri_surf2surf --hemi lh --s fsaverage6 --sval lh.fmri.nii.gz --cortex
--fwhm-trg 6 --tval rh.fmri.nii.gz --reshape.

Which surface is 6mm defined on? Is it .sphere, .white, or something
else? If .sphere, do you scale the sphere so the surface area is
equal to some value?

Thanks,
Thomas


On Thu, May 16, 2013 at 11:48 PM, Douglas N Greve
gr...@nmr.mgh.harvard.edu wrote:
 Hi Ludovico, I'm not sure exactly what your pipeline is, but you should use 
 fsaverage for vol2surf, then go from fsaverage to fsaverage4 or 5 with 
 mri_surf2surf. The reason is that if you go directly to 4 or 5, you will miss 
 data between the vertices. The distance between the vertices for fsaverage4 
 is about 5.5mm and it is about 3mm for fsaverage5, 1.4 for fsaverage6, and 
 .7mm for fsaverage (these are all for the white surface).

 doug

 On 05/16/2013 08:58 AM, Bruce Fischl wrote:
 you would change fsaverage5 to fsaverage4 (fewer vertices) or fsaverage6
 (more vertices)
 On Thu, 16 May 2013, Ludovico Minati wrote:

 Hi Thomas

 many thanks. So, in the example you have sent me, how should I go
 about if I wished to vary the granularity?  Are there different meshes
 to reshape or should I generate them somehow?

 Ludovico


 On 16 May 2013 14:47, Thomas Yeo ytho...@csail.mit.edu wrote:
 Hi Ludovico,

 The mri_vol2surf example I sent you directly resample to fsaverage5,
 which is around 4mm spacing, resulting in 18715 vertices for both
 hemispheres combined after excluding the medial wall in the surfaces.

 I am also including the freesurfer mailing list in the email as
 suggested by Bruce.

 --Thomas

 On Thu, May 16, 2013 at 8:25 PM, Bruce Fischl
 fis...@nmr.mgh.harvard.edu wrote:
 Hi Ludovico

 I wouldn't downsample before calling mri_surf2surf. We have tools for
 uniformly parcellating the cortex (mris_make_face_parcellation) that can 
 be
 used for this purpose after sampling the timecourses to the cortex.


 cheers
 Bruce
 On Thu, 16 May 2013, Ludovico Minati wrote:

 Hi Bruce,

 many thanks. Yes sorry I shall use the list from now on. But let me
 just ask you a clarification as we are already on these questions

 For our connectivity analyses, at present we parcellated in 3D volume
 space the cortex into a pre-set number of roughly equal volume
 parcels, ranging in number between around 500 to 10,000. I would need
 to translate this approach to the surface space in Freesurfer, i.e. be
 able to smooth on the cortical surface and undersample it. What is the
 best approach that can be used?

 Along this like: you wrote around 150k vertices/hemisphere. For our
 purposes that's an enormous number, much larger than the number of EPI
 voxels. How can we mesh downsample before calling mri_vol2surf?

 Again thanks for your kind help and patience

 Ludovico


 On 16 May 2013 14:09, Bruce Fischl fis...@nmr.mgh.harvard.edu wrote:
 Hi Ludovico

 can we move this discussion to the FreeSurfer list in the future so
 others
 can answer?

 1. Hard to say as sometimes one works better than the other, you'll just
 have to try. The transform should be rigid (6DOF) since the scalings are
 read from the header, why would you want affine? I think Doug has worked
 on
 this and you can specify it in the bbregister command line, but I've
 never
 used it.

 2. About 150K vertices/hemisphere. They are distributed initially at 1mm
 spacing (the surface of the voxels), and cannot be tuned. There are some
 tools around for mesh downsampling if you want, and this is even easier
 if
 you go to fsaverage space (with mri_surf2surf) where we have
 representations
 based on recursive icosahedral supersamplings.

 3.  This is due to a bug in the initial nifti format that didn't allow
 any
 one dimension greater than 64K. If you output in .mgz it should be
 nvertices
 x 1 x 1 x ntimepoints.

 4. Search for coordinate systems on our wiki. This is documented
 extensively.

 there are also matlab i/o functions for reading/writing all our formats
 (e.g. MRIread.m)

 cheers
 Bruce


 On Thu, 16 May 2013, Ludovico Minati wrote:

 Hi Thomas,

 thanks. A few quick questions, which hopefully will take little of
 your time but save me a lot of hassle:

 1) bbregister. Do you advise using FLIRT or SPM for initialization? Is
 this a rigid-body transformation, or an affine one? Any way I can
 control the DOF? If I use SPM shall I feed the mean realigned volume
 here, as I expect?

 2) recon-all. What is the typical number of vertices for the cortex?
 Any way I can control it, i.e. sample more or less finely? This would
 be particularly relevant for our task.

 3) mri_vol2surf. Perhaps naively I was expecting an output file simply
 consisting of a list of values, i.e. one per vertex (assuming a single
 input volume that is). But the documentation says: The output will be
 a data set with Nv/R 

[Freesurfer] mri_glmfit files

2013-05-27 Thread Joshua deSouza
Hello all,

I would just like to know what is the significance of the files that are
produced after a glmfit is done. I was trying to find a write up online but
I was not able to.

They include :

- cnr.mgh
- F.mgh
- gamma.mgh
- gammavar.mgh
- sig.mgh

Thank you
___
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] recon-all with FLAIR error no FSL installed

2013-05-27 Thread Bruce Fischl

Hi Veronica

thanks for the offer, but I don't need to see them. Glad it seems to be 
working. As for BBR, I'll leave that for Doug

Bruce
On Mon, 27 May 2013, Popescu, 
Veronica wrote:



Dear Bruce,
They look good to me. Should I upload a couple of them, so you can have a look? 
They're about 230MB each.
My question is: how serious is the BBR not initializing? Should I run 
everything again with FSL installed?
Best wishes,
Veronica

-Original Message-
From: Bruce Fischl [mailto:fis...@nmr.mgh.harvard.edu]
Sent: vrijdag 24 mei 2013 15:59
To: Popescu, Veronica
Cc: 'freesurfer@nmr.mgh.harvard.edu'
Subject: Re: [Freesurfer] recon-all with FLAIR error no FSL installed

Hi Veronica

BBR can use FSL or SPM to initialize, although we'll probably add an option
in the future to use some things that Martin Reuter and Christian Wachinger
are working on. How did the refinement work? We've only run it on a handful
of cases, so it's pretty bleeding edge and I'm interested in feedback.

cheers
Bruce


On Fri, 24 May 2013, Popescu, Veronica
wrote:


Dear all,
I am running FreeSurfer 5.3 with FLAIR refinement. I do not have FSL installed. 
I do get results but there's an
error message in the log file (attached) about the FSL installation missing.  
How bad is it? Do I have to rerun everything with FSL installed? And if so, is 
there any version that is
preferable?
Thank you very much in advance!
Best wishes,
Veronica
 





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


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] nuintensitycor and skullstrip problems

2013-05-27 Thread Bruce Fischl

Hi Laouchedi

if you upload the dataset we'll take a look
Bruce
On Mon, 27 May 2013, LAOUCHEDI 
MAKHLOUF wrote:



hi all
 i run recon_all on some subjects having 512x512x154 , i noticed
(using tkmedit) that there are no problems with orig.mgz, and rawavg.mgz but
most of them were cropped (more than half of the brain disappeared) after
the -nuintensity step (nu.mgz); for one of these patients, the nu.mgz is
ok but the T1.mgz produced after skullstrip is bad : the skull was largely
still there on the right hemisphere.

   i read in the recon-all.local-copy file (in the
SUBJECTS_DIR/subj/scripts folder) that we must include the -cw256 flag if
the FOV is beyond 256x256x256 (just to be sure, is it the FOV -in mm- or
the just the GRID). but when reading in the recon-all.log file, this step
seems to be a default one when running recon_all -all command. in the
recon-all.log file it is written :

Original Data has (0.4883, 0.4883, 1.2) mm size and (512, 494, 154) voxels.
Data is conformed to 1 mm size and 256 voxels for all directions
changing data type from float to uchar (noscale = 0)...
MRIchangeType: Building histogram
Reslicing using trilinear interpolation

thank you for your help

___
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] no hippocampal stats despite running FS 5.3 with -hippo-subfields

2013-05-27 Thread Salil Soman
I can add that running the -hippo-subfields flag separately did work:

recon-all -s SUBJECTIDENTIFIER -hippo-subfields

Is there a reason the order of processing should matter? Is there a way I
can change my recon-all call (below) so that hippo-subfields will get
processed (so I do not have to make a separate call)?

recon-all -i SPGR/*.gz -s SUBJECTIDENTIFIER -nuintensitycor-3T -nocanorm
-openmp 50 -hippo-subfields -all

Thank you,

Sal





On Sun, May 26, 2013 at 2:33 PM, Salil Soman salso...@stanford.edu wrote:

 Dear Freesurfer Experts,

 I have been running freesurfer 5.3 without any reported errors using the
 following command:

 recon-all -i SPGR/*.gz -s SUBJECTIDENTIFIER -nuintensitycor-3T -nocanorm
 -openmp 50 -hippo-subfields -all

 However, when I look for any of the hippocampal subfield stats (as
 described on
 http://ftp.nmr.mgh.harvard.edu/fswiki/HippocampalSubfieldSegmentation), I
 do not find any of them.

 Any suggestions on what I am doing incorrectly?

 Best wishes,

 Salil Soman, MD, MS


___
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] mri_anatomical_stats segmentation fault

2013-05-27 Thread Rob Tennyson
Hi All,

I'm running mris_anatomical_stats with a few manually defined labels. For
a few of my subjects, I am getting the error: Segmentation fault on one
of the labels. However, the other manually defined labels process without
any errors on these same subjects.

For example, I am running mri_anatomical_stats on subject 33_bay6 with a
manually defined ERC label, a manually defined PHC label, and a manually
defined medial frontal gyrus label. The only label that runs an error for
this subject is the PHC label. This PHC label runs without any errors on
the rest of my subjects.

Here is what is displayed when running a label that fails:

 mris_anatomical_stats -f PHC.stats.04.txt -l lh.PHC_1.label -b 33_bay6 lh
limiting computations to label lh.PHC_1.label.
reading volume /Volumes/BigRaid/Rob/subjects/33_bay6/mri/wm.mgz...
reading input surface /Volumes/BigRaid/Rob/subjects/33_bay6/surf/lh.white...
reading input pial surface
/Volumes/BigRaid/Rob/subjects/33_bay6/surf/lh.pial...
reading input white surface
/Volumes/BigRaid/Rob/subjects/33_bay6/surf/lh.white...
Segmentation fault

Does anyone know what may be causing the Segmentation fault and what steps
I should take to fix it?

Thank you for your help!
Rob
___
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] nuintensitycor and skullstrip problems

2013-05-27 Thread LAOUCHEDI MAKHLOUF
hi
  i send you further information of the -nuintensitycor and skullstrip 
problem,about three control subjects. after running recon_all -i, i decided 
to process my data step by step, i run recon_all -autorecon1 for all of them 
and it ended with errors. i picked up three cases of the recon-all.log file :

subject 1:


#@# Nu Intensity Correction Mon May 27 18:08:32 CEST 2013

 mri_nu_correct.mni --i orig.mgz --o nu.mgz --uchar transforms/talairach.xfm 
--n 2 

/home_cluster/mlaouche/freesurf_makh/ctr3/mri
/home_cluster/amesse/software/freesurfer5.1/bin/mri_nu_correct.mni
--i orig.mgz --o nu.mgz --uchar transforms/talairach.xfm --n 2
nIters 2
$Id: mri_nu_correct.mni,v 1.18 2011/03/02 20:16:39 nicks Exp $
Linux cn09 2.6.32-358.2.1.el6.x86_64
 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Mon May 27 18:08:36 CEST 2013
Program nu_correct, built from:
Package MNI N3, version 1.10, compiled by nicks@minerva 
(x86_64-unknown-linux-gnu) on 2010-02-20 at 17:32:37
tmpdir is ./tmp.mri_nu_correct.mni.12456
/home_cluster/mlaouche/freesurf_makh/ctr3/mri
mri_convert orig.mgz ./tmp.mri_nu_correct.mni.12456/nu0.mnc -odt float
mri_convert orig.mgz ./tmp.mri_nu_correct.mni.12456/nu0.mnc -odt float 
$Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $
reading from orig.mgz...
TR=7.05, 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)
changing data type from uchar to float (noscale = 0)...
writing to ./tmp.mri_nu_correct.mni.12456/nu0.mnc...
 

Iteration 1 Mon May 27 18:23:46 CEST 2013
nu_correct -clobber
 ./tmp.mri_nu_correct.mni.12456/nu0.mnc ./tmp.mri_nu_correct.mni.12456/nu1.mnc 
-tmpdir ./tmp.mri_nu_correct.mni.12456/0/
./tmp.mri_nu_correct.mni.12456/ is a directory but not writeable
[mlaouche@cn09:/home_cluster/mlaouche/freesurf_makh/ctr3/mri/] [2013-05-27 
18:23:56] running:
  /home_cluster/amesse/software/freesurfer5.1/mni/bin/nu_estimate_np_and_em 
-parzen -log -sharpen 0.15 0.01 -iterations 50 -stop 0.001 -shrink 4 -auto_mask 
-nonotify -b_spline 1 -distance 200 -quiet -execute -clobber -nokeeptmp -tmpdir 
./tmp.mri_nu_correct.mni.12456/0/ ./tmp.mri_nu_correct.mni.12456/nu0.mnc 
./tmp.mri_nu_correct.mni.12456/nu1.imp

Assertion failed at line 827 in file templates/CachedArray.cc
nu_estimate_np_and_em: crashed while running volume_stats (termination 
status=256)
nu_correct: crashed while running nu_estimate_np_and_em (termination status=256)
ERROR: nu_correct
Linux cn09 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49
 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

recon-all -s ctr3 exited with ERRORS at Mon May 27 18:47:13 CEST 2013

To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting




subject 2:




#@# Nu Intensity Correction Mon May 27 18:08:21 CEST 2013

 mri_nu_correct.mni --i orig.mgz --o nu.mgz --uchar transforms/talairach.xfm 
--n 2 

/home_cluster/mlaouche/freesurf_makh/ctr5/mri
/home_cluster/amesse/software/freesurfer5.1/bin/mri_nu_correct.mni
--i orig.mgz --o nu.mgz --uchar transforms/talairach.xfm --n 2
nIters 2
$Id: mri_nu_correct.mni,v 1.18 2011/03/02 20:16:39 nicks Exp $
Linux cn09 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 
x86_64 x86_64 GNU/Linux
Mon May 27 18:08:31 CEST 2013
Program nu_correct, built from:
Package MNI N3, version 1.10, compiled by nicks@minerva 
(x86_64-unknown-linux-gnu) on 2010-02-20 at
 17:32:37
tmpdir is ./tmp.mri_nu_correct.mni.12252
/home_cluster/mlaouche/freesurf_makh/ctr5/mri
mri_convert orig.mgz ./tmp.mri_nu_correct.mni.12252/nu0.mnc -odt float
mri_convert orig.mgz ./tmp.mri_nu_correct.mni.12252/nu0.mnc -odt float 
$Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $
reading from orig.mgz...
TR=7.07, 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)
changing data type from uchar to float (noscale = 0)...
writing to ./tmp.mri_nu_correct.mni.12252/nu0.mnc...
tee: ./mri_nu_correct.mni.log: Input/output error
 

Iteration 1 Mon May 27 18:23:44 CEST 2013
nu_correct -clobber ./tmp.mri_nu_correct.mni.12252/nu0.mnc 
./tmp.mri_nu_correct.mni.12252/nu1.mnc -tmpdir ./tmp.mri_nu_correct.mni.12252/0/
./tmp.mri_nu_correct.mni.12252/ is a directory but not
 writeable
[mlaouche@cn09:/home_cluster/mlaouche/freesurf_makh/ctr5/mri/] [2013-05-27 
18:23:56] running:
  /home_cluster/amesse/software/freesurfer5.1/mni/bin/nu_estimate_np_and_em 
-parzen -log -sharpen 0.15 0.01 -iterations 50 -stop 0.001 -shrink 4 -auto_mask 
-nonotify -b_spline 1 -distance 200 -quiet -execute -clobber -nokeeptmp -tmpdir 
./tmp.mri_nu_correct.mni.12252/0/ ./tmp.mri_nu_correct.mni.12252/nu0.mnc 
./tmp.mri_nu_correct.mni.12252/nu1.imp

Computing ranges for each class.: .
Processing:.Done
Fitting splines: 

Re: [Freesurfer] mri_anatomical_stats segmentation fault

2013-05-27 Thread Bruce Fischl
Hi Rob,

does the white surface look ok? How about the contents of the 
lh.PHC_1.label file? If both seem ok, then feel free to upload the subject 
and we'll figure it out
Bruce


On Mon, 27 May 2013, Rob Tennyson 
wrote:

 Hi All,
 
 I'm running mris_anatomical_stats with a few manually defined labels. For
 a few of my subjects, I am getting the error: Segmentation fault on one of
 the labels. However, the other manually defined labels process without any
 errors on these same subjects.
 
 For example, I am running mri_anatomical_stats on subject 33_bay6 with a
 manually defined ERC label, a manually defined PHC label, and a manually
 defined medial frontal gyrus label. The only label that runs an error for
 this subject is the PHC label. This PHC label runs without any errors on the
 rest of my subjects.
 
 Here is what is displayed when running a label that fails:
 
  mris_anatomical_stats -f PHC.stats.04.txt -l lh.PHC_1.label -b 33_bay6 lh
 limiting computations to label lh.PHC_1.label.
 reading volume /Volumes/BigRaid/Rob/subjects/33_bay6/mri/wm.mgz...
 reading input surface /Volumes/BigRaid/Rob/subjects/33_bay6/surf/lh.white...
 reading input pial surface
 /Volumes/BigRaid/Rob/subjects/33_bay6/surf/lh.pial...
 reading input white surface
 /Volumes/BigRaid/Rob/subjects/33_bay6/surf/lh.white...
 Segmentation fault
 
 Does anyone know what may be causing the Segmentation fault and what steps I
 should take to fix it?
 
 Thank you for your help!
 Rob
 

___
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] white matter volume per lobe...

2013-05-27 Thread Gonzalo Rojas Costa
Hi:

  I used the following commands to get the cortical volume per each lobe:

mri_annotation2label --subject OAS1_0001_MR1 --hemi rh --lobesStrict
lobulos --seg lobulos --stat lobulos
mri_annotation2label --subject OAS1_0001_MR1 --hemi lh --lobesStrict
lobulos --seg lobulos --stat lobulos
mris_anatomical_stats -a lobulos -f OAS1_0001_MR1_lobulos_rh -b OAS1_0001_MR1 rh
mris_anatomical_stats -a lobulos -f OAS1_0001_MR1_lobulos_lh -b OAS1_0001_MR1 lh

  Which commands (sintaxis) must I use to compute the white matter
volume per each lobe ?... I tested the mri_aparc2aseg and mri_segstats
commans with different options, but I couldn't get the volume that I
need...

  Sincerely,


--
Gonzalo Rojas Costa
Laboratory for Advanced Medical Image Processing
Department of Radiology
Clínica las Condes
Lo Fontecilla 441, Las Condes, Santiago, Chile.
Tel: 56-2-2105170
Cel: 56-9-97771785
www.clc.cl

___
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] Correction for multiple comparisons error

2013-05-27 Thread Douglas Greve
what is your cmd line? What version of FS are you using? What is the 
full terminal output?
doug


On 5/25/13 6:55 PM, Fotiadis, Panagiotis wrote:
 Hi!

 I have been running the mri_glmfit-sim command to do the correction for 
 multiple comparisons for my group analysis and for some voxel-based 
 thresholds (not all) there is an error that comes up when reading the 
 colortable from the annotation file:

 reading colortable from annotation file...
 colortable with 35 entries read (originally 
 /space/amaebi/26/users/buckner_cortical_atlas/scripts/colortable_final.txt)
 *** glibc detected *** mri_surfcluster: malloc(): memory corruption: 
 0x06e61230 ***
 *** glibc detected *** mri_surfcluster: malloc(): memory corruption: 
 0x06e61230 ***

 and then it gets stuck. Do you happen to know what might be causing this 
 issue?

 Thank you for your time,
 Panos
 ___
 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] BBR Register failing

2013-05-27 Thread Douglas Greve

Hi Sal, fsvol should be defined. Can you send me your fslregister?
doug


On 5/26/13 12:58 AM, Salil Soman wrote:

Dear Freesurfer experts,

WIth the combination of FS 5.3 and FSL 5.0.2.1, It looks like I am 
having some problems with the fslregister script. From what I have 
been able to investigate. It looks like there is an issue that fsvol 
may not get named if you are not dealing .cor files.


Code in question from fslregister script:

# Use the rawavg as input (for testing only)
if($fsvol == rawavg.cor) then
  set refvol = $SUBJECTS_DIR/$subjid/mri/$fsvol.mgz
  if(! -e $refvol) then
# Does not exist, create
set orig = $SUBJECTS_DIR/$subjid/mri/orig.mgz
set rawavg = $SUBJECTS_DIR/$subjid/mri/rawavg.mgz
set cmd = (mri_vol2vol --mov $rawavg --targ $orig --o $refvol \
 --no-save-reg --regheader)
echo $cmd | tee -a $LF
$cmd | tee -a $LF
if($status) exit 1;
# Now mask it
set brain = $SUBJECTS_DIR/$subjid/mri/brainmask.mgz
set cmd = (mri_mask $refvol $brain $refvol)
echo $cmd | tee -a $LF
$cmd | tee -a $LF

I think this lack of fsvol being named results in the errors I am getting:

--
/mnt/glusterfs/salsoman/output/FS/WMR3T_0015z_FS
mri_convert ERROR: could not determine file for 
/mnt/glusterfs/salsoman/output/FS/WMR3T_0015z_FS/mri/ERROR: 
./tmp.bbregister.756/fslregister/refvol.fslregister.nii
mri_convert ERROR: could not determine file for 
/mnt/glusterfs/salsoman/output/FS/WMR3T_0015z_FS/mri/ERROR: 
./tmp.bbregister.756/fslregister/refvol.fslregister.nii


mri_convert: extra arguments (not and following)

Any suggestions would be a huge help.

-Sal




On Sat, May 25, 2013 at 8:35 PM, Salil Soman salso...@stanford.edu 
mailto:salso...@stanford.edu wrote:


Done. Thank you for your consideration. The best I can figure so
far is
1) the script's attempt to make the tmp.bbregister.7392 directory
fails
and 2) (after I manually make this directory),
there seems to be something going wrong at the level of fslregister

I have fsl 5.0.2.1 and freesurfer 5.3 running, and am regularly
able to run freesurfer and
tracula (using only the flirt method, the bbr method was giving me
trouble as well).

The code is all running on a sun grid engine, with individual
ubuntu 12.04.1 LTS machines.

Your help on this matter would be greatly appreciated.

Sal



On Sat, May 25, 2013 at 8:23 PM, Douglas Greve
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:

Hi Sal, can you post this to the list instead of me directly?
thanks!
doug



On 5/25/13 11:00 PM, Salil Soman wrote:

Dear Doug,

I attempted to run the process we discussed earlier today for
registering a different tissue contrast to the T1 after
freesurfer 5.3 was run.

I had run an FSSPGR for my subject using the following command:

recon-all -i SPGR/*.gz -s WMR3T_0015z_FS -nuintensitycor-3T
-nocanorm -openmp 50 -hippo-subfields -all

It finished without any problems.

Then I tried running the bbrregister command:

bbregister --s WMR3T_0015z_FS --mov QSM_906.nii.gz --init-fsl
--reg register.dat --bold

(this version was with bold contrast, but I get the same
error if I try t1 or t2).

The process fails and I get the following error log (below).
Any suggestions on what I am doing wrong?

Thanks,

Sal

-- Forwarded message --
From: *Salil Soman* salso...@stanford.edu
mailto:salso...@stanford.edu
Date: Sat, May 25, 2013 at 7:54 PM
Subject: bbregister fail log
To: salso...@stanford.edu mailto:salso...@stanford.edu


Logfile for bbregister
Sat May 25 19:51:15 PDT 2013

setenv SUBJECTS_DIR /mnt/glusterfs/salsoman/output/FS
cd /mnt/glusterfs/salsoman/output/FS/WMR3T_0015z_FS
/mnt/glusterfs/salsoman/freesurfer/bin/bbregister --s
WMR3T_0015z_FS --mov QSM_906.nii.gz --init-fsl --reg
register.dat --bold

$Id: bbregister,v 1.49.2.2 2013/02/23 01:32:22 mreuter Exp $
Linux corn18.stanford.edu http://corn18.stanford.edu
3.2.0-36-generic #57-Ubuntu SMP Tue Jan 8 21:44:52 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux
FREESURFER_HOME /mnt/glusterfs/salsoman/freesurfer
mri_convert QSM_906.nii.gz ./tmp.bbregister.26724/template.nii
mri_convert QSM_906.nii.gz ./tmp.bbregister.26724/template.nii
$Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $
reading from QSM_906.nii.gz...
TR=98.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0.313177, 0.949695)
k_ras = (0, -0.949695, 0.313177)
writing to ./tmp.bbregister.26724/template.nii...
fslregister --s WMR3T_0015z_FS --mov

Re: [Freesurfer] possible to use freesurfer segmentations to get mean values for anatomic structures from other sequences

2013-05-27 Thread Douglas Greve


On 5/26/13 2:11 PM, Salil Soman wrote:

Dear Doug,

Thank you for your email. Following up on our previous discussions:

1) *bbregister fail *- this was happening because of error from 
fslregister. The variable fsvol was translating to ERROR. In 
fslregister th value for fsvol is set to brainmask, along with 
numerous other parameters being initialized.
By adding the line set fsvol = brain mask (without quotes) at the 
beginning of the section #Convert reference to analyze the CentOS 6 
version I am running on ubuntu 12.04 (with SGE), now works.

see previous msg.


2) when you suggested I run bbregister on the lowb.nii file, was it 
because I had suggested I wanted to register to a 2D ADC map? If I 
want to instead use a 3D volume (e.g. a 3D ASL), would I use the 
actual volume I want to get value from instead of lowb.nii?  I ended 
up running
Oh, I did not realize it was a 2D map. Why do you have a 2D map instead 
of 3D? That might be hard to get registered. You could have used the ADC 
or FA. In general, you don't want to use the contrast that you will 
later be testing as it creates a little bit of circularity. It is not 
much though, and it should be fine.


3) for the mri_vol2vol step - I had to change targ to fstarg, and I 
left out the interp flag so it would do its default trilinear:  
mri_vol2vol --mov Vol_906.nii --fstarg T1.mgz --o Vol_906_Reg_Bold.nii 
--no-save-reg --reg register_bold.dat --inv
that maps T1 into the bold space. Is that what you want? If you want to 
map the bold into the anatomical space, then leave off -inv. This will 
also solve your problem below

doug


4) I would like to get the segmentations from aparc+aseg.mgz as the 
areas where I get the values summed. So I entered mri_segstats --seg 
mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i 
Vol_906_Reg_Bold.nii --sum Vol_aparc_aseg.stats




but then I received this error:

 ERROR: dimension mismatch between input volume and seg
  input 224 224 170
  seg   256 256 256
*
*
*So, in summary, while I've fixed bbregister to work on my system, I 
am still having trouble normalizing my 3D non T1 volume data into the 
FS space to be able to use the labels from aparc+aseg.mgz to get 
statistics for each anatomic area.*


Any ideas on how to proceed?

Thanks,

Sal


On Sat, May 25, 2013 at 11:51 AM, Douglas Greve 
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:



On 5/25/13 1:39 PM, Salil Soman wrote:

Thank you Doug.

 Just so I am clear - is the anatomical the nifti T1.mgz or is it
a different file. From your email I gather should do the following:

*1)  Use bbregister to register the lowb image to the anatomical.
This creates a registration matrix.*

bbregister -s SUBJECTNAME --mov lowb.nii --initfsl --reg register.dat

That is right, but add --t2 (since it is t2 weighted).



*2) Use mri_vol2vol and the registration to map the ADC map to
the anatomical*
mri_vol2vol --mov lowb.nii --targ $vol --inv --interp nearest --o $vol2diff 
--reg $outdir/register.dat --no-save-reg

Use the ADC as the moveable (not lowb, but use the lowb for
bbregister). The target volume should be the T1.mgz (or any
conformed volume). The output will be the adc in the anatomical
space (not sure why you call it vol2diff).


*3) use mri_segstats to extract the values*
*mri_segstats*  --seg $SUBJECTS_DIR/SUBJECTNAME/mri/wmparc.mgz --ctab 
$FREESURFER_HOME/FreeSurferColorLUT.txt --i lowb.nii --sum fa.stats

The input would be the adc volume mapped the anatomical space. I
would use WMParcStatsLUT.txt or else you'll get a billion
different areas not represented in wmparc. You may also want to
add --seg-erode 1 to erode the segmentations by a voxel. This
helps to prevent partial voluming.

doug




Where lowb.nii is the other MRI tissue sequence I am analyzing
(e.g. ADC), $vol2diff is the output image of the registration,
and fa.stats will be my output stats table?

I suspect there is part of the syntax for these tools I do not
understand. Also, what input would $vol be?

Best wishes,

Sal


On Sat, May 25, 2013 at 10:06 AM, Douglas Greve
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:


Hi Sal, yes you can. Use bbregister to register the lowb
image to the anatomical. This creates a registration matrix.
Use mri_vol2vol and the registration to map the ADC map to
the anatomical, then use mri_segstats to extract the values
doug

ps. Please post questions to the FS list instead of us
directly so that others can benefit and it gets archived.
thanks!



On 5/25/13 1:03 PM, Salil Soman wrote:

Dear Dr. Greve,

Is it possible to register a nonstructural MR sequences
(e.g. an ADC map) with the aseg.mgz file (or
aparc+aseg.mgz file, etc) and then, using the

Re: [Freesurfer] possible to use freesurfer segmentations to get mean values for anatomic structures from other sequences

2013-05-27 Thread Douglas Greve

yes
On 5/26/13 4:56 PM, Salil Soman wrote:
As I am working with a 3D volume and not an ADC map, should I still 
use --seg-erode 1 with mr segstats?


Thank


On Sun, May 26, 2013 at 1:11 PM, Salil Soman salso...@stanford.edu 
mailto:salso...@stanford.edu wrote:


Hi - I realize that the --inv tag was still in my commands for
mr_vol2vol (causing the target and the moving image to be
swapped). Removing the --inv tag gave me a new volume normalized
to aparc+aseg.nii, and so I was able to then run mri_segstats
using the following command:

mri_segstats --seg mri/aparc+aseg.mgz --ctab
$FREESURFER_HOME/FreeSurferColorLUT.txt --i Vol_906_Reg_Bold.nii
--sum Vol_906_aparc_aseg.stats

Thanks!

-S


On Sun, May 26, 2013 at 11:11 AM, Salil Soman
salso...@stanford.edu mailto:salso...@stanford.edu wrote:

Dear Doug,

Thank you for your email. Following up on our previous
discussions:

1) *bbregister fail *- this was happening because of error
from fslregister. The variable fsvol was translating to
ERROR. In fslregister th value for fsvol is set to
brainmask, along with numerous other parameters being
initialized.
By adding the line set fsvol = brain mask (without quotes)
at the beginning of the section #Convert reference to
analyze the CentOS 6 version I am running on ubuntu 12.04
(with SGE), now works.

2) when you suggested I run bbregister on the lowb.nii file,
was it because I had suggested I wanted to register to a 2D
ADC map? If I want to instead use a 3D volume (e.g. a 3D ASL),
would I use the actual volume I want to get value from instead
of lowb.nii?  I ended up running

3) for the mri_vol2vol step - I had to change targ to fstarg,
and I left out the interp flag so it would do its default
trilinear:  mri_vol2vol --mov Vol_906.nii --fstarg T1.mgz --o
Vol_906_Reg_Bold.nii --no-save-reg --reg register_bold.dat --inv

4) I would like to get the segmentations from aparc+aseg.mgz
as the areas where I get the values summed. So I entered
mri_segstats --seg mri/aparc+aseg.mgz --ctab
$FREESURFER_HOME/FreeSurferColorLUT.txt --i
Vol_906_Reg_Bold.nii --sum Vol_aparc_aseg.stats

but then I received this error:

 ERROR: dimension mismatch between input volume and seg
  input 224 224 170
  seg   256 256 256
*
*
*So, in summary, while I've fixed bbregister to work on my
system, I am still having trouble normalizing my 3D non T1
volume data into the FS space to be able to use the labels
from aparc+aseg.mgz to get statistics for each anatomic area.*

Any ideas on how to proceed?

Thanks,

Sal


On Sat, May 25, 2013 at 11:51 AM, Douglas Greve
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu
wrote:


On 5/25/13 1:39 PM, Salil Soman wrote:

Thank you Doug.

 Just so I am clear - is the anatomical the nifti T1.mgz
or is it a different file. From your email I gather
should do the following:

*1)  Use bbregister to register the lowb image to the
anatomical. This creates a registration matrix.*

bbregister -s SUBJECTNAME --mov lowb.nii --initfsl --reg
register.dat

That is right, but add --t2 (since it is t2 weighted).



*2) Use mri_vol2vol and the registration to map the ADC
map to the anatomical*
mri_vol2vol --mov lowb.nii --targ $vol --inv --interp nearest --o 
$vol2diff --reg $outdir/register.dat --no-save-reg

Use the ADC as the moveable (not lowb, but use the lowb
for bbregister). The target volume should be the T1.mgz
(or any conformed volume). The output will be the adc in
the anatomical space (not sure why you call it vol2diff).


*3) use mri_segstats to extract the values*
*mri_segstats*  --seg $SUBJECTS_DIR/SUBJECTNAME/mri/wmparc.mgz 
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i lowb.nii --sum fa.stats

The input would be the adc volume mapped the anatomical
space. I would use WMParcStatsLUT.txt or else you'll get a
billion different areas not represented in wmparc. You may
also want to add --seg-erode 1 to erode the
segmentations by a voxel. This helps to prevent partial
voluming.

doug




Where lowb.nii is the other MRI tissue sequence I am
analyzing (e.g. ADC), $vol2diff is the output image of
the registration, and fa.stats will be my output stats table?

I suspect there is part of the syntax for these tools I
do not understand. Also, what input would $vol be?

 

Re: [Freesurfer] FMRI surface transformation for vertex-wise connectivity analysis

2013-05-27 Thread Douglas Greve

It is based on the white. Notice that since you are using an average 
subject (fsaverage6) there is some scaling that happens because an 
average subject will have a surface area that is much less than the 
average of the subjects that went into. The average of the subjects is 
kept when the average subject is created and used when the number of 
iterations is computed.
doug


On 5/27/13 4:13 AM, Thomas Yeo wrote:
 Hi Doug and Bruce,

 Doug's comment about vertex spacing and its dependence on the surface
 of choice has gotten me thinking:

 When I smooth my fMRI data using 6mm kernel, I use the command
 mri_surf2surf --hemi lh --s fsaverage6 --sval lh.fmri.nii.gz --cortex
 --fwhm-trg 6 --tval rh.fmri.nii.gz --reshape.

 Which surface is 6mm defined on? Is it .sphere, .white, or something
 else? If .sphere, do you scale the sphere so the surface area is
 equal to some value?

 Thanks,
 Thomas


 On Thu, May 16, 2013 at 11:48 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu wrote:
 Hi Ludovico, I'm not sure exactly what your pipeline is, but you should use 
 fsaverage for vol2surf, then go from fsaverage to fsaverage4 or 5 with 
 mri_surf2surf. The reason is that if you go directly to 4 or 5, you will 
 miss data between the vertices. The distance between the vertices for 
 fsaverage4 is about 5.5mm and it is about 3mm for fsaverage5, 1.4 for 
 fsaverage6, and .7mm for fsaverage (these are all for the white surface).

 doug

 On 05/16/2013 08:58 AM, Bruce Fischl wrote:
 you would change fsaverage5 to fsaverage4 (fewer vertices) or fsaverage6
 (more vertices)
 On Thu, 16 May 2013, Ludovico Minati wrote:

 Hi Thomas

 many thanks. So, in the example you have sent me, how should I go
 about if I wished to vary the granularity?  Are there different meshes
 to reshape or should I generate them somehow?

 Ludovico


 On 16 May 2013 14:47, Thomas Yeo ytho...@csail.mit.edu wrote:
 Hi Ludovico,

 The mri_vol2surf example I sent you directly resample to fsaverage5,
 which is around 4mm spacing, resulting in 18715 vertices for both
 hemispheres combined after excluding the medial wall in the surfaces.

 I am also including the freesurfer mailing list in the email as
 suggested by Bruce.

 --Thomas

 On Thu, May 16, 2013 at 8:25 PM, Bruce Fischl
 fis...@nmr.mgh.harvard.edu wrote:
 Hi Ludovico

 I wouldn't downsample before calling mri_surf2surf. We have tools for
 uniformly parcellating the cortex (mris_make_face_parcellation) that can 
 be
 used for this purpose after sampling the timecourses to the cortex.


 cheers
 Bruce
 On Thu, 16 May 2013, Ludovico Minati wrote:

 Hi Bruce,

 many thanks. Yes sorry I shall use the list from now on. But let me
 just ask you a clarification as we are already on these questions

 For our connectivity analyses, at present we parcellated in 3D volume
 space the cortex into a pre-set number of roughly equal volume
 parcels, ranging in number between around 500 to 10,000. I would need
 to translate this approach to the surface space in Freesurfer, i.e. be
 able to smooth on the cortical surface and undersample it. What is the
 best approach that can be used?

 Along this like: you wrote around 150k vertices/hemisphere. For our
 purposes that's an enormous number, much larger than the number of EPI
 voxels. How can we mesh downsample before calling mri_vol2surf?

 Again thanks for your kind help and patience

 Ludovico


 On 16 May 2013 14:09, Bruce Fischl fis...@nmr.mgh.harvard.edu wrote:
 Hi Ludovico

 can we move this discussion to the FreeSurfer list in the future so
 others
 can answer?

 1. Hard to say as sometimes one works better than the other, you'll 
 just
 have to try. The transform should be rigid (6DOF) since the scalings 
 are
 read from the header, why would you want affine? I think Doug has 
 worked
 on
 this and you can specify it in the bbregister command line, but I've
 never
 used it.

 2. About 150K vertices/hemisphere. They are distributed initially at 
 1mm
 spacing (the surface of the voxels), and cannot be tuned. There are 
 some
 tools around for mesh downsampling if you want, and this is even easier
 if
 you go to fsaverage space (with mri_surf2surf) where we have
 representations
 based on recursive icosahedral supersamplings.

 3.  This is due to a bug in the initial nifti format that didn't allow
 any
 one dimension greater than 64K. If you output in .mgz it should be
 nvertices
 x 1 x 1 x ntimepoints.

 4. Search for coordinate systems on our wiki. This is documented
 extensively.

 there are also matlab i/o functions for reading/writing all our formats
 (e.g. MRIread.m)

 cheers
 Bruce


 On Thu, 16 May 2013, Ludovico Minati wrote:

 Hi Thomas,

 thanks. A few quick questions, which hopefully will take little of
 your time but save me a lot of hassle:

 1) bbregister. Do you advise using FLIRT or SPM for initialization? Is
 this a rigid-body transformation, or an affine one? Any way I can
 control the DOF? If I use SPM shall I feed the mean realigned 

Re: [Freesurfer] mri_glmfit files

2013-05-27 Thread Douglas Greve


Look at mri_glmfit --help. The only one not explained there is cnr.mgh 
which is the contrasts (gamma) to residual noise stddev (rstd.mgh in the 
glmdir)

doug


On 5/27/13 4:48 AM, Joshua deSouza wrote:

Hello all,

I would just like to know what is the significance of the files that 
are produced after a glmfit is done. I was trying to find a write up 
online but I was not able to.


They include :

- cnr.mgh
- F.mgh
- gamma.mgh
- gammavar.mgh
- sig.mgh

Thank you


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


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


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] recon-all with FLAIR error no FSL installed

2013-05-27 Thread Douglas Greve


If FSL is not installed, then bbregister should have failed and 
recon-all should have stopped. Did that not happen?


To answer your question, it might not make any difference. If the flair 
and T1 were acquired at the same time, then it probably just used the 
scanner coordinates to do the initial alignment, which was probably 
pretty good. You can view the registration to see how good it is (and 
look at the first value in the mincost file, if that is less than .7, is 
is probably fine)


In the end, if your surfaces look ok, then it fine.

doug


On 5/27/13 8:19 AM, Bruce Fischl wrote:

Hi Veronica

thanks for the offer, but I don't need to see them. Glad it seems to 
be working. As for BBR, I'll leave that for Doug

Bruce
On Mon, 27 May 2013, Popescu, Veronica wrote:


Dear Bruce,
They look good to me. Should I upload a couple of them, so you can 
have a look? They're about 230MB each.
My question is: how serious is the BBR not initializing? Should I run 
everything again with FSL installed?

Best wishes,
Veronica

-Original Message-
From: Bruce Fischl [mailto:fis...@nmr.mgh.harvard.edu]
Sent: vrijdag 24 mei 2013 15:59
To: Popescu, Veronica
Cc: 'freesurfer@nmr.mgh.harvard.edu'
Subject: Re: [Freesurfer] recon-all with FLAIR error no FSL installed

Hi Veronica

BBR can use FSL or SPM to initialize, although we'll probably add an 
option
in the future to use some things that Martin Reuter and Christian 
Wachinger
are working on. How did the refinement work? We've only run it on a 
handful

of cases, so it's pretty bleeding edge and I'm interested in feedback.

cheers
Bruce


On Fri, 24 May 2013, Popescu, Veronica
wrote:


Dear all,
I am running FreeSurfer 5.3 with FLAIR refinement. I do not have FSL 
installed. I do get results but there's an
error message in the log file (attached) about the FSL installation 
missing.
How bad is it? Do I have to rerun everything with FSL installed? And 
if so, is there any version that is

preferable?
Thank you very much in advance!
Best wishes,
Veronica






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.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] white matter volume per lobe...

2013-05-27 Thread Douglas Greve
you will need to run mri_annotation2label and specify the output to be 
an annotation file instead of a segmentation. Then you will have to run 
mri_aparc2aseg, specifying your lobes annotation as well as --labelwm 
(look in the recon-all.log file for an example of how wmparc.mgz is 
created). Then run mri_segstats (you can also get an example from the 
recon-all.log file).
doug


On 5/27/13 5:53 PM, Gonzalo Rojas Costa wrote:
 Hi:

I used the following commands to get the cortical volume per each lobe:

 mri_annotation2label --subject OAS1_0001_MR1 --hemi rh --lobesStrict
 lobulos --seg lobulos --stat lobulos
 mri_annotation2label --subject OAS1_0001_MR1 --hemi lh --lobesStrict
 lobulos --seg lobulos --stat lobulos
 mris_anatomical_stats -a lobulos -f OAS1_0001_MR1_lobulos_rh -b OAS1_0001_MR1 
 rh
 mris_anatomical_stats -a lobulos -f OAS1_0001_MR1_lobulos_lh -b OAS1_0001_MR1 
 lh

Which commands (sintaxis) must I use to compute the white matter
 volume per each lobe ?... I tested the mri_aparc2aseg and mri_segstats
 commans with different options, but I couldn't get the volume that I
 need...

Sincerely,


 --
 Gonzalo Rojas Costa
 Laboratory for Advanced Medical Image Processing
 Department of Radiology
 Clínica las Condes
 Lo Fontecilla 441, Las Condes, Santiago, Chile.
 Tel: 56-2-2105170
 Cel: 56-9-97771785
 www.clc.cl

 ___
 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] possible to use freesurfer segmentations to get mean values for anatomic structures from other sequences

2013-05-27 Thread Salil Soman
Thank you Doug,

I think I initially misinderstood a number of things about this process. I
have a 3D GRE volume (I guessed its contrast is closest to BOLD, bbregister
set to T1 or T2 seemed to work more poorly). It is not a 2D. I would like
to transform the 3D GRE volume into freesurfer space, so mri_segstats can
use the segmentations from aparc+aseg.mgz to give back mean intensity
values for each anatomic area.  I could not find a file called lowb.nii,
and so was not sure how to proceed.

1) do I need to use the file you mentioned (lowb.nii) - and if so, where
would I find the file?

2) so running mri_vol2vol --mov Vol_906.nii --fstarg T1.mgz --o
Vol_906_Reg_Bold.nii --no-save-reg --reg register_bold.dat (note inv left
off) should map the 3D volume (Vol_906.nii) into the T1 space?

Thank you for all of your help.

Best wishes,

Sal




On Mon, May 27, 2013 at 7:23 PM, Douglas Greve gr...@nmr.mgh.harvard.eduwrote:


 On 5/26/13 2:11 PM, Salil Soman wrote:

Dear Doug,

 Thank you for your email. Following up on our previous discussions:

  1) *bbregister fail *- this was happening because of error from
 fslregister. The variable fsvol was translating to ERROR. In fslregister
 th value for fsvol is set to brainmask, along with numerous other
 parameters being initialized.
 By adding the line set fsvol = brain mask (without quotes) at the
 beginning of the section #Convert reference to analyze the CentOS 6
 version I am running on ubuntu 12.04 (with SGE), now works.

 see previous msg.


  2) when you suggested I run bbregister on the lowb.nii file, was it
 because I had suggested I wanted to register to a 2D ADC map? If I want to
 instead use a 3D volume (e.g. a 3D ASL), would I use the actual volume I
 want to get value from instead of lowb.nii?  I ended up running

 Oh, I did not realize it was a 2D map. Why do you have a 2D map instead of
 3D? That might be hard to get registered. You could have used the ADC or
 FA. In general, you don't want to use the contrast that you will later be
 testing as it creates a little bit of circularity. It is not much though,
 and it should be fine.


  3) for the mri_vol2vol step - I had to change targ to fstarg, and I left
 out the interp flag so it would do its default trilinear:  mri_vol2vol
 --mov Vol_906.nii --fstarg T1.mgz --o Vol_906_Reg_Bold.nii --no-save-reg
 --reg register_bold.dat --inv

 that maps T1 into the bold space. Is that what you want? If you want to
 map the bold into the anatomical space, then leave off -inv. This will also
 solve your problem below
 doug


  4) I would like to get the segmentations from aparc+aseg.mgz as the areas
 where I get the values summed. So I entered mri_segstats --seg
 mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i
 Vol_906_Reg_Bold.nii --sum Vol_aparc_aseg.stats



  but then I received this error:

  ERROR: dimension mismatch between input volume and seg
   input 224 224 170
   seg   256 256 256
 *
 *
  *So, in summary, while I've fixed bbregister to work on my system, I am
 still having trouble normalizing my 3D non T1 volume data into the FS space
 to be able to use the labels from aparc+aseg.mgz to get statistics for each
 anatomic area.*

 Any ideas on how to proceed?

 Thanks,

 Sal


 On Sat, May 25, 2013 at 11:51 AM, Douglas Greve gr...@nmr.mgh.harvard.edu
  wrote:


 On 5/25/13 1:39 PM, Salil Soman wrote:

   Thank you Doug.

  Just so I am clear - is the anatomical the nifti T1.mgz or is it a
 different file. From your email I gather should do the following:

 *1)  Use bbregister to register the lowb image to the anatomical. This
 creates a registration matrix.*

  bbregister -s SUBJECTNAME --mov lowb.nii --initfsl --reg register.dat

  That is right, but add --t2 (since it is t2 weighted).


 *2) Use mri_vol2vol and the registration to map the ADC map to the
 anatomical*

 mri_vol2vol --mov lowb.nii --targ $vol --inv --interp nearest --o $vol2diff 
 --reg $outdir/register.dat --no-save-reg

Use the ADC as the moveable (not lowb, but use the lowb for
 bbregister). The target volume should be the T1.mgz (or any conformed
 volume). The output will be the adc in the anatomical space (not sure why
 you call it vol2diff).

   *3) use mri_segstats to extract the values*

 *mri_segstats* --seg $SUBJECTS_DIR/SUBJECTNAME/mri/wmparc.mgz --ctab 
 $FREESURFER_HOME/FreeSurferColorLUT.txt --i lowb.nii --sum fa.stats

The input would be the adc volume mapped the anatomical space. I
 would use WMParcStatsLUT.txt or else you'll get a billion different areas
 not represented in wmparc. You may also want to add --seg-erode 1 to
 erode the segmentations by a voxel. This helps to prevent partial voluming.

 doug



   Where lowb.nii is the other MRI tissue sequence I am analyzing (e.g.
 ADC), $vol2diff is the output image of the registration, and fa.stats will
 be my output stats table?

  I suspect there is part of the syntax for these tools I do not
 understand. Also, what input would $vol be?

 

Re: [Freesurfer] possible to use freesurfer segmentations to get mean values for anatomic structures from other sequences

2013-05-27 Thread Douglas Greve


On 5/27/13 10:42 PM, Salil Soman wrote:

Thank you Doug,

I think I initially misinderstood a number of things about this 
process. I have a 3D GRE volume (I guessed its contrast is closest to 
BOLD, bbregister set to T1 or T2 seemed to work more poorly). It is 
not a 2D. I would like to transform the 3D GRE volume into freesurfer 
space, so mri_segstats can use the segmentations from aparc+aseg.mgz 
to give back mean intensity values for each anatomic area.  I could 
not find a file called lowb.nii, and so was not sure how to proceed.


1) do I need to use the file you mentioned (lowb.nii) - and if so, 
where would I find the file?
You should look at the on-line tutorial for multimodal integration. I 
thought you were doing DTI and the lowb the the acquistion with bvalue=0.


2) so running mri_vol2vol --mov Vol_906.nii --fstarg T1.mgz --o 
Vol_906_Reg_Bold.nii --no-save-reg --reg register_bold.dat (note inv 
left off) should map the 3D volume (Vol_906.nii) into the T1 space?

yes


Thank you for all of your help.

Best wishes,

Sal




On Mon, May 27, 2013 at 7:23 PM, Douglas Greve 
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:



On 5/26/13 2:11 PM, Salil Soman wrote:

Dear Doug,

Thank you for your email. Following up on our previous discussions:

1) *bbregister fail *- this was happening because of error from
fslregister. The variable fsvol was translating to ERROR. In
fslregister th value for fsvol is set to brainmask, along with
numerous other parameters being initialized.
By adding the line set fsvol = brain mask (without quotes) at
the beginning of the section #Convert reference to analyze the
CentOS 6 version I am running on ubuntu 12.04 (with SGE), now works.

see previous msg.



2) when you suggested I run bbregister on the lowb.nii file, was
it because I had suggested I wanted to register to a 2D ADC map?
If I want to instead use a 3D volume (e.g. a 3D ASL), would I use
the actual volume I want to get value from instead of lowb.nii? 
I ended up running

Oh, I did not realize it was a 2D map. Why do you have a 2D map
instead of 3D? That might be hard to get registered. You could
have used the ADC or FA. In general, you don't want to use the
contrast that you will later be testing as it creates a little bit
of circularity. It is not much though, and it should be fine.



3) for the mri_vol2vol step - I had to change targ to fstarg, and
I left out the interp flag so it would do its default trilinear:
mri_vol2vol --mov Vol_906.nii --fstarg T1.mgz --o
Vol_906_Reg_Bold.nii --no-save-reg --reg register_bold.dat --inv

that maps T1 into the bold space. Is that what you want? If you
want to map the bold into the anatomical space, then leave off
-inv. This will also solve your problem below
doug



4) I would like to get the segmentations from aparc+aseg.mgz as
the areas where I get the values summed. So I entered
mri_segstats --seg mri/aparc+aseg.mgz --ctab
$FREESURFER_HOME/FreeSurferColorLUT.txt --i Vol_906_Reg_Bold.nii
--sum Vol_aparc_aseg.stats




but then I received this error:

 ERROR: dimension mismatch between input volume and seg
  input 224 224 170
  seg   256 256 256
*
*
*So, in summary, while I've fixed bbregister to work on my
system, I am still having trouble normalizing my 3D non T1 volume
data into the FS space to be able to use the labels from
aparc+aseg.mgz to get statistics for each anatomic area.*

Any ideas on how to proceed?

Thanks,

Sal


On Sat, May 25, 2013 at 11:51 AM, Douglas Greve
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:


On 5/25/13 1:39 PM, Salil Soman wrote:

Thank you Doug.

 Just so I am clear - is the anatomical the nifti T1.mgz or
is it a different file. From your email I gather should do
the following:

*1)  Use bbregister to register the lowb image to the
anatomical. This creates a registration matrix.*

bbregister -s SUBJECTNAME --mov lowb.nii --initfsl --reg
register.dat

That is right, but add --t2 (since it is t2 weighted).



*2) Use mri_vol2vol and the registration to map the ADC map
to the anatomical*
mri_vol2vol --mov lowb.nii --targ $vol --inv --interp nearest --o 
$vol2diff --reg $outdir/register.dat --no-save-reg

Use the ADC as the moveable (not lowb, but use the lowb for
bbregister). The target volume should be the T1.mgz (or any
conformed volume). The output will be the adc in the
anatomical space (not sure why you call it vol2diff).


*3) use mri_segstats to extract the values*
*mri_segstats*  --seg $SUBJECTS_DIR/SUBJECTNAME/mri/wmparc.mgz --ctab 
$FREESURFER_HOME/FreeSurferColorLUT.txt --i lowb.nii --sum fa.stats

The input would be the adc volume