Re: [Freesurfer] Talairach Failed: Distorted T1

2021-04-18 Thread Douglas N. Greve

It is subject to the same limitations

On 4/16/2021 10:09 PM, Harkey, Thomas Jarrott wrote:


External Email - Use Caution

Douglas,

Here is the advice you previously offered.
/You can measure the volume of the brainstem and add it on. Eg,
mri_segstats --ctab-default --seg aseg.mgz --id 16 --sum brainstem.dat/

My question is:
/Is this value in the brainstem.dat file accurate or is it subject to 
the same limitation in that the value will depend on the field of view 
of volume acquisition?/
/In other words, is it valid to add this number to the brain to obtain 
total brain volume?///


Thanks again for all your help.
Kindly,
Thomas Harkey
UAMS College of Medicine M3



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


*Sent:* Wednesday, April 14, 2021 9:25 AM
*To:* freesurfer@nmr.mgh.harvard.edu 
*Subject:* Re: [Freesurfer] Talairach Failed: Distorted T1
Sorry, what is the brainstem.dat file? Is that something we create?

On 4/6/2021 7:53 PM, Harkey, Thomas Jarrott wrote:


External Email - Use Caution

Douglas,
Thanks again. Is this value in the brainstem.dat file accurate or is 
it subject to the same limitation in that the value will depend on 
the field of view of volume acquisition?
In other words, is it valid to add this number to the brain to obtain 
total brain volume?

Kind regards,
Thomas Harkey
UAMS College of Medicine M3

*From:* freesurfer-boun...@nmr.mgh.harvard.edu 
 
 
 on behalf of Harkey, 
Thomas Jarrott  

*Sent:* Tuesday, March 30, 2021 6:03 PM
*To:* Freesurfer support list  


*Subject:* Re: [Freesurfer] Talairach Failed: Distorted T1

External Email - Use Caution

Douglas,
Thank you for your help. Another question. The FreeSurfer wiki states 
that for version 5.2 and later, the brainstem is not included in the 
global measures of volume because the amount of brainstem changes 
depending upon the field of view of the volume acquisition.
We are interested in the obtaining the volume of the entire brain 
using the BrainVolNotVent value. Does this mean that BrainVolNotVent 
does not include the brainstem and therefore underestimates total 
brain volume? Is there a way to correct for this?

Kind regards,
Thomas Harkey
UAMS College of Medicine M3


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

*Sent:* Thursday, March 25, 2021 9:48 PM
*To:* freesurfer@nmr.mgh.harvard.edu 
 
 

*Subject:* Re: [Freesurfer] Talairach Failed: Distorted T1
That is an axial scan that only covers 25mm of the brain 
inferior-superior. This is not whole brain coverage, which is causing 
the problem


On 3/25/2021 9:07 PM, Harkey, Thomas Jarrott wrote:


External Email - Use Caution

Douglas,
Thank you for your help. I have pasted the result below.

Volume information for 2020-24axialScalarvolumeall/mri/orig/001.mgz
          type: MGH
    dimensions: 384 x 384 x 25
   voxel sizes: 0.598958, 0.598958, 1.00
          type: SHORT (4)
           fov: 230.000
           dof: 1
        xstart: -115.0, xend: 115.0
        ystart: -115.0, yend: 115.0
        zstart: -12.5, zend: 12.5
            TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 
0.00 degrees

       nframes: 1
       PhEncDir: UNKNOWN
       FieldStrength: 0.00
ras xform present
    xform info: x_r =  -0.9841, y_r =  -0.0087, z_r =  -0.1777, c_r 
=    15.3722
              : x_a =   0.0272, y_a =  -0.9944, 
z_a =  -0.1022, c_a 

=    14.0701
              : x_s =  -0.1758, y_s =  -0.1054, 
z_s =   0.9788, c_s 

=   -75.3479

talairach xfm :
Orientation   : LPS
Primary Slice Direction: axial

voxel to ras transform:
               -0.5894  -0.0052  -0.1777 131.7540
                0.0163  -0.5956  -0.1022 126.5760
               -0.1053  -0.0631   0.9788 -55.2497
                0.   0.   0. 1.

