[Freesurfer] mri_info orientation string ???

2022-01-11 Thread Xiaojiang Yang
External Email - Use Caution

Dear Freesurfer Developers,


I have scrutinized the Freesurfer source code from github, found that
this might be a bug in Freesurfer.


Basically, the string "Orientation   : ???" comes from the function
MRIdircosToOrientationString defined in mri.cpp, which depends on the
MRI structure's member ras_good_flag. However, when reading a dicom
file using the function DICOMRead2 defined in DICOMRead.cpp, the
member ras_good_flag seems to be never been assigned a "ras good flag"
value 1. That's why I got the orientation string value of "???".


Would anyone correct or confirm my finding?


Thank you!


John


Xiaojiang Yang
<https://secure-web.cisco.com/1z35I78V94iRbbYPmh53mt00toQQUpCtob0Flq38T-DIF4eyYbMf_bMQ3sEmfHiyZWKybvM4YKjdzOzLJ9CYVa7B82DjIMljR_9yUKIr7uKGb8S4oCzCAmCmy7QYcYZLZZ-7xiq5cY6dhd3w4WwHj6l3BxOEo3cjs7YOdqBTw94k8FpYHiJZ0Hz-Q3Bn3jbuiC5Rmta6K4Z4O4o1Fy0XTCWRk-K_ozt5-4xs3qhbOElCzwuXqphIYgA3xmDK5YYPIxd8ctYtXyInm8yn-xvo-g_8iVfDuXA329Ebxp5JvBk__fmd2Lk1zSTtJPWDo6lKrmHEkeTBFUXoH7NCBc52RKw/https%3A%2F%2Fwww.mail-archive.com%2Fsearch%3Fl%3Dfreesurfer%40nmr.mgh.harvard.edu%26q%3Dfrom%3A%2522Xiaojiang%2BYang%2522>
 Mon, 10 Jan 2022 09:23:09 -0800
<https://secure-web.cisco.com/1xlKT8odwFmJHyltnD83Zsoh2rGvmR8Hww2q4lAdH_dB7qbBbJz0Z0bpHIwjP_bIxwdI1vVZqr2_RUXaXfkz2G6qJSYUhRTjX7rE6xAHdzdLnyxpJiUR0nCE-tKk88v-8uUoo3k6xNW_Ja85YayGYCTkSpL0J7hAIvfTQyTtP_RBeXfxwAS5j25qOPQyRd6QyrkP2KKmxQTiRjYiVtZgj5S333AFJuO31ZlenbN6HDXZBLAhRWYXYOQKjkwKj0ga8xEPsdZDKPpdJOUJYGJPw48aoGYWwYtoAVgvfLF9vUtMiejWUPbuB4GDkaBhabQBw9z33j7rWg1WMH1dC5UjNgA/https%3A%2F%2Fwww.mail-archive.com%2Fsearch%3Fl%3Dfreesurfer%40nmr.mgh.harvard.edu%26q%3Ddate%3A20220110>

External Email - Use Caution

Dear Freesurfer Experts,

I have a question regarding the orientation string gotten from mri_info.
When I apply mri_info command to a DIOM series I generated
programmatically, I get the "???" result, and hence primary slice direction
is also unknown:

..
Orientation   : ???
Primary Slice Direction: unknown
..

I already had the " Image Position Patient" and "Image Orientation
Patient" written in the DICOM header. Don't know what other important info
is missing.

Could you tell me what key information is used in DICOM header to
determine this orientation when using mri_info?

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

[Freesurfer] mri_info orientation string ???

2022-01-10 Thread Xiaojiang Yang
External Email - Use Caution

Dear Freesurfer Experts,

I have a question regarding the orientation string gotten from mri_info.
When I apply mri_info command to a DIOM series I generated
programmatically, I get the "???" result, and hence primary slice direction
is also unknown:

..
Orientation   : ???
Primary Slice Direction: unknown
..

I already had the " Image Position Patient" and "Image Orientation
Patient" written in the DICOM header. Don't know what other important info
is missing.

Could you tell me what key information is used in DICOM header to
determine this orientation when using mri_info?

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

[Freesurfer] Capture multiple images using freeview

2021-05-11 Thread Xiaojiang Yang
External Email - Use Caution

Dear FS developers,

I know how to use freeview to capture one static image and save it to a
file. For example, I can capture coronal view's slice 100 using this
command:

freeview \
-v $SUBJECTS_DIR/$subjectid/mri/orig.mgz \
-f $SUBJECTS_DIR/$ subjectid /surf/lh.white:edgecolor='255,255,255' \
-f $SUBJECTS_DIR/$ subjectid /surf/lh.pial:edgecolor='0,0,255' \
-f $SUBJECTS_DIR/$ subjectid /surf/rh.white:edgecolor='255,255,255' \
-f $SUBJECTS_DIR/$ subjectid /surf/rh.pial:edgecolor='0,0,255' \
-viewsize 1024 1024 -viewport coronal --nocursor -zoom 1.5 \
-slice 127 127 *100 *-ss tmp/captued

