[Freesurfer] Extract the cerebellum

2020-07-23 Thread Camargo, Aldo
External Email - Use Caution

Hi Freesurfer experts,

I am trying to extract only the cerebellum and then save it to nii file. How 
can I do it with freesurfer ?

Thanks a lot and have a nice day,

Aldo

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

Re: [Freesurfer] Subcortical Structure Pial Line Exclusion

2020-07-23 Thread Angel Hammond
External Email - Use Caution

Hi Doug,

Yes that's the area. Thank you for your help!


Angel Hammond

Research Specialist

Center for Healthy Minds

University of Wisconsin-Madison



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

Sent: Thursday, July 23, 2020 9:37 AM
To: freesurfer@nmr.mgh.harvard.edu 
Subject: Re: [Freesurfer] Subcortical Structure Pial Line Exclusion

do you mean where the cursor is? That's in hippocampus or amygdala, so it is 
fine that the pial surfaces cuts through them

On 7/21/2020 1:44 PM, Angel Hammond wrote:

External Email - Use Caution

Hello Freesurfer Experts,

I think I may already know the answer to this, but just wanted to check in to 
be sure. I know that in general when checking the recon for a subject for pial 
and wm line correctness, that subcortical structure segmentation within those 
lines is not that important to correct. I was looking at a subject that looks 
to be be omitting subcortical structures from the pial line and persists for 
many slices. Is this something that needs to be corrected with wm edits or is 
this not to be worried about? I included some screenshots of the area.

Thanks!


Angel Hammond

Research Specialist

Center for Healthy Minds

University of Wisconsin-Madison





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

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

Re: [Freesurfer] How to do permutation for multiple comparison correction?

2020-07-23 Thread Douglas N. Greve

You would have a design matrix with two columns and rows equal to n+1, eg
1  0
0 1
0 1
0 1
0 1
... n times

you would then permute the design matrix

On 7/23/2020 12:06 PM, Xiaojiang Yang wrote:


External Email - Use Caution

Hi Doug,

For the first question, you answered "It is unusual, though it should 
work". Could you please briefly describe the way FS used to permute 
(based on my notation v0, v1, ... vn)? Or, the usual way to permute?


The way I described seems to be the only way I can think of. Looking 
forward to your help here. Thanks a lot!


Xiao

Douglas N. Greve 
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N.+Greve%22>Thu, 
23 Jul 2020 07:37:13 -0700 
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20200723>

On 7/21/2020 11:45 AM, Xiaojiang Yang wrote:

 External Email - Use Caution

Hi Doug,
For your questions:

1. "Not sure what you mean by in the ROI. Are you trying to
permute across space? That generally does not work because the
points are not exchangeable across space."

By "In the ROI", I mean for all vertices listed in the label file. Here, I 
am
talking about a test subject and n control subjects, they are all 
considered in the same
reference subject space - fsaverage. A ROI is defined by a label file for 
the subject
fsaverage. So, I am comparing the test subject and control group on the 
same ROI region,
vertex by vertex. I want to permute points in the test subject and points 
in all subjects
in control groups.
I am not talking about permuting vertex locations; I am talking about 
permuting
values (thickness in my case) from subjects on each vertex. For example, for
vertex i, I have one value (v0) from test subject, and n values (v1, 
v2,...vn)
from control subjects:
test subject  control subjects
v0v1, v2, .. vn
One way of permutation would be:
test subject  control subjects
v1v0, v2, .. vn
Is this a reasonable way to do permutation?

It is unusual, though it should work.

2. "Not sure. You cannot discriminate between the groups when you
are doing permutation"

By doing the permutation many (say 1000) times, I want to get the 
probability
distribution of the sampling (observed or test) data inside the ROI area, so
that I can decide if I should reject or accept null hypothesis based on
cluster-wise significance level. What problems do you think I have in this 
idea?

That should work. I'm not sure what my original concern was

Thanks a lot!
On 7/21/2020 1:12 AM, Xiaojiang Yang wrote:

  External Email - Use Caution

 Dear FS experts,

 Instead of using mri_glmfit-sim, I am trying to implement a
 customized multiple comparison correction algorithm using
 permutation. Before I implement my own, I want to make sure my
 permutation idea is correct. So I was looking at how
 mri_glmfit-sim does the permutation. The link here
 http://freesurfer.net/fswiki/FsTutorial/MultipleComparisonsV6.0Perm has  
<http://freesurfer.net/fswiki/FsTutorial/MultipleComparisonsV6.0Perm%C2%A0has>
 
<http://freesurfer.net/fswiki/FsTutorial/MultipleComparisonsV6.0Perm%C2%A0has>

 a simple description for how to do permutation, but I don't quite
 understand the 1st step: Permute the design matrix. To me, permute
 the design matrix means permute the matrix rows here, but still
 hard to understand why permuting matrix rows does the trick.

This is pretty standard in permutation. I think Tom Nichols has
some basic tutorials on how permutations work.

 Anyway, I will not use any design matrix in my customized
 implementation, so it does not matter for now. My problem can be
 described as follows: if I have a ROI (a label file) on fsaverage,
 and I have a test subject and a group of control subjects whose
 thickness values on every vertex in this label are all known. (The
 test subject and control subjects are all using fsaverage
 reference space). I want to compare this test subject's thickness
 within the ROI to a control group of subjects (within the same
 ROI). This is a multiple-comparison problem, so I want to use
 permutation to get less FP rate. My question is: How do I permute
 the test subject's points and control subjects' points in ROI?