voxel-to-ras determinant 0.358751

ras to voxel transform:
               -1.6429   0.0454  -0.2935 194.5030
               -0.0144  -1.6602  -0.1759 202.3262
               -0.1777  -0.1022   0.9788  90.4171
                0.   0.   0.     1.

Kindly,
Thomas Harkey
UAMS College of Medicine class of 2022

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

Re: [Freesurfer] problem running last step longitudinal analysis

2021-04-18 Thread Douglas N. Greve
Check each of your cross time points to make sure that all have an 
aseg.presurf.mgz.


On 4/16/2021 4:35 PM, Zeng, Qi wrote:


External Email - Use Caution

Hi Experts,

I am running the last step (-long) for a longitudinal analysis, 
However, encountering an error message saying: "error: ERROR: number 
of asegs and norm volumes do not match" for all the subjects I run 
this time. A similar problem has been reported before as the following 
link. The answer to the question is 'Freesufer version too old'. I 
have been following the exact same steps two months ago for my last 
cohort and it was fine. However, this time all the subjects 
reporting error messages (attaching error.log).
*MailScanner has detected a possible fraud attempt from 
"secure-web.cisco.com" claiming to be* Re: [Freesurfer] 
mri_fuse_segmentations error in longitudinal stream (mail-archive.com) 


My system: x86_64 GNU/Linux
Freesufer version: freesurfer/6.0.0
attached the error.log

Best,
Qi




___
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] glmfit with aseg table: view surface overlay

2021-04-18 Thread Douglas N. Greve

Not easily. You could do something in matlab, eg
aseg = MRIread('aseg.mgz');
sig = aseg;
sig.vol = zeros(seg.volsize);
ind = find(aseg.vol == 17); % left hippocampus
sig.vol(ind) = SigValueForLeftHippo; % from your table
% Do the same with the rest of your segmentations
MRIwrite(sig,'mysig.mgz')


On 4/16/2021 4:09 PM, Griem, Julia wrote:


External Email - Use Caution

External Email - Use Caution

Hi Doug,

Ok, that’s fine. Is it possible to visualize subcortical volume 
differences in any way?


Thank you!
Julia

/NIHR Maudsley Biomedical Research Centre PhD Student/

/Forensic & Neurodevelopmental Sciences/

/Institute of Psychiatry, Psychology & Neuroscience/

/King’s College London/

/16 De Crespigny Park, Camberwell/

/London, SE5 8AB/

*From:*freesurfer-boun...@nmr.mgh.harvard.edu 
 *On Behalf Of *Douglas N. Greve

*Sent:* 16 April 2021 16:11
*To:* freesurfer@nmr.mgh.harvard.edu
*Subject:* Re: [Freesurfer] glmfit with aseg table: view surface overlay

Are you trying to correct the table? You can't do that with 
mri_gtlmfit-sim. That looks for clusters, which does not make sense 
when you are using table data. There are a couple of ways you can do 
it. One is with bonerfonni correction (ie, multiply the p-value by the 
number of ROIs) or with FDR.


On 4/15/2021 11:13 AM, Griem, Julia wrote:

*External Email - Use Caution *

*External Email - Use Caution *

Hi Doug,

Thank you. Makes sense. Is there any way to visualize significance
overlays for the subcortical volumes?

I’ve also moved on to the correction for multiple comparisons in
my subcortical volumes, using:

mri_glmfit-sim -- glmdir roi.binarygroup.glmdir --perm 1000 1.3
abs --cwp 0.05 --2spaces --bg 1

This did not create any new files in the Contrast subdirectories,
but the log file does say that it was run and finished. Can I find
a table with corrected p-values anywhere? Or would it make more
sense to move the aseg_table into a different stats package and
calculate my GLM there, correcting for multiple comparisons
post-hoc (manually)?

Thank you so much

Julia

/NIHR Maudsley Biomedical Research Centre PhD Student/

/Forensic & Neurodevelopmental Sciences/

/Institute of Psychiatry, Psychology & Neuroscience/

/King’s College London/