My first question is: how can I capture all 256 coronal slices using one
freeview command? If I use a loop to run that above freeview command, it
would be very very slow, because it needs to load the volume and all
surfaces 256 times.

Do you have a method that allows me to load the volume and surfaces only
once and capture many images and save them?

My 2nd question is: do you have a method to capture images in the
background without needing to open the freeview GUI?

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

Re: [Freesurfer] Cortical thickness on version 6 vs 7

2021-03-12 Thread Xiaojiang Yang
External Email - Use Caution

Thank you Matt for letting me know that.

John


For what it’s worth, we had problems with FreeSurfer 7.X with surface placement
accuracy on HCP-Style data (i.e. 0.8-0.7mm isotropic T1w and T2w) and have
continued to recommend using FreeSurfer 6 for the HCP Pipelines for now.  We
usually quote 2.6mm average cortical thickness for young adults, but it does
depend on age.

Matt.

From:  on behalf of Xiaojiang Yang

Reply-To: Freesurfer support list 
Date: Friday, March 12, 2021 at 10:29 AM
To: Freesurfer support list 
Subject: [Freesurfer] Cortical thickness on version 6 vs 7



External Email - Use Caution
Dear Freesurfer developers,

I have a cohort of subjects that are already run under FS 6. I recently
upgraded Freesurfer from 6.0 to 7.1.1, and now I also have run these subjects
under FS 7.

When comparing the cortical thickness results obtained from FS6 and FS7, I
found that FS 7 results are much smaller than the FS6 ones. On average, about
13%-21% decrease in the subject's average cortical thickness. Specifically, on
a cohort of images from GE scanners, the average cortical thickness from FS6 is
2.5mm, but from FS7 is less than 2.0mm.

According to some published papers, I think 2.5mm as the average cortical
thickness is more accurate than 2.0mm.

Have you encountered this issue or question before? Do you think I should keep
using FS6? Please give me your advice. Thank you!

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

[Freesurfer] Cortical thickness on version 6 vs 7

2021-03-12 Thread Xiaojiang Yang
External Email - Use Caution

Dear Freesurfer developers,

I have a cohort of subjects that are already run under FS 6. I recently
upgraded Freesurfer from 6.0 to 7.1.1, and now I also have run these
subjects under FS 7.

When comparing the cortical thickness results obtained from FS6 and FS7, I
found that FS 7 results are much smaller than the FS6 ones. On average,
about 13%-21% decrease in the subject's average cortical thickness.
Specifically, on a cohort of images from GE scanners, the average cortical
thickness from FS6 is 2.5mm, but from FS7 is less than 2.0mm.

According to some published papers, I think 2.5mm as the average cortical
thickness is more accurate than 2.0mm.

Have you encountered this issue or question before? Do you think I should
keep using FS6? Please give me your advice. Thank you!

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

[Freesurfer] Which pial surface to trust, with or without -FLAIR option

2021-03-12 Thread Xiaojiang Yang
External Email - Use Caution

Dear FS developers,



I have run FS’s recon-all on many cases, with and without -FLAIR options. I
found the pial  surface results (?h.pial) I obtained without -FLAIR option
fit to the original image (subjected/mri/orig.mgz) much better than those
with -FLAIR option, at least from my visual judgment. See
https://secure-web.cisco.com/1jL9MUfd9oLXR_SVyZl8-wPztrX70T9SJxxJaJElRv5e-Dj4sp4RQ3M4KUFAgUKpZxTsy39_ZpJl8bnnPbnvx2YzJvRH_uTKNfjANjJd-5gjcRF6xLXUfsXjqCmSKGe2yz1c7u_wmpF_bHrEno5pHCvh7SC8bm74VtmPYYNj-YuJSnlcZ85bx_0q82bTlL56VDSPkTK1ifobJsYiFQf7k5pSOsiAvHKbOmRIQvzx-ezp9lvzhHLbD0MIodNOc9hyrNxaG0ZWxK49VfLdGXKCgmg/https%3A%2F%2Fimgur.com%2Fa%2FwrY0HTY
 for one example.



I know -FLAIR option was introduced to improve the quality of pial surface
segmentation. Now for many cases, my intuition is that -FLAIR option
decreases the pial quality. My questions are:

   - Is this intuition correct?
   - Should I trust the pial surface that’s obtained with or without -FLAIR
   option in general?



In addition, when I use the -FLAIR option, I sometimes get failed when
running recon-all. After I did some manual edits to the brainmask image,
and re-run the recon-all:

recon-all -autorecon-pial -subjid 

I can get recon-all successful. But if I run recon-all without -FLAIR
option, I can get successful results without needing to manually edit the
brainmask image.



So my last question is:

   - Should I just run recon-all without -FLAIR option, or, with -FLAIR
   option + manual edit + re-run with -autorecon-pial? Which is better?



Thank you very much!

John
___
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-08-04 Thread Xiaojiang Yang
External Email - Use Caution

Thank you! Now I see how permutation works. So given about 100-200 subjects
in the normal group, doing 1000 permutations is of no help.