Not sure what you mean by in the ROI. Are you trying to permute
across space? That generally does not work because the points are
not exchangeable across space.

 My understanding is that: for each point in the label, I randomly
 re-assign all (1+n) values from (1

Re: [Freesurfer] nu_correct error {Disarmed}

2020-07-23 Thread Bahrani, Ahmed A.
External Email - Use Caution

Hi Douglas,

For the container, I am using version 6.0.0-min
The freesurfer on my computer is 
freesurfer-Linux-centos4_x86_64-stable-pub-v5.3.0

Thanks,
Ahmed

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

Sent: Thursday, July 23, 2020 10:31 AM
To: freesurfer@nmr.mgh.harvard.edu 
Subject: Re: [Freesurfer] nu_correct error {Disarmed}

CAUTION: External Sender

what version of freesurfer are you running?

On 7/17/2020 2:24 PM, Bahrani, Ahmed A. wrote:

External Email - Use Caution

Hi Douglas,

I am using the following:

Linux Redhat version 7.9
Singularity version 3.6.0
Freesurefer version 6.0.0-min (for containers)

I checked all the recon-all.log, and it looks like all of the old reports and I 
could not find where the error report of the freesurefer save from the 
container. I have checked the file output, and it does not have a 
recall-all.log.

Thanks,
Ahmed

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

 on behalf of Douglas N. Greve 

Sent: Friday, July 17, 2020 10:12 AM
To: freesurfer@nmr.mgh.harvard.edu 

Subject: Re: [Freesurfer] nu_correct error

CAUTION: External Sender

What version are you running? Can you send the recon-all.log file?

On 7/16/2020 3:40 PM, Bahrani, Ahmed A. wrote:

External Email - Use Caution

Hello Freesurfer experts,

I have a question related to the singularity container to run a bash script 
that contains a freesurfer's commend "nu_correct".

The singularity container only runs as a root user login and gives error as 
shown below with a general user login.

==

---Error message---
evaluate_field: posixio.c:210: px_pgin: Assertion `*posp == ((off_t)(-1)) || 
*posp == lseek(nciop->fd, 0, 1)' failed.
nu_evaluate: crashed while running evaluate_field (termination status=134)
nu_correct: crashed while running nu_evaluate (termination status=65280)


---Error message---
ncvarput: ncid 4: No space left on device
mivarput1: MINC package entry point
nu_evaluate: crashed while running minccalc (termination status=768)
nu_correct: crashed while running nu_evaluate (termination status=768)


Would you advise, please?

Thanks,
Ahmed



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from 
"nam04.safelinks.protection.outlook.com" claiming to be 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer




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

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

Re: [Freesurfer] How to do permutation for multiple comparison correction?

2020-07-23 Thread Xiaojiang Yang
External Email - Use Caution

Hi Doug,

For the first question, you answered "It is unusual, though it should
work". Could you please briefly describe the way FS used to permute (based
on my notation v0, v1, ... vn)? Or, the usual way to permute?

The way I described seems to be the only way I can think of. Looking
forward to your help here. Thanks a lot!

Xiao

Douglas N. Greve
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N.+Greve%22>
 Thu, 23 Jul 2020 07:37:13 -0700
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20200723>

On 7/21/2020 11:45 AM, Xiaojiang Yang wrote:

External Email - Use Caution

Hi Doug,
For your questions:

1. "Not sure what you mean by in the ROI. Are you trying to permute
across space?
That generally does not work because the points are not exchangeable across
space."

By "In the ROI", I mean for all vertices listed in the label file. Here, I am
talking about a test subject and n control subjects, they are all
considered in the same
reference subject space - fsaverage. A ROI is defined by a label file
for the subject
fsaverage. So, I am comparing the test subject and control group on
the same ROI region,
vertex by vertex. I want to permute points in the test subject and
points in all subjects
in control groups.
I am not talking about permuting vertex locations; I am talking about permuting
values (thickness in my case) from subjects on each vertex. For example, for
vertex i, I have one value (v0) from test subject, and n values (v1, v2,...vn)
from control subjects:
test subject  control subjects
v0v1, v2, .. vn
One way of permutation would be:
test subject  control subjects
v1v0, v2, .. vn
Is this a reasonable way to do permutation?

It is unusual, though it should work.

2. "Not sure. You cannot discriminate between the groups when you are doing
permutation"

By doing the permutation many (say 1000) times, I want to get the probability
distribution of the sampling (observed or test) data inside the ROI area, so
that I can decide if I should reject or accept null hypothesis based on
cluster-wise significance level. What problems do you think I have in this idea?

That should work. I'm not sure what my original concern was

Thanks a lot!
On 7/21/2020 1:12 AM, Xiaojiang Yang wrote:

 External Email - Use Caution

Dear FS experts,

Instead of using mri_glmfit-sim, I am trying to implement a
customized multiple comparison correction algorithm using
permutation. Before I implement my own, I want to make sure my
permutation idea is correct. So I was looking at how
mri_glmfit-sim does the permutation. The link here
http://freesurfer.net/fswiki/FsTutorial/MultipleComparisonsV6.0Perm has

<http://freesurfer.net/fswiki/FsTutorial/MultipleComparisonsV6.0Perm%C2%A0has>
a simple description for how to do permutation, but I don't quite
understand the 1st step: Permute the design matrix. To me, permute
the design matrix means permute the matrix rows here, but still
hard to understand why permuting matrix rows does the trick.


This is pretty standard in permutation. I think Tom Nichols has some basic
tutorials on how permutations work.

Anyway, I will not use any design matrix in my customized
implementation, so it does not matter for now. My problem can be
described as follows: if I have a ROI (a label file) on fsaverage,
and I have a test subject and a group of control subjects whose
thickness values on every vertex in this label are all known. (The
test subject and control subjects are all using fsaverage
reference space). I want to compare this test subject's thickness
within the ROI to a control group of subjects (within the same
ROI). This is a multiple-comparison problem, so I want to use
permutation to get less FP rate. My question is: How do I permute
the test subject's points and control subjects' points in ROI?


Not sure what you mean by in the ROI. Are you trying to permute across space?
That generally does not work because the points are not exchangeable across
space.

My understanding is that: for each point in the label, I randomly
re-assign all (1+n) values from (1+n) subjects to these (n+1)
subjects (where n is the number of subjects in control group). And
when all points in the label are done, this is only 1 permutation.
I will need at least 1000 times of permutation to get the
comparison statistics.

Is my understanding right?


Not sure. You cannot discriminate between the groups when you are doing
permutation

Thank you!
Xiao


___
Freesurfer mailing
listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/fr

Re: [Freesurfer] Fwd: Cortical Parcellations in FreeDurger 7

2020-07-23 Thread Douglas N. Greve

http://freesurfer.net/fswiki/ThalamicNuclei

On 7/23/2020 11:04 AM, Al Qadi, Ameen wrote:


External Email - Use Caution

Thank you. How do I generate this image? It wasn't generated using 
recon-all.


On Thu, Jul 23, 2020 at 10:55 AM Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:


aparc+aseg does not have the thalamic nuclei. You need to run it
on ThalamicNuclei.v10.T1.FSvoxelSpace.mgz

On 7/22/2020 6:26 PM, Al Qadi, Ameen wrote:


External Email - Use Caution

Hi Douglas,


mri_segstats wouldn't generate binary ROI masks, so I tried using
*mri_binarize* and *mri_extract_label* to produce masks for
thalamic nuclei, but I run into the same problem of generating
empty masks (these commands worked for other ROIs):


  * $: mri_extract_label aparc+aseg.nii 8005 thalamus_vent_lat.nii

reading volume from aparc+aseg.nii...

extracting label 8005 ()

writing output to thalamus_vent_lat.nii.


  * $: mri_binarize --i aparc+aseg.nii --o thalamus_vent_lat.nii
--match 8005

7.1.0

cwd /data/freesurfer/subjects/S12452/mri

cmdline mri_binarize --i aparc+aseg.nii --o thalamus_vent_lat.nii
--match 8005

sysname#

hostname #

machine#

user ##


inputaparc+aseg.nii

frame0

nErode3d 0

nErode2d 0

output thalamus_vent_lat.nii

Binarizing based on matching values

nMatch 1

08005

binval1

binvalnot 0

fstart = 0, fend = 0, nframes = 1

Found 0 values in range

Counting number of voxels in first frame

Found -1 voxels in final mask

Count: -1 -0.343000 32768000 -0.03

mri_binarize done


I'd appreciate any feedback you may have.



Best,

Ameen



On Tue, Jul 21, 2020 at 10:34 AM Douglas N. Greve
mailto:dgr...@mgh.harvard.edu>> wrote:

I don't know. I'm not that familiar with FSL programs. If you
want our help, try using mri_segstats. If something goes
wrong send the command line

On 7/21/2020 10:26 AM, Al Qadi, Ameen wrote:


External Email - Use Caution

Hi Douglas,

I see the CLUT file, it's the same one I've been using. I
have been using FSL (fslmaths) to extract anatomical ROIs
from the aparc+aseg using the CLUT indices as thresholds.
This normally works, but results in empty ROIs for thalamic
nuclei (but not for whole thalamus). What do you think could
be the problem?

Best,
Ameen

On Fri, Jul 17, 2020 at 10:33 AM Douglas N. Greve
mailto:dgr...@mgh.harvard.edu>> wrote:



On 7/17/2020 10:25 AM, Al Qadi, Ameen wrote:


External Email - Use Caution

Dear Freesurfer Developers,


I hope this email finds you all safe and well. I have
two questions regarding the new version of freesurfer:

  * Is there a new CLUT associated with FS7? I tried to
use the CLUT labels to extract thalamic subnuclei
ROIs, but got empty ROI files.


They should be  in $FREESURFER/FreeSurferColorLUT.txt
How are you extracting?


  * Given that Freesurfer version 7 contains
segmentations not previously generated in recon-all
(i.e. hippocampal subfields), is it possible to
extract these ROIs using aparc+aseg images
generated using previous versions of Freesurfer? Or
do we need to repeat the cortical parcellations
(i.e. rerun recon-all) using FS7?


You can run  the hippocamal and thalamic segs on FS
version 6 subjects.


I’d highly appreciate your time and feedback on this
matter. Thank you.


Best,

Ameen

-- 
Ameen Al Qadi

MSBS Candidate
Icahn School Of Medicine at Mount Sinai '20
+1-646-500-1521
ameen.alq...@icahn.mssm.edu


___
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



-- 
Ameen Al Qadi

MSBS Candidate
Icahn School Of Medicine at Mount Sinai '20
+1-646-500-1521
ameen.alq...@icahn.mssm.edu 
-- 
Ameen Al Qadi

MSBS Candidate
Icahn School Of Medicine at Mount Sinai '20

Re: [Freesurfer] mri_aparc2aseg doesn't write output

2020-07-23 Thread Douglas N. Greve
does the mri folder exist? do you have write permission to it? is the 
disk out of space?


On 7/23/2020 11:04 AM, Ellen Ji wrote:


External Email - Use Caution

Yes, exactly, I am running it from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0.


(using a virtual machine, but ran mri_aparc2aseg a few weeks ago with 
no problem)


On 7/23/2020 4:56 PM, Douglas N. Greve wrote:

Sorry, it should be from
/home/eji/projects/spins/preproc/freesurfer/subjects/w0
(without the /mri)

On 7/23/2020 8:37 AM, Ellen Ji wrote:


External Email - Use Caution

Dear experts,

I am running mri_aparc2aseg and, based on the output, it seems to 
run through successfully until the very end where it does not 
actually write the file (I receive "error: niiWrite(): error opening 
file mri/aparc.500+2mm.nii.gz"). However, I am 100% sure that I have 
writing access in the directory. Below you will see the details. Do 
you know why I am having this issue? Thank you for your time, Ellen


mri_aparc2aseg \
> --s SPN01_CMH_0001_01 \
> --annot 500_sym.aparc \
> --wmparc-dmax 2 \
> --labelwm \
> --hypo-as-wm  \
> --o mri/aparc.500+2mm.nii.gz
SUBJECTS_DIR /home/eji/projects/spins/preproc/freesurfer/subjects/w0
subject SPN01_CMH_0001_01
outvol mri/aparc.500+2mm.nii.gz
useribbon 0
baseoffset 0
labeling wm
labeling hypo-intensities as wm
dmaxctx 2.00
RipUnknown 0
8 avail.processors, using 1

Reading lh white surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/lh.white

Reading lh pial surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/lh.pial

Loading lh annotations from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/label/lh.500_sym.aparc.annot
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.28231/seg.1.073.xhemi.ctab)
Have color table for lh white annotation

Building hash of lh white

Building hash of lh pial

Reading rh white surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/rh.white

Reading rh pial surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/rh.pial

Loading rh annotations from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/label/rh.500_sym.aparc.annot
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.12874/seg.1.073.xhemi.ctab)
Have color table for rh white annotation

Building hash of rh white

Building hash of rh pial
Loading ribbon segmentation from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/ribbon.mgz
Loading filled from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/ribbon.mgz

Loading aseg from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/aseg.mgz
ASeg Vox2RAS: ---
-1.0   0.0   0.0   128.0;
  0.0   0.0   1.0  -128.0;
  0.0  -1.0   0.0   128.0;
  0.0   0.0   0.0   1.0;
-

Labeling Slice (256)
   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39
  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59
  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79
  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 nctx = 906029
Used brute-force search on 0 voxels
Fixing Parahip LH WM
   Found 1 clusters
  0 k 791.00
Fixing Parahip RH WM
   Found 3 clusters
  0 k 751.00
  1 k 1.00
  2 k 2.00
Writing output aseg to mri/aparc.500+2mm.nii.gz
error: niiWrite(): error opening file mri/aparc.500+2mm.nii.gz
#VMPC# mri_aparc2aseg VmPeak  1376092
mri_aparc2aseg done

___
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

Re: [Freesurfer] area.pial files for fsaverage

2020-07-23 Thread Xiaojiang Yang
External Email - Use Caution

OK. I see that file. So that is the pial surface area for fsaverage subject.

Thank you!

Douglas N. Greve
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N.+Greve%22>
 Thu, 23 Jul 2020 07:54:35 -0700
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20200723>
Do you not see ?lh.pial.avg.area.mgh in $FREESURFER/subjects/fsaverage/surf
?

On 7/21/2020 3:11 PM, Xiaojiang Yang wrote:

External Email - Use Caution

Dear FS developers,


I have noticed that for each subject, there are ?h.area and ?h.area.pial
files under the $SUBJECT_DIR/$subject/surf sub-directory. According to
Bruce's words from here
https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg23751.html, they
are for white surfaces and pial surfaces respectively. But for the
fsaverage subject, I only find file ?h.area; there are no ?h.area.pial
files existing. Could you tell me why? and where can I get those files?

Thanks!
Xiao

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

Re: [Freesurfer] Fwd: Cortical Parcellations in FreeDurger 7

2020-07-23 Thread Douglas N. Greve
aparc+aseg does not have the thalamic nuclei. You need to run it on 
ThalamicNuclei.v10.T1.FSvoxelSpace.mgz


On 7/22/2020 6:26 PM, Al Qadi, Ameen wrote:


External Email - Use Caution

Hi Douglas,


mri_segstats wouldn't generate binary ROI masks, so I tried using 
*mri_binarize* and *mri_extract_label* to produce masks for thalamic 
nuclei, but I run into the same problem of generating empty masks 
(these commands worked for other ROIs):



  * $: mri_extract_label aparc+aseg.nii 8005 thalamus_vent_lat.nii

reading volume from aparc+aseg.nii...

extracting label 8005 ()

writing output to thalamus_vent_lat.nii.


  * $: mri_binarize --i aparc+aseg.nii --o thalamus_vent_lat.nii
--match 8005

7.1.0

cwd /data/freesurfer/subjects/S12452/mri

cmdline mri_binarize --i aparc+aseg.nii --o thalamus_vent_lat.nii 
--match 8005


sysname#

hostname #

machine#

user ##


inputaparc+aseg.nii

frame0

nErode3d 0

nErode2d 0

output thalamus_vent_lat.nii

Binarizing based on matching values

nMatch 1

08005

binval1

binvalnot 0

fstart = 0, fend = 0, nframes = 1

Found 0 values in range

Counting number of voxels in first frame

Found -1 voxels in final mask

Count: -1 -0.343000 32768000 -0.03

mri_binarize done


I'd appreciate any feedback you may have.



Best,

Ameen



On Tue, Jul 21, 2020 at 10:34 AM Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:


I don't know. I'm not that familiar with FSL programs. If you want
our help, try using mri_segstats. If something goes wrong send the
command line

On 7/21/2020 10:26 AM, Al Qadi, Ameen wrote:


External Email - Use Caution

Hi Douglas,

I see the CLUT file, it's the same one I've been using. I have
been using FSL (fslmaths) to extract anatomical ROIs from the
aparc+aseg using the CLUT indices as thresholds. This normally
works, but results in empty ROIs for thalamic nuclei (but not for
whole thalamus). What do you think could be the problem?

Best,
Ameen

On Fri, Jul 17, 2020 at 10:33 AM Douglas N. Greve
mailto:dgr...@mgh.harvard.edu>> wrote:



On 7/17/2020 10:25 AM, Al Qadi, Ameen wrote:


External Email - Use Caution

Dear Freesurfer Developers,


I hope this email finds you all safe and well. I have two
questions regarding the new version of freesurfer:

  * Is there a new CLUT associated with FS7? I tried to use
the CLUT labels to extract thalamic subnuclei ROIs, but
got empty ROI files.


They should be  in $FREESURFER/FreeSurferColorLUT.txt
How are you extracting?


  * Given that Freesurfer version 7 contains segmentations
not previously generated in recon-all (i.e. hippocampal
subfields), is it possible to extract these ROIs using
aparc+aseg images generated using previous versions of
Freesurfer? Or do we need to repeat the cortical
parcellations (i.e. rerun recon-all) using FS7?


You can run  the hippocamal and thalamic segs on FS version 6
subjects.


I’d highly appreciate your time and feedback on this matter.
Thank you.


Best,

Ameen

-- 
Ameen Al Qadi

MSBS Candidate
Icahn School Of Medicine at Mount Sinai '20
+1-646-500-1521
ameen.alq...@icahn.mssm.edu 

___
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



-- 
Ameen Al Qadi

MSBS Candidate
Icahn School Of Medicine at Mount Sinai '20
+1-646-500-1521
ameen.alq...@icahn.mssm.edu 
-- 
Ameen Al Qadi

MSBS Candidate
Icahn School Of Medicine at Mount Sinai '20
+1-646-500-1521
ameen.alq...@icahn.mssm.edu 


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.



--
Ameen Al Qadi
MSBS Candidate
Icahn School Of Medicine at Mount Sinai '20
+1-646-500-1521
ameen.alq...@icahn.mssm.edu 


__

Re: [Freesurfer] Fwd: Cortical Parcellations in FreeDurger 7

2020-07-23 Thread Al Qadi, Ameen
External Email - Use Caution

Thank you. How do I generate this image? It wasn't generated using
recon-all.

On Thu, Jul 23, 2020 at 10:55 AM Douglas N. Greve 
wrote:

> aparc+aseg does not have the thalamic nuclei. You need to run it on
> ThalamicNuclei.v10.T1.FSvoxelSpace.mgz
>
> On 7/22/2020 6:26 PM, Al Qadi, Ameen wrote:
>
> External Email - Use Caution
>
> Hi Douglas,
>
>
> mri_segstats wouldn't generate binary ROI masks, so I tried using
> *mri_binarize* and *mri_extract_label* to produce masks for thalamic
> nuclei, but I run into the same problem of generating empty masks (these
> commands worked for other ROIs):
>
>
>
>-   $: mri_extract_label aparc+aseg.nii 8005 thalamus_vent_lat.nii
>
>
>
> reading volume from aparc+aseg.nii...
>
> extracting label 8005 ()
>
> writing output to thalamus_vent_lat.nii.
>
>
>
>- $: mri_binarize --i aparc+aseg.nii --o thalamus_vent_lat.nii --match
>8005
>
> 7.1.0
>
> cwd /data/freesurfer/subjects/S12452/mri
>
> cmdline mri_binarize --i aparc+aseg.nii --o thalamus_vent_lat.nii --match
> 8005
>
> sysname  #
>
> hostname #
>
> machine  #
>
> user ##
>
>
> input  aparc+aseg.nii
>
> frame  0
>
> nErode3d   0
>
> nErode2d   0
>
> output thalamus_vent_lat.nii
>
> Binarizing based on matching values
>
> nMatch 1
>
> 0  8005
>
> binval1
>
> binvalnot 0
>
> fstart = 0, fend = 0, nframes = 1
>
> Found 0 values in range
>
> Counting number of voxels in first frame
>
> Found -1 voxels in final mask
>
> Count: -1 -0.343000 32768000 -0.03
>
> mri_binarize done
>
>
> I'd appreciate any feedback you may have.
>
>
>
> Best,
>
> Ameen
>
>
> On Tue, Jul 21, 2020 at 10:34 AM Douglas N. Greve 
> wrote:
>
>> I don't know. I'm not that familiar with FSL programs. If you want our
>> help, try using mri_segstats. If something goes wrong send the command line
>>
>> On 7/21/2020 10:26 AM, Al Qadi, Ameen wrote:
>>
>> External Email - Use Caution
>> Hi Douglas,
>>
>> I see the CLUT file, it's the same one I've been using. I have been using
>> FSL (fslmaths) to extract anatomical ROIs from the aparc+aseg using the
>> CLUT indices as thresholds. This normally works, but results in empty ROIs
>> for thalamic nuclei (but not for whole thalamus). What do you think could
>> be the problem?
>>
>> Best,
>> Ameen
>>
>> On Fri, Jul 17, 2020 at 10:33 AM Douglas N. Greve 
>> wrote:
>>
>>>
>>>
>>> On 7/17/2020 10:25 AM, Al Qadi, Ameen wrote:
>>>
>>> External Email - Use Caution
>>>
>>> Dear Freesurfer Developers,
>>>
>>>
>>> I hope this email finds you all safe and well. I have two questions
>>> regarding the new version of freesurfer:
>>>
>>>- Is there a new CLUT associated with FS7? I tried to use the CLUT
>>>labels to extract thalamic subnuclei ROIs, but got empty ROI files.
>>>
>>> They should be  in $FREESURFER/FreeSurferColorLUT.txt
>>> How are you extracting?
>>>
>>>
>>>- Given that Freesurfer version 7 contains segmentations not
>>>previously generated in recon-all (i.e. hippocampal subfields), is it
>>>possible to extract these ROIs using aparc+aseg images generated using
>>>previous versions of Freesurfer? Or do we need to repeat the cortical
>>>parcellations (i.e. rerun recon-all) using FS7?
>>>
>>> You can run  the hippocamal and thalamic segs on FS version 6 subjects.
>>>
>>> I’d highly appreciate your time and feedback on this matter. Thank you.
>>>
>>>
>>> Best,
>>>
>>> Ameen
>>> --
>>> Ameen Al Qadi
>>> MSBS Candidate
>>> Icahn School Of Medicine at Mount Sinai '20
>>> +1-646-500-1521
>>> ameen.alq...@icahn.mssm.edu
>>>
>>> ___
>>> Freesurfer mailing 
>>> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>>
>>>
>>> ___
>>> Freesurfer mailing list
>>> Freesurfer@nmr.mgh.harvard.edu
>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>
>> --
>> Ameen Al Qadi
>> MSBS Candidate
>> Icahn School Of Medicine at Mount Sinai '20
>> +1-646-500-1521
>> ameen.alq...@icahn.mssm.edu
>> --
>> Ameen Al Qadi
>> MSBS Candidate
>> Icahn School Of Medicine at Mount Sinai '20
>> +1-646-500-1521
>> ameen.alq...@icahn.mssm.edu
>>
>>
>> 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.
>>
>
>
> --
> Ameen Al Qadi
> MSBS Candidate
> Icahn School Of Medicine at Mount Sinai '20
> +1-646-500-1521
> ameen.alq...@icahn.mssm.edu
>
>
>

-- 
Ameen Al Qadi
MSBS Candidate
Icahn School Of Medicine at Mount Sinai '20
+1-646-500-1521
ameen.alq...@icahn.mssm.edu

Re: [Freesurfer] mri_aparc2aseg doesn't write output

2020-07-23 Thread Douglas N. Greve

Sorry, it should be from
/home/eji/projects/spins/preproc/freesurfer/subjects/w0

(without the /mri)

On 7/23/2020 8:37 AM, Ellen Ji wrote:


External Email - Use Caution

Dear experts,

I am running mri_aparc2aseg and, based on the output, it seems to run 
through successfully until the very end where it does not actually 
write the file (I receive "error: niiWrite(): error opening file 
mri/aparc.500+2mm.nii.gz"). However, I am 100% sure that I have 
writing access in the directory. Below you will see the details. Do 
you know why I am having this issue? Thank you for your time, Ellen


mri_aparc2aseg \
> --s SPN01_CMH_0001_01 \
> --annot 500_sym.aparc \
> --wmparc-dmax 2 \
> --labelwm \
> --hypo-as-wm  \
> --o mri/aparc.500+2mm.nii.gz
SUBJECTS_DIR /home/eji/projects/spins/preproc/freesurfer/subjects/w0
subject SPN01_CMH_0001_01
outvol mri/aparc.500+2mm.nii.gz
useribbon 0
baseoffset 0
labeling wm
labeling hypo-intensities as wm
dmaxctx 2.00
RipUnknown 0
8 avail.processors, using 1

Reading lh white surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/lh.white

Reading lh pial surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/lh.pial

Loading lh annotations from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/label/lh.500_sym.aparc.annot
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.28231/seg.1.073.xhemi.ctab)
Have color table for lh white annotation

Building hash of lh white

Building hash of lh pial

Reading rh white surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/rh.white

Reading rh pial surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/rh.pial

Loading rh annotations from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/label/rh.500_sym.aparc.annot
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.12874/seg.1.073.xhemi.ctab)
Have color table for rh white annotation

Building hash of rh white

Building hash of rh pial
Loading ribbon segmentation from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/ribbon.mgz
Loading filled from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/ribbon.mgz

Loading aseg from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/aseg.mgz
ASeg Vox2RAS: ---
-1.0   0.0   0.0   128.0;
  0.0   0.0   1.0  -128.0;
  0.0  -1.0   0.0   128.0;
  0.0   0.0   0.0   1.0;
-

Labeling Slice (256)
   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39
  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59
  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79
  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 nctx = 906029
Used brute-force search on 0 voxels
Fixing Parahip LH WM
   Found 1 clusters
  0 k 791.00
Fixing Parahip RH WM
   Found 3 clusters
  0 k 751.00
  1 k 1.00
  2 k 2.00
Writing output aseg to mri/aparc.500+2mm.nii.gz
error: niiWrite(): error opening file mri/aparc.500+2mm.nii.gz
#VMPC# mri_aparc2aseg VmPeak  1376092
mri_aparc2aseg done

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


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

Re: [Freesurfer] mri_aparc2aseg doesn't write output

2020-07-23 Thread Douglas N. Greve

Where are you running the program from? Make sure it is from

/home/eji/projects/spins/preproc/freesurfer/subjects/w0/mri

On 7/23/2020 8:37 AM, Ellen Ji wrote:


External Email - Use Caution

Dear experts,

I am running mri_aparc2aseg and, based on the output, it seems to run 
through successfully until the very end where it does not actually 
write the file (I receive "error: niiWrite(): error opening file 
mri/aparc.500+2mm.nii.gz"). However, I am 100% sure that I have 
writing access in the directory. Below you will see the details. Do 
you know why I am having this issue? Thank you for your time, Ellen


mri_aparc2aseg \
> --s SPN01_CMH_0001_01 \
> --annot 500_sym.aparc \
> --wmparc-dmax 2 \
> --labelwm \
> --hypo-as-wm  \
> --o mri/aparc.500+2mm.nii.gz
SUBJECTS_DIR /home/eji/projects/spins/preproc/freesurfer/subjects/w0
subject SPN01_CMH_0001_01
outvol mri/aparc.500+2mm.nii.gz
useribbon 0
baseoffset 0
labeling wm
labeling hypo-intensities as wm
dmaxctx 2.00
RipUnknown 0
8 avail.processors, using 1

Reading lh white surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/lh.white

Reading lh pial surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/lh.pial

Loading lh annotations from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/label/lh.500_sym.aparc.annot
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.28231/seg.1.073.xhemi.ctab)
Have color table for lh white annotation

Building hash of lh white

Building hash of lh pial

Reading rh white surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/rh.white

Reading rh pial surface
  
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/rh.pial

Loading rh annotations from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/label/rh.500_sym.aparc.annot
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.12874/seg.1.073.xhemi.ctab)
Have color table for rh white annotation

Building hash of rh white

Building hash of rh pial
Loading ribbon segmentation from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/ribbon.mgz
Loading filled from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/ribbon.mgz

Loading aseg from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/aseg.mgz
ASeg Vox2RAS: ---
-1.0   0.0   0.0   128.0;
  0.0   0.0   1.0  -128.0;
  0.0  -1.0   0.0   128.0;
  0.0   0.0   0.0   1.0;
-

Labeling Slice (256)
   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39
  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59
  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79
  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 nctx = 906029
Used brute-force search on 0 voxels
Fixing Parahip LH WM
   Found 1 clusters
  0 k 791.00
Fixing Parahip RH WM
   Found 3 clusters
  0 k 751.00
  1 k 1.00
  2 k 2.00
Writing output aseg to mri/aparc.500+2mm.nii.gz
error: niiWrite(): error opening file mri/aparc.500+2mm.nii.gz
#VMPC# mri_aparc2aseg VmPeak  1376092
mri_aparc2aseg done

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


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

Re: [Freesurfer] error in longitudinal stream fs7.1 ERROR: Number of filenames for --iscalein should agree with number of init LTAs (--ixforms)! worked in fs6

2020-07-23 Thread Douglas N. Greve
I could not reproduce that bug, but I did find another one. I created a 
new version longmc in the same location. I used it yesterday and it ran 
all the way through, so please git it a try


On 7/22/2020 2:28 PM, Knut J Bjuland wrote:


External Email - Use Caution

Thanks

I found a new bug,

mri_make_uchar nu.mgz transforms/talairach.xfm nu.mgz
error: No such file or directory
error: MRIvoxelToTalairachVoxel: unsupported slice direction 2^@

Knut Jørgen Bjuland



On 21/07/2020 16:27, Douglas N. Greve wrote:
Yep, I just found that error yesterday. I put a new longmc script in 
that same location with another fix -- but I have not fully tested it 
yet:)


On 7/21/2020 1:12 AM, Knut J Bjuland wrote:


External Email - Use Caution

Thanks it worked for subjects with more than one timepoint but when 
I ran on subjects with one timepoint I get this error? I can upload 
this subjects.



 mri_robust_template --mov 
/cluster/work/jobs/1011199/KG01_Run1/mri/orig/001.mgz 
/cluster/work/jobs/1011199/KG01_Run1/mri/orig/002.mgz --ixforms 
/cluster/work/jobs/1011199/KG01_Run1.long.KG01_Run1_base/mri/orig/001.lta 
/cluster/work/jobs/1011199/KG01_Run1.long.KG01_Run1_base/mri/orig/002.lta 
--average 1 --noit --template 
/cluster/work/jobs/1011199/KG01_Run1.long.KG01_Run1_base/mri/rawavg.mgz 
--iscalein 
/cluster/work/jobs/1011199/KG01_Run1.long.KG01_Run1_base/mri/orig/001-iscale.txt 
/cluster/work/jobs/1011199/KG01_Run1.long.KG01_Run1_base/mri/orig/002-iscale.txt 



7.1.0

--mov: Using /cluster/work/jobs/1011199/KG01_Run1/mri/orig/001.mgz 
as movable/source volume.
--mov: Using /cluster/work/jobs/1011199/KG01_Run1/mri/orig/002.mgz 
as movable/source volume.

    Total: 2 input volumes
--ixforms: Will use init XFORMS.
--average: Using method 1 for template computation.
--noit: Will output only first template (no iterations)!
--template: Using 
/cluster/work/jobs/1011199/KG01_Run1.long.KG01_Run1_base/mri/rawavg.mgz 
as template output volume.

--iscalein: Will use init intensity scales
reading source 
'/cluster/work/jobs/1011199/KG01_Run1/mri/orig/001.mgz'...
converting source 
'/cluster/work/jobs/1011199/KG01_Run1/mri/orig/001.mgz' to bspline ...

MRItoBSpline degree 3
reading source 
'/cluster/work/jobs/1011199/KG01_Run1/mri/orig/002.mgz'...
converting source 
'/cluster/work/jobs/1011199/KG01_Run1/mri/orig/002.mgz' to bspline ...

MRItoBSpline degree 3
error: No such file or directory
error: 
ltaReadFile(/cluster/work/jobs/1011199/KG01_Run1.long.KG01_Run1_base/mri/orig/001.lta): 
can't open file^@

Segmentation fault (core dumped)
ERROR:
@#@FSTIME  2020:07:20:23:24:12 longmc N 5 e 17.11 S 0.79 U 1.54 P 
13% M 73600 F 111 R 30867 W 0 c 319 w 50082 I 48874 O 142592 L 42.23 
41.81 41.92

@#@FSLOADPOST 2020:07:20:23:24:29 longmc N 5 42.24 41.84 41.92
Linux c5-57 3.10.0-957.12.2.el7.x86_64 #1 SMP Tue May 14 21:24:32 
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


recon-all -s KG01_Run1.long.KG01_Run1_base exited with ERRORS at Mon 
20 Jul 23:24:29 CEST 2020


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




#New# invocation of recon-all





On 17/07/2020 16:28, Douglas N. Greve wrote:
I think you might have found a bug when a cross subject has more 
than one input. Can you download

https://gate.nmr.mgh.harvard.edu/safelinks/greve/longmc
Copy it to $FREESURFER/bin (make a copy of the one that is there)
Then re-run?
thanks


On 7/16/2020 11:57 AM, Knut J Bjuland wrote:


External Email - Use Caution

Thanks
Sure,

Here is the log file.

Knut Jørgen


On 16/07/2020 16:12, Douglas N. Greve wrote:

Can you send the log file?

On 7/15/2020 1:51 PM, Knut J Bjuland wrote:


External Email - Use Caution

Dear freesurfer experts

I was able to run the same subects on the longitudinal stream 
using FS 6 , but when I use FS7.1 I got this error


RROR: Number of filenames for --iscalein should agree with 
number of init LTAs (--ixforms)!

ERROR:
@#@FSTIME  2020:07:15:18:43:31 longmc N 5 e 1.75 S 0.47 U 0.15 P 
35% M 2444 F 88 R 26962 W 0 c 321 w 33906 I 19328 O 14 L 31.52 
31.63 31.62

@#@FSLOADPOST 2020:07:15:18:43:33 longmc N 5 31.55 31.64 31.63
Linux c5-31 3.10.0-957.12.2.el7.x86_64 #1 SMP Tue May 14 
21:24:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


recon-all -s 007_Run1.long.007_Run1_base exited with ERRORS at 
Wed Jul 15 18:43:33 CEST 2020


Knut Jørgen Bjuland

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

Re: [Freesurfer] area.pial files for fsaverage

2020-07-23 Thread Douglas N. Greve
Do you not see ?lh.pial.avg.area.mgh in 
$FREESURFER/subjects/fsaverage/surf ?


On 7/21/2020 3:11 PM, Xiaojiang Yang wrote:


External Email - Use Caution

Dear FS developers,

I have noticed that for each subject, there are ?h.area and 
?h.area.pial files under the $SUBJECT_DIR/$subject/surf sub-directory. 
According to Bruce's words from here 
https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg23751.html, 
they are for white surfaces and pial surfaces respectively. But for 
the fsaverage subject, I only find file ?h.area; there are no 
?h.area.pial files existing. Could you tell me why? and where can I 
get those files?


Thanks!
Xiao

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


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

Re: [Freesurfer] Anatomical cluster description table from mri_glmfit-sim?

2020-07-23 Thread Douglas N. Greve
You can binarize the final cluster map (mri_binarize --i clustermap.mgz 
--min 0.5 --o bin.clustermap.mgz)

Then run mri_segstats --annot  fsaverage lh aparc --i bin.clustermap.mgz
The mean value will be the fraction of the vertices in the ROI that 
belongs to (any) significant cluster


On 7/22/2020 9:36 AM, Fred Sampedro wrote:


External Email - Use Caution

Dear FS experts,

From an statistical map obtained by mri_glmfit-sim, say a 
cache.th13.abs.sig.masked.mgh map, I would like to list all the 
significant regions from all clusters in the following intuitive way, 
for instance:


Supramarginal gyrus: X vertices, X mm^2, peak T-value=X
Superior frontal gyrus: Y vertices, Y mm^2, peak T-value=Y
...

That is, the % of significant vertices in the statistical map 
belonging to each region of the default FS atlas. I know that the 
cache.th13.abs.sig.cluster.summary file "summarizes" each cluster by a 
label, but clearly large clusters are made of several different 
anatomical regions that I would like to report.


In other words, I wonder if there's an easy way to obtain a cluster 
description report similar to the one provided by the xjview toolbox 
for voxelbased maps in MNI space.


I know I could probably achieve it by scripting, i.e. but looping 
through each ROI extracted from an atlas in fsaverage space and 
applying a mask with the glmfit map and then computing the overlap and 
such. But probably there's an easir way, or someone has already 
thought about it.
I tried to search about this topic in the archive but failed to find a 
clear solution, probably I was not searching by the appropriate words.


Thanks a lot in advance,



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


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

Re: [Freesurfer] Subcortical Structure Pial Line Exclusion

2020-07-23 Thread Douglas N. Greve
do you mean where the cursor is? That's in hippocampus or amygdala, so 
it is fine that the pial surfaces cuts through them


On 7/21/2020 1:44 PM, Angel Hammond wrote:


External Email - Use Caution

Hello Freesurfer Experts,

I think I may already know the answer to this, but just wanted to 
check in to be sure. I know that in general when checking the recon 
for a subject for pial and wm line correctness, that subcortical 
structure segmentation within those lines is not that important to 
correct. I was looking at a subject that looks to be be omitting 
subcortical structures from the pial line and persists for many 
slices. Is this something that needs to be corrected with wm edits or 
is this not to be worried about? I included some screenshots of the area.


Thanks!

*Angel Hammond*

*Research Specialist
*

Center for Healthy Minds

University of Wisconsin-Madison




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


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

Re: [Freesurfer] outlier detection and remove

2020-07-23 Thread Douglas N. Greve

We don't have recommendations on this, sorry

On 7/21/2020 12:18 PM, Zeng, Qi wrote:


External Email - Use Caution

Hi,

I have a question about how to handle outliers in aparc, aseg and 
tracula results? Usually, each subject has one result regarding one 
measurement and I detect and remove outliers using barplot. 
However, for results in freesurfer, we have multiple outcomes for each 
region in terms of measurements of aparc, aseg and tracula. Do we 
detect outliers for specific regions or tracts and remove the 
outliers? Or detect which subjects have outliers consistently for all 
the regions, and then we remove the subjects?

Thank you so much !

Best,
Qi

--

Ph.D. candidate
Icahn School of Medicine at Mount Sinai


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


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

Re: [Freesurfer] How to do permutation for multiple comparison correction?

2020-07-23 Thread Douglas N. Greve



On 7/21/2020 11:45 AM, Xiaojiang Yang wrote:


External Email - Use Caution

Hi Doug,
For your questions:
1. "Not sure what you mean by in the ROI. Are you trying to permute across 
space? That generally does not work because the points are not 
exchangeable across space."

By "In the ROI", I mean for all vertices listed in the label file. Here, I am 
talking about a test subject and n control subjects, they are all considered in the same 
reference subject space - fsaverage. A ROI is defined by a label file for the subject 
fsaverage. So, I am comparing the test subject and control group on the same ROI region, 
vertex by vertex. I want to permute points in the test subject and points in all subjects 
in control groups.
I am not talking about permuting vertex locations; I am talking about permuting 
values (thickness in my case) from subjects on each vertex. For example, for 
vertex i, I have one value (v0) from test subject, and n values (v1, v2,...vn) 
from control subjects:
test subject  control subjects
v0v1, v2, .. vn
One way of permutation would be:
test subject  control subjects
v1v0, v2, .. vn
Is this a reasonable way to do permutation?

It is unusual, though it should work.
2. "Not sure. You cannot discriminate between the groups when you are 
doing permutation"

By doing the permutation many (say 1000) times, I want to get the probability 
distribution of the sampling (observed or test) data inside the ROI area, so 
that I can decide if I should reject or accept null hypothesis based on 
cluster-wise significance level. What problems do you think I have in this idea?

That should work. I'm not sure what my original concern was

Thanks a lot!
On 7/21/2020 1:12 AM, Xiaojiang Yang wrote:

 External Email - Use Caution

Dear FS experts,

Instead of using mri_glmfit-sim, I am trying to implement a
customized multiple comparison correction algorithm using
permutation. Before I implement my own, I want to make sure my
permutation idea is correct. So I was looking at how
mri_glmfit-sim does the permutation. The link here
http://freesurfer.net/fswiki/FsTutorial/MultipleComparisonsV6.0Perm has


a simple description for how to do permutation, but I don't quite
understand the 1st step: Permute the design matrix. To me, permute
the design matrix means permute the matrix rows here, but still
hard to understand why permuting matrix rows does the trick.

This is pretty standard in permutation. I think Tom Nichols has some 
basic tutorials on how permutations work.


Anyway, I will not use any design matrix in my customized
implementation, so it does not matter for now. My problem can be
described as follows: if I have a ROI (a label file) on fsaverage,
and I have a test subject and a group of control subjects whose
thickness values on every vertex in this label are all known. (The
test subject and control subjects are all using fsaverage
reference space). I want to compare this test subject's thickness
within the ROI to a control group of subjects (within the same
ROI). This is a multiple-comparison problem, so I want to use
permutation to get less FP rate. My question is: How do I permute
the test subject's points and control subjects' points in ROI?

Not sure what you mean by in the ROI. Are you trying to permute across 
space? That generally does not work because the points are not 
exchangeable across space.


My understanding is that: for each point in the label, I randomly
re-assign all (1+n) values from (1+n) subjects to these (n+1)
subjects (where n is the number of subjects in control group). And
when all points in the label are done, this is only 1 permutation.
I will need at least 1000 times of permutation to get the
comparison statistics.

Is my understanding right?

Not sure. You cannot discriminate between the groups when you are 
doing permutation


Thank you!
Xiao


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


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

Re: [Freesurfer] nu_correct error {Disarmed}

2020-07-23 Thread Douglas N. Greve

what version of freesurfer are you running?

On 7/17/2020 2:24 PM, Bahrani, Ahmed A. wrote:


External Email - Use Caution

Hi Douglas,

I am using the following:

Linux Redhat version 7.9
Singularity version 3.6.0
Freesurefer version 6.0.0-min (for containers)

I checked all the recon-all.log, and it looks like all of the old 
reports and I could not find where the error report of the freesurefer 
save from the container. I have checked the file output, and it does 
not have a recall-all.log.


Thanks,
Ahmed

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


*Sent:* Friday, July 17, 2020 10:12 AM
*To:* freesurfer@nmr.mgh.harvard.edu 
*Subject:* Re: [Freesurfer] nu_correct error
CAUTION: External Sender

What version are you running? Can you send the recon-all.log file?

On 7/16/2020 3:40 PM, Bahrani, Ahmed A. wrote:


External Email - Use Caution

Hello Freesurfer experts,

I have a question related to the singularity container to run a bash 
script that contains a freesurfer's commend "nu_correct".


The singularity container only runs as a root user login and gives 
error as shown below with a general user login.


==

---Error message---
evaluate_field: posixio.c:210: px_pgin: Assertion `*posp == 
((off_t)(-1)) || *posp == lseek(nciop->fd, 0, 1)' failed.
nu_evaluate: crashed while running evaluate_field (termination 
status=134)

nu_correct: crashed while running nu_evaluate (termination status=65280)


---Error message---
ncvarput: ncid 4: No space left on device
mivarput1: MINC package entry point
nu_evaluate: crashed while running minccalc (termination status=768)
nu_correct: crashed while running nu_evaluate (termination status=768)


Would you advise, please?

Thanks,
Ahmed

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu  
*MailScanner has detected a possible fraud attempt from 
"nam04.safelinks.protection.outlook.com" claiming to be* 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer  



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


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

Re: [Freesurfer] Motor Cortex Label/Mask

2020-07-23 Thread Douglas N. Greve
we don't have a specific label for that, though if you can find a set of 
labels that meet your requirements, then you can merge them together


On 7/17/2020 1:48 PM, Anja Samardzija wrote:


External Email - Use Caution

Hi,

I am referring to the anatomical region of interest - the surface. The 
way that we are able to label the Left-Putamen for example, I would 
like to be able to label the whole motor cortex. The motor cortex 
should include the primary motor cortex, premotor cortex, and the 
supplementary motor area.


Thank you,
Anja

On Fri, Jul 17, 2020 at 1:43 PM Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:


what do you mean by "extract"? In the volume? the surface? or just
compute the volume of it? How are you defining motor cortex?

On 7/17/2020 1:29 PM, Anja Samardzija wrote:


External Email - Use Caution

Hi,

I was wondering if there is a way to extract the whole motor
cortex (not the separate regions of the motor cortex, but all of
these regions together) of a subject following running recon-all
on the subject.

Thank you,
Anja

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


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


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


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

[Freesurfer] mri_aparc2aseg doesn't write output

2020-07-23 Thread Ellen Ji
   External Email - Use Caution


Dear experts,

I am running mri_aparc2aseg and, based on the output, it seems to run 
through successfully until the very end where it does not actually write 
the file (I receive "error: niiWrite(): error opening file 
mri/aparc.500+2mm.nii.gz"). However, I am 100% sure that I have writing 
access in the directory. Below you will see the details. Do you know why 
I am having this issue? Thank you for your time, Ellen


mri_aparc2aseg \

--s SPN01_CMH_0001_01 \
--annot 500_sym.aparc \
--wmparc-dmax 2 \
--labelwm \
--hypo-as-wm  \
--o mri/aparc.500+2mm.nii.gz

SUBJECTS_DIR /home/eji/projects/spins/preproc/freesurfer/subjects/w0
subject SPN01_CMH_0001_01
outvol mri/aparc.500+2mm.nii.gz
useribbon 0
baseoffset 0
labeling wm
labeling hypo-intensities as wm
dmaxctx 2.00
RipUnknown 0
8 avail.processors, using 1

Reading lh white surface
 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/lh.white

Reading lh pial surface
 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/lh.pial

Loading lh annotations from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/label/lh.500_sym.aparc.annot
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.28231/seg.1.073.xhemi.ctab)
Have color table for lh white annotation

Building hash of lh white

Building hash of lh pial

Reading rh white surface
 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/rh.white

Reading rh pial surface
 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/surf/rh.pial

Loading rh annotations from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/label/rh.500_sym.aparc.annot
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.12874/seg.1.073.xhemi.ctab)
Have color table for rh white annotation

Building hash of rh white

Building hash of rh pial
Loading ribbon segmentation from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/ribbon.mgz
Loading filled from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/ribbon.mgz

Loading aseg from 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0001_01/mri/aseg.mgz
ASeg Vox2RAS: ---
-1.0   0.0   0.0   128.0;
 0.0   0.0   1.0  -128.0;
 0.0  -1.0   0.0   128.0;
 0.0   0.0   0.0   1.0;
-

Labeling Slice (256)
  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
 20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39
 40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59
 60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79
 80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 nctx = 906029
Used brute-force search on 0 voxels
Fixing Parahip LH WM
  Found 1 clusters
 0 k 791.00
Fixing Parahip RH WM
  Found 3 clusters
 0 k 751.00
 1 k 1.00
 2 k 2.00
Writing output aseg to mri/aparc.500+2mm.nii.gz
error: niiWrite(): error opening file mri/aparc.500+2mm.nii.gz
#VMPC# mri_aparc2aseg VmPeak  1376092
mri_aparc2aseg done

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