/16 De Crespigny Park, Camberwell/

/London, SE5 8AB/

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


 *On Behalf Of
*Douglas N. Greve
*Sent:* 15 April 2021 15:14
*To:* freesurfer@nmr.mgh.harvard.edu

*Subject:* Re: [Freesurfer] glmfit with aseg table: view surface
overlay

The input is a table, so the output is a table (the sig.mgh file
will just have the number of values that are in the table; this is
not a "volume" you can look at in FV). Look in the sig.table.dat
file for the sigs.

On 4/13/2021 8:41 AM, Griem, Julia wrote:

*External Email - Use Caution *

*External Email - Use Caution *

Dear Freesurfer team,

I am comparing subcortical volumes (aseg table) in 2 groups
with no other variables. Based on the GLM lecture slides from
the course I attended, I ran the following glmfit command:

mri_glmfit

--table aseg_table.txt

--fsgd FSGD/DemographicsSubcortBinaryGroup.fsgd

--C Contrasts/HC-ASPD.mtx

--C Contrasts/ASPD-HC.mtx

--glmdir roi.binarygroup.glmdir

It created all the correct output and subdirectories.

I then used

freeview -f
$SUBJECTS_DIR/fsaverage/surf/lh.inflated:overlay=ASPD-HC/sig.mgh

but an error saying "failed to load surface overlay" comes up
and the terminal error message is "number of vertices in
overlay data does not match with surface". I assume this is
because I am trying to load a 'whole-brain' sig.mgh onto a lh
surface? Do I have to change the glmfit command to specify
hemispheres, and if so, how do I do that since I do not want
to look at cortical but subcortical data? Or alternatively,
can I load both hemispheres into freeview so the overlay
sig.mgh fits?

Thank you so much,
Julia




___

Freesurfer mailing list

Freesurfer@nmr.mgh.harvard.edu  



Re: [Freesurfer] Autorecon1 failure

2021-04-18 Thread Douglas N. Greve

No, we have not talked

On 4/16/2021 12:20 PM, Abdollahi, Shervin (NIH/NINDS) [C] wrote:


External Email - Use Caution

So yes running it from scratch would work. But I was trying to 
implement fmriprep approach in which they have chosen the optimal 
approaches for skull-stripping or intensity normalization via other 
applications like ANTs or FSL and they imported those to be used in 
Freesurfer instead of internally calculated skull-strip brain mask 
(brainmask.mgz).  The last step of autorecon-1 is where the skull 
stripping needs to be off and that’s where it fails, cause its waiting 
for that brainmask.mgz and cant find it. Has there been any 
collaboration between freesurfer and fmriprep people on this matter?


Thanks

Shervin

*From: *"Douglas N. Greve" 
*Reply-To: *Freesurfer support list 
*Date: *Friday, April 16, 2021 at 11:08 AM
*To: *"freesurfer@nmr.mgh.harvard.edu" 
*Subject: *Re: [Freesurfer] Autorecon1 failure

If you run it from scratch (recon-all -s subject -all), does it work? 
If you are going to pick and chose which options to apply, then there 
is a high risk of missing steps


On 4/14/2021 2:23 PM, Abdollahi, Shervin (NIH/NINDS) [C] wrote:

*External Email - Use Caution *

Hi Douglas, Sure, here is the copy of recon-all.log

*From: *"Douglas N. Greve" 

*Reply-To: *Freesurfer support list


*Date: *Wednesday, April 14, 2021 at 10:32 AM
*To: *"freesurfer@nmr.mgh.harvard.edu"



*Subject: *Re: [Freesurfer] Autorecon1 failure

Sorry, can you resend the recon-all.log file?

On 4/7/2021 8:45 AM, Abdollahi, Shervin (NIH/NINDS) [C] wrote:

*External Email - Use Caution *

*From: *"Abdollahi, Shervin (NIH/NINDS) [C]"
 
*Date: *Thursday, March 18, 2021 at 12:42 PM
*To: *"freesurfer@nmr.mgh.harvard.edu"



*Subject: *Autorecon1 failure

Hello Freesurfer Developers,