In fact, in my cortical thickness abnormality test, no matter how many
times of permutations I take, the original non-permutated data is the only
one arrangement I can observe that has a "big" cluster area - all
permutated data has no cluster of big continuous area (given the
vertex-wise threshold). So, permutations cannot give me a reasonable
probabulity distribution of the sampling data, which means I cannot rely
on it to reduce False Positives. Very frustrated here. If you have more
comments here, please let me know. Thanks.

Best Regards,
Xiao


Douglas N. Greve
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from:%22Douglas+N.+Greve%22>
 Tue, 04 Aug 2020 08:27:47 -0700
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date:20200804>

There are actually only N-1 permutations that you can make:

Real matrix:
1 0
0 1
0 1
0 1
0 1


Permutation 1:

0 1
1 0
0 1
0 1
0 1


Permutation 2:

0 1
0 1
1 0
0 1
0 1




On 8/4/2020 10:41 AM, Xiaojiang Yang wrote:

External Email - Use Caution

Hi Doug,


I am still uncertain how to permutate the data for multiple comparisons.
Please help me with a little more details on this. For example, could you
give me 2-3 examples of the permutations for the matrix you gave to me?

In addition, if you can explain to me in a non-design-matrix way, that would
be great. For example, suppose I have 1 subject to be compared to n
subjects in a normal group. The number of comparisons is m. So I have m x
(1+n) data in total:

V_10   V_11 , V_12 , V_13 , … V_1n

V_20   V_21 , V_22 , V_23 , … V_2n

…… …… …… ……

V_m0  V_m1 , V_m2 , V_m3 , … V_mn

_


_Could you please explain to me how data should be permutated? Or give me
2-3 examples of the permutations of the above data that could be?

_Thank you a lot!

Xiao


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

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

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

2020-08-04 Thread Xiaojiang Yang
External Email - Use Caution

Hi Doug,

I am still uncertain how to permutate the data for multiple comparisons.
Please help me with a little more details on this. For example, could you
give me 2-3 examples of the permutations for the matrix you gave to me?

In addition, if you can explain to me in a non-design-matrix way, that
would be great. For example, suppose I have 1 subject to be compared to n
subjects in a normal group. The number of comparisons is m. So I have m x
(1+n) data in total:

V10  V11, V12, V13, … V1n

V20  V21, V22, V23, … V2n

…… …… …… ……

Vm0 Vm1, Vm2, Vm3, … Vmn


Could you please explain to me how data should be permutated? Or give me
2-3 examples of the permutations of the above data that could be?

Thank you a lot!
Xiao

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

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

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=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=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/freesurfer

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

[Freesurfer] area.pial files for fsaverage

2020-07-21 Thread Xiaojiang Yang
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

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

2020-07-21 Thread Xiaojiang Yang
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?

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?


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] How to do permutation for multiple comparison correction?

2020-07-20 Thread Xiaojiang Yang
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.
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?
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?
Thank you!
Xiao
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Compare individual to a group

2020-05-12 Thread Xiaojiang Yang
External Email - Use Caution

Hi Douglas,

I have tried to follow your suggestion to use the transformed thickness file
like this:

mris_preproc --fsgd xxx.fsgd \

--meas $meas.fwhm$smoothing.xformed.mgz \

--target fsaverage \

--hemi $hemi \

--out $hemi.$meas.$smoothing.mgh

But it says $meas.fwhm$smoothing.xformed.mgz does not match surface
(163842,166904).

My files $meas.fwhm$smoothing.xformed.mgz come from
$meas.fwhm$smoothing.fsaverage (just by multiplying it with a weight). If I
use "--cache-in" in the mris_preproc like below:

mris_preproc --fsgd xxx.fsgd \

--cache-in $meas.fwhm$smoothing.fsaverage \

--target fsaverage \

--hemi $hemi \

--out $hemi.$meas.$smoothing.mgh

The above command line runs fine.

I know the problem in the first command line might be that the files
$meas.fwhm$smoothing.xformed.mgz are already on the fsaverage surface, not
the subject surface. But mris_preproc is still trying to use mri_surf2surf
to resample those mgh file from the subject surface to fsaverage surface,
which leads to the "does not match surface" error. 