am trying to use run freesurfer that is configured inside
smriprep.workflow.anatomical.py under init_anat_preproc_wf
pipeline. this workflow, does the following:

 1. T1w reference: realigning and then averaging T1w images
 2. Brain Extraction and INU (bias field) correction
(antsBrainExtraction.sh)
 3. Brian tissue segmentation (@fsl_fast)
 4. Spatial normalization to standard space (antsRegistration)
 5. Surface reconstruction with Freesurfer

When it gets to step 5, it takes skull-stripped t1, ants_segm,
and bias_corrected image to use in freesurfer recon-all
command. In the surface reconstruction section, it starts by
running the following command:

recon-all -autorecon1

-i /path-to /sub-03_ses-20140624_T1w.nii

-T2 /path-to/sub-03_ses-20140624_T2w.nii

-noskullstrip

-hires

-openmp 1

-subjid sub-03

-sd /Users/abdollahis2/Desktop/fcd_nipype/derivatives/freesurfer

-expert

/Users/abdollahis2/Desktop/fcd_nipype/single_subject_03/anat_preproc_wf/surface_recon_wf/_subject_id_03/autorecon1/expert.opts

And surely soon, it gives me an error that it can not read mgh
file (brainmask.mgz). looking into freesurfer/sub-03/mri
directory I can see that brainmask.mgz is not created and I am
not sure if this is because the option -noskullstrip was used?
I have attached the recon-all.log file. I would appreciate any
suggestion on how to debug this problem.

 1. Freesurfer version: 7.1.1
(freesurfer-darwin-macOS-7.1.1-20200811-8b40551)
 2. Platform: macOS Catalina, Version 10.15.7
 3. uname -a: Darwin ndsd-eeg-cedar 19.6.0 Darwin Kernel
Version 19.6.0: Tue Jan 12 22:13:05 PST 2021;
root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64
 4. Recon-all.log: see attached




___

Freesurfer mailing list

Freesurfer@nmr.mgh.harvard.edu  

*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer  







___

   

Re: [Freesurfer] Running recon-all with FLAIR

2021-04-18 Thread Douglas N. Greve
Copy the lta to subject/mri/transforms/FLAIRraw.lta (there should be one 
there already, just copy over it)



On 4/16/2021 12:19 PM, Edina Szabó wrote:
 > External Email - Use Caution > > Hi Douglas, > > Thank you for your 
response! I really appreciate it. > > I ran the command – it works if I 
replace --i with --mov. > > How can I use the new FLAIRraw.lta to create 
a new FLAIR-based pial > surface? For example, should I run recon-all 
-autorecon2 or some > later step? > > Also, we were assuming that 
registration of the FLAIR to the T1 was > the problem (underestimated 
pial surface), since the FLAIR.mgz > produced by Freesurfer was not well 
registered to the T1.mgz. So, if > that's the case, and I have another 
well-registered FLAIR (using FSL > or SPM), is there a way to skip the 
Freesurfer registration and use > that FLAIR to create the FLAIR pial 
surface? > > Thank you for your help in advance! > > All the best, Edina 
Szabo > > __ Edina Szabo, PhD Research Fellow Department of 
Anesthesiology, > Critical Care and Pain Medicine Boston Children's 
Hospital | Harvard > Medical School > > - > > Try this 
cd subject/mri mri_coreg --i orig/T2raw.mgz --targ orig.mgz > --reg 
transforms/T2raw.lta You can run with multiple threads by > adding 
--threads N where N is the number of threads On 3/29/2021 5:18 > PM, 
Edina Szabó wrote: > > External Email - Use Caution > > Dear All, > > We 
are running recon-all on the latest version of FreeSurfer > (v7.1.1). We 
are using both T1 and FLAIR images to better define the > pial surfaces, 
but when we run the recommended command line > (recon-all -subject 
subjectname -i /path/to/input_volume -FLAIR > /path/to/FLAIR_volume 
-FLAIRpial -all) the pial surface is very > underestimated (?.pial.FLAIR 
– and the aseg volume is based on these > surfaces), and we get better 
results without the FLAIR. It seems that > FreeSurfer mis-registers the 
FLAIR to the T1 during the process. Is > there a separate step we should 
do to register FLAIR to T1? > > Thank you, Edina > > 
___ Freesurfer mailing > 
list Freesurfer@nmr.mgh.harvard.edu > 
 *MailScanner has detected a > 
possible fraud attempt from "secure-web.cisco.com" claiming to be* > 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > 
 
> > > ___
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu  >  *MailScanner has detected a 
> possible fraud attempt from "secure-web.cisco.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

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

Re: [Freesurfer] Building atlas by Xhemi: Segmentation fault (core dumped)

2021-04-18 Thread Douglas N. Greve

Not sure what is going wrong here. Try running
mri_annotation2label --subject myatlas.i3 --hemi lh --outdir 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/make_cortex_label.tmp.8214 
--annotation aparc.a2009s

Does it segfault in the same way?
Can you confirm that you are not running out of disk space?



On 4/15/2021 2:47 AM, Li-Zhen Chen wrote:


External Email - Use Caution

Hello Freesurfer Developer,
I'm building my own symmetric atlas by Xhemi, something is wrong at 
the final step(Make final iteration)

Here is my code:

make_average_subject --out myatlas.i3 --surf-reg myatlas.i2.sphere.reg 
--subjects sub_01 sub_02 --xhemi --lh


When I ran this code, a problem emerged. Here is part of the log:

mris_seg2annot --seg 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.vote.mgh 
--ctab 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.1.sub_01.xhemi.ctab 
--s myatlas.i3 --hemi lh --o 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/lh.aparc.a2009s.annot


$Id: mris_seg2annot.c,v 1.10 2014/11/15 00:07:19 greve Exp $
cwd /media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3
cmdline mris_seg2annot --seg 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.vote.mgh 
--ctab 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.1.sub_01.xhemi.ctab 
--s myatlas.i3 --hemi lh --o 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/lh.aparc.a2009s.annot 


sysname  Linux
hostname chenlz-HP-ZHAN-99-Pro-G2-Microtower-PC
machine  x86_64
user     chenlz
subject   myatlas.i3
hemi      lh
surfseg 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.vote.mgh
ctab 
 /media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.1.sub_01.xhemi.ctab
annotfile 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/lh.aparc.a2009s.annot
Reading surface seg 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.vote.mgh
Reading surface 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/surf/lh.white
Reading ctab 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.1.sub_01.xhemi.ctab
Writing annot to 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/lh.aparc.a2009s.annot


Annot2std-Run-Time-Sec 16
annot2std Done
mri_annotation2label --subject myatlas.i3 --hemi lh --outdir 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/make_cortex_label.tmp.8214 
--annotation aparc.a2009s

subject = myatlas.i3
annotation = aparc.a2009s
hemi = lh
outdir = 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/make_cortex_label.tmp.8214

surface   = white

Reading surface
 /media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/surf/lh.white
Loading annotations from 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/lh.aparc.a2009s.annot

reading colortable from annotation file...
colortable with 11176 entries read (originally 
/media/chenlz/Zixuans1/MRI_Data/Human_MRI/CCS_PrePro/myatlas.i3/label/tmpdir.annot2std.8488/seg.1.sub_01.xhemi.ctab)

Segmentation fault (core dumped)
ERROR: make_average_surface

I run Freesurfer 6.0 on Ubuntu 18.04. I've tried to rerun my script 
several times but I can't figure this problem out. What could be the 
possible reasons? Any answer will be appreciated!


Kind regards,
Jewel


___
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] mris_average_surface fails

2021-04-18 Thread fsbuild
External Email - Use Caution