My question is: How can I tell mris_preproc to regard those transformed
files to be on the fsaverage surface already (instead of subject's surface),
just like the second command line where the "-cache-in" option is used? 

You know, my transformed files are Just derived from cached files
$hemi.$meas.fwhm$smoothing.fsaverage.mgh in the $subject/surf directories. I
do not want to use mri_surf2surf to transform them to the subject surface
first, and then let mris_preproc transform them back to fsaverage surface
again.

 

Thanks!

Xiao

 
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from
:%22Douglas+N.+Greve%22> 
Douglas N. Greve
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date
:20200511> Mon, 11 May 2020 14:14:42 -0700

Just call your thickness file some other name, eg, lh.xformed.thickness.mgz,
the just specify --meas xformed.thickness.mgz

 
On 5/11/2020 3:52 PM, Xiaojiang Yang wrote:
 
External Email - Use Caution
 
Thank you Douglas!

If I apply my transform to both the healthy controls and the patient, I
guess I would lose the convenience of using mri_glmfit, which eventually
loses the convenience of using mri-glmfit-sim (I don't care not using
mri_glmfit, but I want to use mri_glmfit-sim to do multiple comparisons
correction). That is because mri_glmfit uses the prepared output from
mris_preproc, which I have no control over to use the transformed subject.
The only way I can circumvent this is to use my transformed thickness file
to overwrite the FS calculated thickness file, but that is what I am
hesitant to do. If you have good suggestions regarding this, please let me
know. Thanks!

Xiao
 
 

On Mon, May 11, 2020 at 12:25 PM Douglas N. Greve mailto:dgr...@mgh.harvard.edu> mailto:dgr...@mgh.harvard.edu>> wrote:

 
I guess you could apply your transform to both the healthy
controls and to your patient, can then create an FSGD file with
two classes as before but no continuous variable. Then just have a
contrast that computes the diff between the patient and the mean
of the controls.

 

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

Re: [Freesurfer] Compare individual to a group

2020-05-11 Thread Xiaojiang Yang
External Email - Use Caution

Thank you Douglas!
If I apply my transform to both the healthy controls and the patient, I
guess I would lose the convenience of using mri_glmfit, which eventually
loses the convenience of using mri-glmfit-sim (I don't care not
using mri_glmfit, but I want to use mri_glmfit-sim to do multiple
comparisons correction). That is because mri_glmfit uses the prepared
output from mris_preproc, which I have no control over to use the
transformed subject. The only way I can circumvent this is to use my
transformed thickness file to overwrite the FS calculated thickness file,
but that is what I am hesitant to do. If you have good suggestions
regarding this, please let me know. Thanks!
Xiao


On Mon, May 11, 2020 at 12:25 PM Douglas N. Greve 
wrote:

> I guess you could apply your transform to both the healthy controls and to
> your patient, can then create an FSGD file with two classes as before but
> no continuous variable. Then just have a contrast that computes the diff
> between the patient and the mean of the controls.
>
> On 5/8/2020 11:49 AM, Xiaojiang Yang wrote:
>
> External Email - Use Caution
>
> Hi Douglas,
>
>
>
> Could you please reply my last email (sent to
> freesurfer@nmr.mgh.harvard.edu) regarding my question about the weighted
> age? I am eager to listen to your answer/opinion to my question.  For your
> convenience, I also include the whole email chain  below this email.
>
>
>
> Thank you very much!
>
>
>
> Sincerely,
>
> Xiao
>
>
>
>
>
>  <https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from
>
> :%22Douglas+N.+Greve%22> Douglas N. Greve
>
> <https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date
>
> :20200507> Thu, 07 May 2020 14:56:08 -0700
>
>
>
> sorry, please include the previous email chain so that I know what you are
>
> referring to
>
>
>
>
>
>
>
>
>
> On 5/7/2020 5:33 PM, Xiaojiang Yang wrote:
>
>  External Email - Use Caution
>
>  Douglas,
>
>
>
> Just as I mentioned in the initial email, subjects in the healthy group have
>
> different ages. Because average cortical thickness is believed to be
>
> declined as the age gets older, I want to "normalize" the group by
>
> multiplying each subject's thickness with an age-dependent scalar
>
> (pre-calculated constant). Suppose I take age 30 as the "standard" age, then
>
> subjects with ages greater than 30 will have scalars greater than 1 (depend
>
> on age); subjects with ages smaller than 30 will have scalars less than 1.
>
> In this way, all subjects in the group looks like to be at the same age
>
> (30).
>
>
>
>
>
> Of course, I also suspect that there is no need to do the above mentioned
>
> normalization if I use mri_glmfit. But my initial intention was using
>
> non-linear scalars, and mri_glmft can only use linear fit. Please give me
>
> your opinion. Thank you!
>
>
>
>  Xiao
>
>
>
>
>
>  <https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from
>
> :%22Douglas+N.+Greve%22> Douglas N. Greve
>
> <https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date
>
> :20200507> Thu, 07 May 2020 14:06:27 -0700
>
>
>
> I don't know what weight is. Can you elaborate?
>
>  On 5/7/2020 4:54 PM, Xiaojiang Yang wrote:
>
>  External Email - Use Caution
>
>  Hi Douglas,
>
>
>
> Thank you very much! Could you please help me with more detailed
>
> information?
>
>
>
>
>
> 1)Should I use "Variables age" or "Variables age weight" in the fsgd file?
>
> If I can use either of them, which one is better?
>
>
>
>  I don't know what weight is. Can you elaborate?
>
>
>
> 2)For the contrast file, the content "1 -1  0" you mentioned, it corresponds
>
> to the "Variables age" fsgd file, correct?
>
>
>
>  Yes
>
>
>
> 3)If I use the "Variables age weight" fsgd file, what will be the content of
>
> the contrast file? Is it "1  -1  0  0"?
>
>
>
>  Yes
>
>  Thank you again!
>
>  Xiao
>
>
>
>
>
>
>
>  <https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from
>
> :%22Douglas+N.+Greve%22> Douglas N. Greve
>
> <https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date
>
> :20200507> Thu, 07 May 2020 11:55:27 -0700
>
>
>
> I think it will work properly if you use the raw data as input and create an
>
> FSGD file with two classes: (1) the individual sub