Hello Mudathir,
Your account needs admin/sudo privileges in order to write files under 
/Applications. If you made the first account on the machine when it was 
new and powered up after taking it out of the box, then at the terminal all you 
should need to do is preface commands with “sudo”. If you use the Finder, 
then it will ask you to authenticate via a popup window, e.g., when installing 
software. Once you authenticate via the terminal or via the Finder window 
and the system accepts your password, then by default your admin permissions 
will be cached for a certain period of time.
One way to test that is to open a terminal window and do,
$ sudo touch /Applications foooutput deletedPassword:
If that succeeds, then you should be able to remove the file w/o typing sudo 
while your credentials are still cached,$ rm /Applications/foo
With admin/sudo privileges, the 7.1..1 Mac package installer 
program,https://secure-web.cisco.com/1xtJzx0lQIrKf7ZCl0ntd1jilGKonbJiHvRDb7FRZbR4FJp5DhU4Tdht4S1iAOPKKXATrwjbXI3PlGd0IVWQH3JEDXk4X_SRGJ9ofHHDRH5yhxJ8uv5Rvaynmlwi7KhaEt8Akxfc8jG3W8PYzvkVCCPLR3I8_ztXBBrwlwB8RCVPBvRzyh6CwcgXfIA9TbVR_4misXtNtC6gd18NY2RmwqQ82-Izw7bcVDV9wjS_kjTo5tW7rM6eZsSf_wNiqSJBOHexaB8rvlch_ST8ot_iH2w/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Fpub%2Fdist%2Ffreesurfer%2F7.1.1%2Ffreesurfer-darwin-macOS-7.1.1.pkg
- can be used to install the freesurfer 7.1.1 distribution under 
/Applications/freesurfer/7.1.1. The freesurfer 6 or freesurfer 7 *.pkg 
files should set all the permissions to be correct on the freesurfer files.

You can re-home SUBJECTS_DIR in the shell environment (this example assumes the 
pkg file installed it as /Applications/freesurfer/7.1.1)
$ bash$ export FREESURFER_HOME=/Applications/freesurfer/7.1.1$ source 
$FREESURFER_HOME/SetUpFreeSurfer.sh
 freesurfer-darwin-macOS-7.1.1-20200811-8b40551 
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME/Applications/freesurfer/7.1.1
FSFAST_HOME  /Applications/freesurfer/7.1.1/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR  /Applications/freesurfer/7.1.1/subjects
MNI_DIR
/Applications/freesurfer/7..1.1/mni
You can change the setting of SUBJECTS_DIR to point to a directory where you 
always have write permission (do not need to authenticate with sudo), e.g., 
your home directory,
$ mkdir $HOME/subjects$ export SUBJECTS_DIR=$HOME/subjects
If you have at least ~3G of free space, you could just copy the contents of the 
./subjects dir from the freesurfer distribution into $HOME/subjects,
$ cd $HOME$ pwd/Users/username$ ( cd 
/Applications/freesurfer/7.1.1; tar cpf - subjects) | tar xpf -
$ ls subjectsREADME* 
cvs_avg35/
fsaverage3/   
fsaverage6/   rh.EC_average/
V1_average/   
cvs_avg35_inMNI152/fsaverage4/   
fsaverage_sym/  sample-001.mgz*
bert/  
fsaverage/
fsaverage5/   
lh.EC_average/  sample-002.mgz*

You can always start again from scratch after processing files by removing 
./subejcts under your $HOME directory and copy the files over again via the tar 
command (w/o touching the installed freesurfer distribution).
- R.

On Apr 18, 2021, at 04:41, バキット・ムダシル m-bak...@fmu.ac.jp 
wrote:External Email - Use 
CautionThanks 
Douglas.Here what happened. I did as you said and moved the $SUBJECTS_DIR 
out of the /Applications folder to somewhere in my home folder. Still the same 
error. But when I did ran the command through freesurfer 6 it worked fine even 
in the /Applications folder. Also, a freesurfer 7 in an Ubuntu virtual machine 
worked fine. So I think it has to do with something in the freesurfer 7.1.1 
version I have in my computer.I would like to add a question if you don’t mind. 
Since I found here in the forum that the average is in the MNI305 space, how I 
can make an average of my sample in MNI152 space from the 
start?ThanksMudathirOn Apr 14, 2021, at 23:26, Douglas N. Greve 
dgr...@mgh.harvard.edu wrote:It looks like you do there, but downstream 
you might not. In general, macs don't like to give you permission in the apps 
folder. Try pointer your SUBJECTS_DIR to another location, eg, in your home 
directoryOn 4/6/2021 8:44 PM, バキット・ムダシル 
wrote:External Email - Use 
CautionI Think I have a 
permission. I ran chmod -R u+rwX to make sure, but the error was the same. Can 
you confirm from below please?\mudathirbakhit$ ls -l $FREESURFER_HOME/total 
568drwxr-xr-x39 
mudathirbakhitadmin1248 Mar 18 20:24 
6..0.0-rwxr-xr-x 1 
mudathirbakhitwheel3240 Aug 122020 
ASegStatsLUT.txt-rwxr-xr-x 1 
mudathirbakhitwheel47514 Aug 122020 
DefectLUT.txt-rwxr-xr-x@1 
mudathirbakhitwheel89181 Aug 122020 
FreeSurferColorLUT.txt-rwxr-xr-x 1 
mudathirbakhitwheel18152 Aug 122020 
FreeSurferEnv.csh-rwxr-xr-x 1 
mudathirbakhitwheel18223 Aug 122020 
FreeSurferEnv.shdrwxrwxr-x@3 
mudathirbakhitwheel 96 Mar 16 13:11 
Freeview.appdrwxr-xr-x 3 
mudathirbakhitwheel 96 Mar 17 10:06 
Freeview_backup.app-rwxr-xr-x@1 
mudathirbakhitwheel28381 Aug 122020 

Re: [Freesurfer] mris_average_surface fails

2021-04-18 Thread バキット・ムダシル
External Email - Use Caution

Thanks Douglas. 
Here what happened. I did as you said and moved the $SUBJECTS_DIR out of the 
/Applications folder to somewhere in my home folder. Still the same error. But 
when I did ran the command through freesurfer 6 it worked fine even in the 
/Applications folder. Also, a freesurfer 7 in an Ubuntu virtual machine worked 
fine. So I think it has to do with something in the freesurfer 7.1.1 version I 
have in my computer.

I would like to add a question if you don’t mind. Since I found here in the 
forum that the average is in the MNI305 space, how I can make an average of my 
sample in MNI152 space from the start?

Thanks

Mudathir