Re: [Freesurfer] Compare individual to a group

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

Hi Douglas,

 

Sorry I didn't find an easy way to include previous email chain. Now I just
copied all of them below, so that it's easy to follow.

 

Thanks,

Xiao

 

 

 

 
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from
:%22Douglas+N.+Greve%22> Douglas N. Greve
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date
:20200507> Thu, 07 May 2020 14:56:08 -0700

sorry, please include the previous email chain so that I know what you are
referring to

 
 
 
 
On 5/7/2020 5:33 PM, Xiaojiang Yang wrote:
 
External Email - Use Caution
 
Douglas,
 

Just as I mentioned in the initial email, subjects in the healthy group have
different ages. Because average cortical thickness is believed to be
declined as the age gets older, I want to "normalize" the group by
multiplying each subject's thickness with an age-dependent scalar
(pre-calculated constant). Suppose I take age 30 as the "standard" age, then
subjects with ages greater than 30 will have scalars greater than 1 (depend
on age); subjects with ages smaller than 30 will have scalars less than 1.
In this way, all subjects in the group looks like to be at the same age
(30).

 

Of course, I also suspect that there is no need to do the above mentioned
normalization if I use mri_glmfit. But my initial intention was using
non-linear scalars, and mri_glmft can only use linear fit. Please give me
your opinion. Thank you!

 
Xiao
 
 

 
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from
:%22Douglas+N.+Greve%22> Douglas N. Greve
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date
:20200507> Thu, 07 May 2020 14:06:27 -0700

I don't know what weight is. Can you elaborate?
 
On 5/7/2020 4:54 PM, Xiaojiang Yang wrote:
 
External Email - Use Caution
 
Hi Douglas,
 

Thank you very much! Could you please help me with more detailed
information?

 

1)Should I use "Variables age" or "Variables age weight" in the fsgd file?
If I can use either of them, which one is better?

 
I don't know what weight is. Can you elaborate?
 

2)For the contrast file, the content "1 -1  0" you mentioned, it corresponds
to the "Variables age" fsgd file, correct?

 
Yes
 

3)If I use the "Variables age weight" fsgd file, what will be the content of
the contrast file? Is it "1  -1  0  0"?

 
Yes
 
Thank you again!
 
Xiao
 
 
 

 
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from
:%22Douglas+N.+Greve%22> Douglas N. Greve
<https://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date
:20200507> Thu, 07 May 2020 11:55:27 -0700

I think it will work properly if you use the raw data as input and create an
FSGD file with two classes: (1) the individual subject and (2) healthy
subjects. Also include age as a covariate. Use DOSS instead of DODS. Then
set your contrast to be 1 -1 0 and run mri_glmfit. I think that should
properly account for age.

 

 

 

 

On 5/7/2020 2:44 PM, Xiaojiang Yang wrote:

 

External Email - Use Caution

 

Dear FS experts,

 

I have a group of healthy subjects. Given a new individual subject, I want
to compare its cortical thickness to the healthy group so that I can find
where the thickness is abnormal (thickening or thinning).

 

I use fsaverage as the template subject to calculate mean and std of the
healthy group. Since subjects in the healthy group have different ages, I do
a "normalization" process to all the subjects in the group BEFORE
calculating the mean and std. Thus the normalized healthy group can be
regarded as all subjects having the same "standard" age. The normalization
process is just multiplying some pre-obtained scale (varied by age, but not
linearly ) to the file *?h.thickness.fwhm0.fsaverage.mgh* of each subject
that are already calculated by "recon-all --qcache" command. So the mean and
std of the group are actually weighted in the sense of Freesurfer's
recon-all results.

 

My questions are:

 

1)If I do vertex-wise t-tests by simply comparing individual subject's
thickness to the group using mris_calc but WITHOUT using mri_glmfit, can I
still use mri_glmfit-sim to do multiple comparisons correction? If yes, how?

 

2)If the answer is no for the above question, how should I use mris_glmft to
implement my above thoughts so that I can use use mri_glmfit-sim?
Specifically, how can I use the weighted mean for the group?

 

3)Take a step back, if I consider the weight is linearly correlated with the
age, how to design the fsdg and contrast file?

 

Thank you very much!

 

Xiao

 

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

Re: [Freesurfer] Compare individual to a group

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

Douglas,

Just as I mentioned in the initial email, subjects in the healthy group have
different ages. Because average cortical thickness is believed to be
declined as the age gets older, I want to "normalize" the group by
multiplying each subject's thickness with an age-dependent scalar
(pre-calculated constant). Suppose I take age 30 as the "standard" age, then
subjects with ages greater than 30 will have scalars greater than 1 (depend
on age); subjects with ages smaller than 30 will have scalars less than 1.
In this way, all subjects in the group looks like to be at the same age
(30).

Of course, I also suspect that there is no need to do the above mentioned
normalization if I use mri_glmfit. But my initial intention was using
non-linear scalars, and mri_glmft can only use linear fit. Please give me
your opinion. Thank you!

Xiao

 

 

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

Re: [Freesurfer] Compare individual to a group

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

Hi Douglas,

 

Thank you very much! Could you please help me with more detailed
information?

1)  Should I use "Variables age" or "Variables age weight" in the fsgd
file?  If I can use either of them, which one is better?

2)  For the contrast file, the content "1 -1  0" you mentioned, it
corresponds to the "Variables age" fsgd file, correct?

3)  If I use the "Variables age weight" fsgd file, what will be the
content of the contrast file? Is it "1  -1  0  0"?

 

Thank you again!

Xiao

 

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

[Freesurfer] Compare individual to a group

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

Dear FS experts,

I have a group of healthy subjects. Given a new individual subject, I want
to compare its cortical thickness to the healthy group so that I can find
where the thickness is abnormal (thickening or thinning). 

I use fsaverage as the template subject to calculate mean and std of the
healthy group. Since subjects in the healthy group have different ages, I do
a "normalization" process to all the subjects in the group BEFORE
calculating the mean and std. Thus the normalized healthy group can be
regarded as all subjects having the same "standard" age. The normalization
process is just multiplying some pre-obtained scale (varied by age, but not
linearly ) to the file ?h.thickness.fwhm0.fsaverage.mgh of each subject that
are already calculated by "recon-all --qcache" command. So the mean and std
of the group are actually weighted in the sense of Freesurfer's recon-all
results.

My questions are: 

1)  If I do vertex-wise t-tests by simply comparing individual subject's
thickness to the group using mris_calc but WITHOUT using mri_glmfit, can I
still use mri_glmfit-sim to do multiple comparisons correction? If yes, how?

2)  If the answer is no for the above question, how should I use
mris_glmft to implement my above thoughts so that I can use use
mri_glmfit-sim? Specifically, how can I use the weighted mean for the group?

3)  Take a step back, if I consider the weight is linearly correlated
with the age, how to design the fsdg and contrast file?

Thank you very much!

Xiao

 

 

 

 

 

 

 

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

Re: [Freesurfer] sig.cluster.summary and sig.cluster.mgh of mri_glmfit-sim

2020-05-05 Thread Xiaojiang Yang
External Email - Use Caution

Hi Douglas,

 Not only vertex 10738. For all vertexes listed in the summary file, they
all have a very big Max value (absolute) that is out of the visual range.
Please see the video I grabbed from my screen: https://imgur.com/a/kkSO7sT

 *Thank you for your time to help this.*

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

[Freesurfer] sig.cluster.summary and sig.cluster.mgh of mri_glmfit-sim

2020-05-04 Thread Xiaojiang Yang
External Email - Use Caution

Hi FS developers,

 

I have used mri_glmfit-sim to do multiple comparison like below:

mri_glmfit-sim --glmdir lh.thickness.0.glmdir --cache 3 abs --cwp  0.05
--2spaces

 

and in the lh.thickness.0.glmdir/group.diff directory, I got some output
files, some of which were:

cache.th30.abs.sig.cluster.summary

cache.th30.abs.sig.cluster.mgh

 

When I open the file cache.th30.abs.sig.cluster.summary, I see its content
like below:

 

# ClusterNo  Max   VtxMax   Size(mm^2)  MNIX   MNIY   MNIZCWPCWPLow
CWPHi   NVtxsWghtVtx   Annot

   1   -7.090   10738 37.13 -4.6   48.8  -22.0  0.00020  0.0
0.00040 75 -296.47  medialorbitofrontal

   26.620   27279 32.15-43.2   32.88.6  0.00060  0.00020
0.00100 35  148.52  parstriangularis

   37.006  144024 25.30-26.8  -69.9   -4.5  0.00300  0.00200
0.00400 40  172.77  lingual

   4   -4.6884845 23.24-22.5   52.4  -12.6  0.00579  0.00440
0.00719 28  -99.88  rostralmiddlefrontal

   55.796  123246 17.35-25.1   33.2   26.4  0.04019  0.03666
0.04371 30  109.79  rostralmiddlefrontal

 

My question is: what are the values of the Max column? I thing they are
-log10(p), and the file cache.th30.abs.sig.cluster.mgh should also have this
kind of values saved. But when I use freeview to view the lh.inflated
surface with overlay file cache.th30.abs.sig.cluster.mgh, and use the
"configure" button to configure the "Overlay" threshold, I cannot find the
Max value of overlay displayed on the inflated surface.

 

Could you please explain to me why I cannot see the Max values (shown in the
summary file) as the overlay on the lh.inflated surface?

 

BTW, in another experiment where I use mri_surfcluster to generate both
summary file and overlay file, this problem does NOT exist. 

 

Thanks!

Xiaojiang

 

 

 

 

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

Re: [Freesurfer] How is Total cortical gray matter volume calculated

2020-04-25 Thread Xiaojiang Yang
External Email - Use Caution

Ian,

You can use the mris_anatomical_stats command with the -b option. E.g.,
mris_anatomical_stats -b subjectid lh
will give you a tabular output containing the total gray matter volume in
the 3rd column:

128449  86239  *243375  *2.588 0.876 0.123 0.026 1496
133.3  /xxx./subjects/QEN001/surf/lh.white