> On Apr 14, 2021, at 23:26, Douglas N. Greve  wrote:
> 
> It looks like you do there, but downstream you might not. In general, macs 
> don't like to give you permission in the apps folder. Try pointer your 
> SUBJECTS_DIR to another location, eg, in your home directory
> 
> On 4/6/2021 8:44 PM, バキット・ムダシル wrote:
>> External Email - Use Caution
>> 
>> I Think I have a permission. I ran chmod -R u+rwX to make sure, but the 
>> error was the same. Can you confirm from below please?
>> 
>> \mudathirbakhit$ ls -l $FREESURFER_HOME/
>> total 568
>> drwxr-xr-x   39 mudathirbakhit  admin   1248 Mar 18 20:24 6.0.0
>> -rwxr-xr-x1 mudathirbakhit  wheel   3240 Aug 12  2020 ASegStatsLUT.txt
>> -rwxr-xr-x1 mudathirbakhit  wheel  47514 Aug 12  2020 DefectLUT.txt
>> -rwxr-xr-x@   1 mudathirbakhit  wheel  89181 Aug 12  2020 
>> FreeSurferColorLUT.txt
>> -rwxr-xr-x1 mudathirbakhit  wheel  18152 Aug 12  2020 FreeSurferEnv.csh
>> -rwxr-xr-x1 mudathirbakhit  wheel  18223 Aug 12  2020 FreeSurferEnv.sh
>> drwxrwxr-x@   3 mudathirbakhit  wheel 96 Mar 16 13:11 Freeview.app
>> drwxr-xr-x3 mudathirbakhit  wheel 96 Mar 17 10:06 Freeview_backup.app
>> -rwxr-xr-x@   1 mudathirbakhit  wheel  28381 Aug 12  2020 SegmentNoLUT.txt
>> -rwxr-xr-x1 mudathirbakhit  wheel   1358 Aug 12  2020 SetUpFreeSurfer.csh
>> -rwxr-xr-x1 mudathirbakhit  wheel   1350 Aug 12  2020 SetUpFreeSurfer.sh
>> -rwxr-xr-x@   1 mudathirbakhit  wheel   4104 Aug 12  2020 
>> Simple_surface_labels2009.txt
>> -rwxr-xr-x1 mudathirbakhit  wheel  25476 Aug 12  2020 WMParcStatsLUT.txt
>> -rw-r--r--@   1 mudathirbakhit  staff   2718 Apr  1 14:13 aparc+aseg.txt
>> drwxr-xr-x  126 mudathirbakhit  wheel   4032 Apr  7 07:22 average
>> drwxr-xr-x  766 mudathirbakhit  wheel  24512 Mar 17 10:06 bin
>> -rwxr-xr-x1 mudathirbakhit  wheel 47 Aug 12  2020 build-stamp.txt
>> drwxr-xr-x3 mudathirbakhit  wheel 96 Mar 17 19:35 color
>> drwxr-xr-x3 mudathirbakhit  wheel 96 Aug 12  2020 diffusion
>> drwxr-xr-x   37 mudathirbakhit  wheel   1184 Aug 12  2020 docs
>> drwxr-xr-x3 mudathirbakhit  wheel 96 Aug 12  2020 etc
>> drwxr-xr-x5 mudathirbakhit  wheel160 Aug 12  2020 fsafd
>> drwxr-xr-x6 mudathirbakhit  wheel192 Apr  7 07:22 fsfast
>> drwxr-xr-x6 mudathirbakhit  wheel192 Apr  7 07:22 lib
>> -rw-r--r--@   1 mudathirbakhit  wheel 55 Feb 17 09:40 license.txt
>> drwxr-xr-x  185 mudathirbakhit  wheel   5920 Apr  7 07:22 matlab
>> drwxr-xr-x   11 mudathirbakhit  wheel352 Apr  7 07:22 mni
>> -rw-r--r--@   1 mudathirbakhit  staff641 Apr  6 16:13 par.txt
>> drwxr-xr-x8 mudathirbakhit  wheel256 Apr  7 07:22 python
>> drwxr-xr-x3 mudathirbakhit  wheel 96 Aug 12  2020 sessions
>> -rwxr-xr-x1 mudathirbakhit  wheel134 Aug 12  2020 sources.csh
>> -rwxr-xr-x1 mudathirbakhit  wheel132 Aug 12  2020 sources.sh
>> drwxr-xr-x+  42 mudathirbakhit  wheel   1344 Apr  7 09:37 subjects
>> -rwxr-xr-x1 mudathirbakhit  wheel   1681 Aug 12  2020 
>> tkmeditParcColorsCMA
>> drwxr-xr-x   38 mudathirbakhit  wheel   1216 Apr  7 07:22 trctrain
>> -rwxr-xr-x1 mudathirbakhit  wheel972 Aug 12  2020 uninstall.sh
>> 
>>> On Apr 6, 2021, at 22:30, Douglas N. Greve >> > wrote:
>>> 
>>> Do you have write permissions to
>>> 
>>> /Applications/freesurfer/subjects
>>> 
>>> Of not on a mac
>>> 
>>> On 4/6/2021 6:39 AM, バキット・ムダシル wrote:
 External Email - Use Caution
 
 Hi,
 I am trying to make an average subject but when the process reaches 
 mris_average_surface it fails as seen below.
 My command was as follow:
 make_average_subject --out avgsubject --subjects spl_01 spl_02 spl_03 
 spl_04 spl_05 spl_06 spl_07 spl_08 spl_09 spl_10
 Can you please guide me to solve this issue.
 
 Thanks
 
 Mudathir
 
 ###
 #@# Making average lh.white surface -
 Tue Apr  6 19:23:39 JST 2021
 /Applications/freesurfer/subjects/avgsubject
 mris_make_average_surface -i 7 -o white -sdir-out 
 /Applications/freesurfer/subjects lh white sphere.reg avgsubject spl_01 
 spl_02 spl_03 spl_04 spl_05 spl_06 spl_07 spl_08 spl_09 spl_10