See https://surfer.nmr.mgh.harvard.edu/fswiki/mris_anatomical_stats for
more information.

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

Re: [Freesurfer] Does FS guarantee the same results if run several times?

2020-04-17 Thread Xiaojiang Yang
External Email - Use Caution

Thank you Douglas! In my case, two runnings were from Centos7 and Redhat7
respectively. Good thing is that the difference of the average thickness is
small - it's 0.006 mm. Both lh and rh have 0.006 mm differences, but one's
lh is thicker than the other's, while its rh is thinner than the other's. 

 

Xiaojiang

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

Re: [Freesurfer] Does FS guarantee the same results if run several times?

2020-04-17 Thread Xiaojiang Yang
External Email - Use Caution

Hi Douglas,

 

I checked the recon-all.log files for both, and found the difference - my
mistake, one used FLAIR as extra input and the other did not.

 

I did find another case that has two different results in two runnings. Both
runnings have MPRAGE and FLAIR as inputs, but one of the runnings has used
the option "-openmp 16", and the other did not.

Also, the two runnings were from two different machines. What do you think
is the factor that has caused the different results, the openmp or different
machine? The FS on two machines are the same version (V6).

 

Thanks!

Xiaojiang

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

Re: [Freesurfer] Does FS guarantee the same results if run several times?

2020-04-17 Thread Xiaojiang Yang
External Email - Use Caution

Thank you Douglas and Tashrif!

 

Does this mean I should run recon-all for each subject several times, and
compute the average to get the more reliable thickness?

 

Can anyone else confirm this?  Thanks!

 

Xiaojiang

 

 

 
 Billah, Tashrif
 Fri, 17 Apr 2020 08:34:14 -0700

Hi Xiaojiang and Douglas,
 
I think it is the attribute of having random initialization in the
registration 
steps. This slight discrepancy can also be observed with antsRegistration.
 
I don't know the exact algorithm FreeSurfer uses for registration though.
 
Best,
Tashrif

 

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

Re: [Freesurfer] Does FS guarantee the same results if run several times?

2020-04-17 Thread Xiaojiang Yang
External Email - Use Caution

No. I just checked, they are not identical. Although some of numbers are the
same, many are different.

 

Xiaojiang

 

 

Are the other results identical? Eg, lh.aparc.stats?

 

On 4/17/2020 10:49 AM, Xiaojiang Yang wrote:

 

External Email - Use Caution

 

Dear Freeserfer developers,

 

I have run recon-all for a bunch of subjects on the same machine for several
times. When I use the "mris_anatomical_stats" to calculate the statistics
(specifically, I am interested in average cortical thickness), I found that
for the same subject I got different results, as shown below:

 

  $ mris_anatomical_stats -b QEN001 lh

 

.

 

  128449  86239  243375  2.588 0.876 0.123 0.026 1496   133.3
/xxx./subjects/QEN001/surf/lh.white

 

$

 

$ mris_anatomical_stats -b QEN001_old lh

 

   .

 

  128449  86241  229554  2.404 0.835 0.123 0.026 1496   133.3
/xxx./subjects/QEN001_old/surf/lh.white

 

The results shows that some of the stats numbers ( such as the number of
vertices) are the same, but the "average cortical thickness +- standard
deviation (mm)" are different, and they differ quite a lot.

 

I have tried several subjects; some of them get the all-the-same results,
some of them not.

 

I am sure the subjects and the corresponding images are the same. Are these
expected results?

 

Thanks!

 

Xiaojiang

 

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

[Freesurfer] Does FS guarantee the same results if run several times?

2020-04-17 Thread Xiaojiang Yang
External Email - Use Caution

Dear Freeserfer developers,

 

I have run recon-all for a bunch of subjects on the same machine for several
times. When I use the "mris_anatomical_stats" to calculate the statistics
(specifically, I am interested in average cortical thickness), I found that
for the same subject I got different results, as shown below:

 

$ mris_anatomical_stats -b QEN001 lh

  .

  128449  86239  243375  2.588 0.876 0.123 0.026 1496
133.3  /xxx./subjects/QEN001/surf/lh.white

$

$ mris_anatomical_stats -b QEN001_old lh

  .

  128449  86241  229554  2.404 0.835 0.123 0.026 1496
133.3 /xxx./subjects/QEN001_old/surf/lh.white

 

The results shows that some of the stats numbers ( such as the number of
vertices) are the same, but the "average cortical thickness +- standard
deviation (mm)" are different, and they differ quite a lot.

 

I have tried several subjects; some of them get the all-the-same results,
some of them not. 

 

I am sure the subjects and the corresponding images are the same. Are these
expected results?

 

Thanks!

Xiaojiang

 

 

 

 

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

[Freesurfer] Can I rename subject id safely?

2020-04-14 Thread Xiaojiang Yang
External Email - Use Caution

Dear FS developers,

 

I have done some recon-all computing for a group of subjects, subject1,
subject2, . , subjectn, and the results are in the $SUBJECTS_DIR directory:

$SUBJECTS_DIR

|_ subject1

|_ subject2

..

|_ subjectn

 

Now I decide to change the format of the subject IDs. Can I just rename the
sub-directories subject1, subject2, . subject to other names, without
worrying about any inconsistencies? Thank you!

 

Xiaojiang 

 

 

 

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

[Freesurfer] Reducing FreeSurfer recon-all time

2020-03-31 Thread Xiaojiang Yang
External Email - Use Caution

Freesurfer experts:

I know in my powerful Linux machine, recon-all needs about 10 hours to
finish all computation. What is the possible way I can use to greatly
reduce this computation time from 10 hours to, say 1-3 hours?

Is Sun Grid Engine (SGE), or GPU/CUDA, or any other technique, helpful?

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

Re: [Freesurfer] Registration file types confusion

2020-03-27 Thread Xiaojiang Yang
External Email - Use Caution

Hi Douglas,

 

The link you gave to me (

https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems) has some
information about .dat file, but no information about .lta file at all. I
cannot see a clear relationship between .lta and .dat files. I have a script
that's using the matrix from .dat file. I need to use the .lta to get that
matrix. Could you please tell me how do I get the transformation matrix (as
found in .dat file, line 5-7) given only the .lta file?

 

Thank you!

Xiaojiang 

 

 

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

[Freesurfer] Registration file types confusion

2020-03-25 Thread Xiaojiang Yang
External Email - Use Caution

Hi everyone,

I am confused by the two types of registration files: .lta and .dat.

.dat file is simpler and easier to understand. But for the .lta files,
there seems to be no detailed explanation regarding it. Can anyone point
out to me where can I find the detail explanation of the file? And, what's
the relationship between .lta and .dat file?

Also, .lta files seem to cause some compatibility issues. For example, if I
use the tkregister2 utility to make some changes to the registration file
of type .lta (generated by bbregister), like below

tkregister2 --mov $someSeries --reg
$SUBJECTS_DIR/$subjectid/mri/transforms/FLAIR.auto.lta --surf pial

and save it from the GUI, then many errors occur in the console window,
like below:
..
MatrixAsciiReadFrom: could not scanf parms
ERROR: TransformLTA2RegDat(): type = 2011264000, must be 1 or 0 or 14
Segmentation fault (core dumped)

Actually that is because the registration file has been saved in the format
of .dat, although the file extension is still .lta, and the tkregister2
program finally cracks when reading the newly saved .lta file.

Anyone can solve my confusion? Thank you!
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Skull-stripped brain for non-T1 image

2020-03-20 Thread Xiaojiang Yang
External Email - Use Caution

Hi everyone,

Suppose I have run Freesurfer with respect to a subject using the T1 image,
and I have gotten the skull-stripped brain image (brain.mgz) in the
/mir directory.

Now I have a non-T1 image of the same subject, say, the (T2)FLAIR series,
and I want to get the corresponding skull-stripped brain image of that
FLAIR series by using some kind of registration. How should I do that?
Please advise. Thank you!

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

[Freesurfer] Registration of DIR (Double Inversion Recovery) series

2020-03-03 Thread Xiaojiang Yang
External Email - Use Caution

Hi all,

I want to register DIR (Double Inversion Recovery) series to T1 series
using Freesurfer. I used the command line similar to that used for FLAIR
registration:

bbregister --s subject001 --mov
dicom/subject001/20141003_MR/3_Sag_Space_DIR/2.25.97015757385982906453797720915266163627.dcm
--lta subjects/subject001/mri/transforms/DirTest.auto.lta  --init-coreg --T2

where the option --T2 is still used. Since in DIR series, gray matter is
brighter than white matter, I use --T2 as the contrast argument.

I wan's able to check how precise the results are. I will take some time to
do check that.

But anyone can tell me: Did I do it correctly? what is the better way or
correct way to do the above-mentioned registration?

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

[Freesurfer] Coordinates transformation from conformed space to the original FLAIR image

2020-02-13 Thread Xiaojiang Yang
External Email - Use Caution

Hi everyone,

I have used both T1 and (T2) Flair images as inputs to recon-all, and I
have generated some coordinates (ROI) that I can transform to the
original T1 images. Basically, I use the two matrixes obtained from the
mri_info -- vox2ras commands:

Sr = mri_info --vox2ras  $SUBJECTS_DIR/$subject/mri/orig/001.mgz
Sc = mri_info --vox2ras  $SUBJECTS_DIR/$subject/mri/T1.mgz

For a given point Coordinate=(x, y, z, 1) in the conformed space, I get the
coordinates in the original T1 space using the formula:

t1_Coordinate = inv(Sr) * Sc * Coordinate.

The above formula works fine. But I also want to get the transformed
coordinates in the Flair image space. I have used a similar way:

Srf = mri_info --vox2ras
 $SUBJECTS_DIR/$subject/mri/orig/FLAIRraw.mgz
Sc = mri_info --vox2ras  $SUBJECTS_DIR/$subject/mri/T1.mgz
flair_Coordinate = inv(Srf) * Sc * Coordinate.

But the above calculation is not correct. Does anyone have an idea of how
to get this flair coordinate?

Thank you!!!

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