[Freesurfer] timeseries question

2020-02-28 Thread Nasiriavanaki, Zahra
Hi Freesurferes

I have extracted timeseries from a task fMRI using the command below:
mri_segstats --i fmcpr.sm0.self.rh.nii.gz --slabel $subj rh  rh.label --id 1 
--avgwf-remove-mean --avgwf ./rh.txt

My question is: Is the temporal drift being counted in considering that I used 
preprocessed data as the input?

Thanks
Mona


Zahra (Mona) Nasiriavanaki

Postdoctoral Research Fellow

Martinos Center for Biomedical Imaging

Massachusetts General Hospital

149 13th Street, 149-2615

Charlestown, MA, USA, 02129


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

Re: [Freesurfer] group analysis for same group in 2 conditions

2020-02-28 Thread Marco Ninghetto
External Email - Use Caution

Thanks for your support. Here my "mkanalysis-sess" command:

mkanalysis-sess -a rtopy.self.?h.ng -surface self ?h -paradigm rtopy.par
> -retinotopy 41 -TR 2.5 -fsd bold -fwhm 5 -per-run


I run this command for both no goggles condition (rtopy.self.?h.ng) and for
yes goggles (rtopy.self.?h.yg).
The functional data were acquired using rotating wedge 45deg
counter-clockwise and expanding ring (out) stimuli. One cycle lasted 41sec,
each stimulus had 6 cycles.


On Fri, 28 Feb 2020, 22:24 Douglas N. Greve,  wrote:

> What quantity from the retinotopy analysis do you want to compare across
> subjects? Eg, the phase? Can you send your mkanalysis-sess command?
>
> On 2/28/2020 8:17 AM, Marco Ninghetto wrote:
>
> External Email - Use Caution
> Dear experts,
> I'm performing a study on visual pathways, in which each participant
> undergoes to 2 different conditions. One in normal sight (NG, i.e.: No
> Goggles) and second in narrowed sight using special goggles (YG, i.e.: Yes
> Goggles). I'd like to compare the results between these two conditions
> (basically, subject A, B, C in cond1 versus subject A, B, C in cond2).
>
> I created the FSGD file (attached as "RetinotopyStudy" file) and the
> contrast matrices, organised as:
>
> 1 -1 , named "YG-NG.mtx"
>> -1 1,  named "NG-YG.mtx"
>
>
> In this FSGD sample file, I reported only subjects from 7 to 12.
> My folders are organised as follows:
>
> main >> recon_output  >> sub-yy (X folders for X subjects)
>> >> Contrasts (with contrast files)
>> >> FSGD (with FSGD files)
>> >> fsaverage (subjects template
>> created during recon-all -qcache)
>> >> pRF_function >> analNG (inside, there are the functionals for
>> each subject in NG condition)
>> >> analYG  (inside, there are the
>> functionals for each subject in YG condition)
>
>
>
> Once I used the pipeline for the retinotopy analysis
> and I
> have results for each participant, and now I'd like to make 2nd lev
> analysis. So the idea would be, as you probably already got it, condition
> Yes Goggles versus condition No Goggles. I use the command:
>
> mris_preproc --fsgd RetinotopyStudy --target fsaverage --hemi ?h --out
>> outputname.mgh
>
>
> But I'm not sure it would calculate in the right way.
> The question is: how would I organise the FSGD file or folders in such a
> way that FREESURFER would know that it has to compare results from the same
> subjects but from two different folders (analNG vs analYG)?
>
> Hoping that's clear, I really look forward to hear from you soon.
> Thank you for your time,
> Marco
>
> --
> ---
> Marco Ninghetto, PhD candidate
> Laboratory of Neuroplasticity
> Nencki Institute of Experimental Biology
> Polish Academy of Sciences
> 3 Pasteur Street, 02-093 Warsaw, Poland
>
> ___
> 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 mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Issue with BBR and Applying CVS Warps to Diffusion Data

2020-02-28 Thread Austin Patrick
External Email - Use Caution

The b0-to-anat look fine. I’m using mri_vol2vol with trilinear interpolation to 
apply the CVS warps.

Thanks,
-Austin

From:  on behalf of "Douglas N. Greve" 

Reply-To: Freesurfer support list 
Date: Friday, February 28, 2020 at 3:18 PM
To: "freesurfer@nmr.mgh.harvard.edu" 
Subject: Re: [Freesurfer] Issue with BBR and Applying CVS Warps to Diffusion 
Data

So the B0-to-Anat registration is ok? What command are you using to map the B0s 
into the CVS space?
On 2/26/2020 3:50 PM, Austin Patrick wrote:

External Email - Use Caution

Dear All,

I have used CVS to align around 180 scans to a single, representative subject. 
I have then used BBR to align the mean b0 image to register the diffusion data 
to the native space T1 and then apply CVS warps; however, the resulting aligned 
images for calculated maps from the DWIs are very poor with a great deal of 
heterogeneity, especially at the boundary but also within white matter. The 
coefficient of variation of the mean b0 BB registered to the T1 is around 30% 
globally (excluding the edges of the brain) and 40% or greater for FA. I have 
reviewed the initial rigid registration of the b0s to the T1s for gross 
misalignment and found that FLIRT performed pretty well and didn’t fail for any 
of my subjects and didn’t require manual adjustment; however, the result of 
after applying the CVS warps is quite poor. The data T1s are 1mm (MPnRAGE) and 
the b0s are at 2mm. The DWIs were corrected for eddy currents, Gibbs’ ringing, 
rician noise, and B0 distortions and look pretty great. The DWIs are 70x180x180 
at 2mm isotropic and the T1s are 256x256x256 at 1mm isotropic. Are there any 
suggestions for this issue? I have tried re-aligning the DTI parameter maps to 
the b0s before applying the CVS warps (although they should be in the same 
space) and I have tried using both the –t2 and –dti, as well as with/out the 
–fsl-init flag. Is bbregister shifting the origin for the images at all? Any 
help would be appreciated.

Cheers,
-Austin
--
Austin M. Bazydlo, MS
PhD Candidate
Dept. of Medical Physics
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] Creating the pial surface of the cerebellum: how to let the mris_make_surfaces to push the pial surface to the boundary

2020-02-28 Thread Douglas N. Greve

Sorry, I don't know what else to tell you.

On 2/28/2020 9:59 AM, CiRong Liu wrote:


External Email - Use Caution

Hi, Douglas,


Thank you for your reply.


I tried adding -max XXX.

If I set the "-max 5" as the default values, the mris_mask_surfaces 
would finish running.



However, if I set the "-max" more than 5, the mris_mask_surfaces would 
crash during the running - *Segmentation fault (core dumped).*


*This is my computer config:*

*1) Freesurfer Version - 
*freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c


2) Platform: Linux Mint 19.2

3) uname -a: Linux  4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 
16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux



*Here is the error msg (at the end)for example:*

$mris_make_surfaces -max 10 -max_csf 0.1 -min_gray_at_csf_border 1 
-orig_wm  orig -noaseg  -noaparc  -T1 ceb_sm marmosetceb_v2 rh


using max_thickness = 10.0

reading original vertex positions from orig

not using aseg volume to prevent surfaces crossing the midline

not using aparc to prevent surfaces crossing the midline

using ceb_sm as T1 volume...

$Id: mris_make_surfaces.c,v 1.164.2.4 2016/12/13 22:26:32 zkaufman Exp $

$Id: mrisurf.c,v 1.781.2.6 2016/12/27 16:47:14 zkaufman Exp $

reading volume 
/home/cirong/bin/freesurfer/subjects/marmosetceb_v2/mri/filled.mgz...


reading volume 
/home/cirong/bin/freesurfer/subjects/marmosetceb_v2/mri/ceb_sm.mgz...


resampling filled volume to be in voxel register with T1

reading volume 
/home/cirong/bin/freesurfer/subjects/marmosetceb_v2/mri/wm.mgz...


changing type of input wm volume to UCHAR...

resampling wm volume to be in voxel register with T1

0 bright wm thresholded.

0 bright non-wm voxels segmented.

reading original surface position from 
/home/cirong/bin/freesurfer/subjects/marmosetceb_v2/surf/rh.orig...


computing class statistics...

border white:    170215 voxels (0.34%)

border gray  211849 voxels (0.42%)

WM (79.0): 80.8 +- 7.5 [70.0 --> 106.0]

GM (71.0) : 71.9 +- 8.9 [30.0 --> 105.0]

using class modes intead of means, discounting robust sigmas

intensity peaks found at WM=70+-10.4, GM=69+-10.4

setting MIN_GRAY_AT_WHITE_BORDER to 60.1 (was 70)

setting MAX_BORDER_WHITE to 77.5 (was 105)

setting MIN_BORDER_WHITE to 69.0 (was 85)

setting MAX_CSF to 8.0 (was 40)

setting MAX_GRAY to 62.5 (was 95)

setting MAX_GRAY_AT_CSF_BORDER to 60.1 (was 75)

setting MIN_GRAY_AT_CSF_BORDER to 8.0 (was 40)

mean inside = 74.8, mean outside = 73.4

smoothing surface for 5 iterations...

repositioning cortical surface to gray/white boundary

smoothing T1 volume with sigma = 2.000

vertex spacing 0.87 +- 0.21 (0.01-->1.75) (max @ vno 190205 --> 190741)

face area 0.31 +- 0.12 (0.00-->0.93)

mean border=73.1, 45600 (45600) missing vertices, mean dist 2.1 [3.9 
(%15.7)->2.6 (%84.3))]


%31 local maxima, %44 large gradients and % 2 min vals, 0 gradients 
ignored


mean absolute distance = 2.85 +- 2.92

7642 vertices more than 2 sigmas from mean.

averaging target values for 5 iterations...

tol=1.0e-04, sigma=2.0, host=unkno, nav=4, nbrs=2, l_repulse=5.000, 
l_tspring=1.000, l_nspring=0.500, l_intensity=0.200, l_curv=1.000


mom=0.00, dt=0.50

complete_dist_mat 0

rms 0

smooth_averages 0

remove_neg 0

ico_order 0

which_surface 0

target_radius 0.00

nfields 0

scale 0.00

desired_rms_height 0.00

momentum 0.00

nbhd_size 0

max_nbrs 0

niterations 25

nsurfaces 0

SURFACES 3

flags 0 (0)

use curv 0

no sulc 0

no rigid align 0

mris->nsize 2

mris->hemisphere 1

randomSeed 0

000: dt: 0., sse=2428827.0, rms=6.800

001: dt: 0.5000, sse=2228267.0, rms=6.217 (8.575%)

002: dt: 0.5000, sse=2028263.5, rms=5.645 (9.199%)

003: dt: 0.5000, sse=1886400.0, rms=5.096 (9.731%)

004: dt: 0.5000, sse=1814327.0, rms=4.583 (10.072%)

005: dt: 0.5000, sse=1721364.9, rms=4.121 (10.063%)

006: dt: 0.5000, sse=1625707.9, rms=3.724 (9.648%)

007: dt: 0.5000, sse=1655070.8, rms=3.394 (8.851%)

008: dt: 0.5000, sse=1652526.4, rms=3.136 (7.621%)

009: dt: 0.5000, sse=1610117.9, rms=2.940 (6.224%)

010: dt: 0.5000, sse=1561510.9, rms=2.795 (4.945%)

011: dt: 0.5000, sse=1554297.9, rms=2.681 (4.083%)

012: dt: 0.5000, sse=1584733.6, rms=2.592 (3.329%)

013: dt: 0.5000, sse=1583861.1, rms=2.517 (2.880%)

014: dt: 0.5000, sse=1546283.4, rms=2.452 (2.578%)

015: dt: 0.5000, sse=1573124.0, rms=2.396 (2.291%)

016: dt: 0.5000, sse=1560157.1, rms=2.343 (2.203%)

rms = 2.30, time step reduction 1 of 3 to 0.250...

017: dt: 0.5000, sse=1584955.1, rms=2.296 (2.021%)

rms = 2.27, time step reduction 2 of 3 to 0.125...

018: dt: 0.2500, sse=1413241.2, rms=2.266 (1.279%)

rms = 2.25, time step reduction 3 of 3 to 0.062...

019: dt: 0.1250, sse=1348002.0, rms=2.251 (0.692%)

positioning took 2.0 minutes

smoothing T1 volume with sigma = 1.000

vertex spacing 0.81 +- 0.26 (0.02-->3.05) (max @ vno 1015 --> 1374)

face area 0.31 +- 0.17 (0.00-->2.54)

mean border=73.2, 37029 (33580) missing vertices, mean dist -0.4 [1.3 
(%54.3)->0.9 (%45.7)

Re: [Freesurfer] group analysis for same group in 2 conditions

2020-02-28 Thread Douglas N. Greve
What quantity from the retinotopy analysis do you want to compare across 
subjects? Eg, the phase? Can you send your mkanalysis-sess command?


On 2/28/2020 8:17 AM, Marco Ninghetto wrote:


External Email - Use Caution

Dear experts,
I'm performing a study on visual pathways, in which each participant 
undergoes to 2 different conditions. One in normal sight (NG, i.e.: No 
Goggles) and second in narrowed sight using special goggles (YG, i.e.: 
Yes Goggles). I'd like to compare the results between these two 
conditions (basically, subject A, B, C in cond1 versus subject A, B, C 
in cond2).


I created the FSGD file (attached as "RetinotopyStudy" file) and the 
contrast matrices, organised as:


1 -1 , named "YG-NG.mtx"
-1 1,  named "NG-YG.mtx"

In this FSGD sample file, I reported only subjects from 7 to 12.
My folders are organised as follows:

main >> recon_output  >> sub-yy (X folders for X subjects)
                                    >> Contrasts (with
contrast files)
                                    >> FSGD (with FSGD files)
                                    >> fsaverage (subjects
template created during recon-all -qcache)
        >> pRF_function >> analNG (inside, there are the
functionals for each subject in NG condition)
                                    >> analYG (inside, there
are the functionals for each subject in YG condition) 



Once I used the pipeline for the retinotopy analysis 
and I 
have results for each participant, and now I'd like to make 2nd lev 
analysis. So the idea would be, as you probably already got it, 
condition Yes Goggles versus condition No Goggles. I use the command:


mris_preproc --fsgd RetinotopyStudy --target fsaverage --hemi
?h --out outputname.mgh


But I'm not sure it would calculate in the right way.
The question is: how would I organise the FSGD file or folders in such 
a way that FREESURFER would know that it has to compare results from 
the same subjects but from two different folders (analNG vs analYG)?


Hoping that's clear, I really look forward to hear from you soon.
Thank you for your time,
Marco

--
---
Marco Ninghetto, PhD candidate
Laboratory of Neuroplasticity
Nencki Institute of Experimental Biology
Polish Academy of Sciences
3 Pasteur Street, 02-093 Warsaw, Poland

___
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_vol2surf produces invalid surface

2020-02-28 Thread Douglas N. Greve
mri_vol2surf does not actually produce a surface, it produces a surface 
overlay (ie, a value for each vertex). You can to run recon-all to 
produce a surface

On 2/27/2020 4:49 AM, Shuntaro Aoki wrote:
>  External Email - Use Caution
>
> Dear mailing list,
>
> I was trying to convert a volume image to a freesurfer surface (as
> gii) with `mri_vol2surf` for visualization, but ended up with invalid
> surface data (i.e., a file not loadable by freeview).
>
> What I did was:
>
> ---
> % mri_vol2surf --version
> stable5
> % mri_vol2surf --src ./sample_volume.nii.gz --regheader sample-sub
> --hemi lh --out ./sample_vol2surf_lh.gii
> ---
>
> Here, `sample_volume.nii.gz` is a volume image (such as a statistical
> map) registered to an individual reference T1w image of subject
> `sample-sub`, which was the input of recon-all for the subject.
> The command completed without errors:
>
> ---
> srcvol = ./sample_volume.nii.gz
> srcreg unspecified
> srcregold = 0
> srcwarp unspecified
> surf = white
> hemi = lh
> reshape = 0
> interp = nearest
> float2int = round
> GetProjMax = 0
> INFO: float2int code = 0
> Done loading volume
> Computing registration from header.
>Using /home/share/data/fmri/freesurfer/subjects/sample-sub/mri/orig.mgz
> as target reference.
> Reading surface
> /home/share/data/fmri/freesurfer/subjects/sample-sub/surf/lh.white
> Done reading source surface
> Mapping Source Volume onto Source Subject Surface
>   1 0 0 0
> using old
> Done mapping volume to surface
> Number of source voxels hit = 31055
> Writing to ./sample_vol2surf_lh.gii
> Dim: 155685 1 1
> ---
>
> Then I tried to open the resulting surface `sample_vol2surf_lh.gii`
> with freeview (ver 1.0 build 2013-05-13) but it failed, saying "Failed
> to load Surface".
> I also got the following shell output:
>
> ---
> mriseadGIFTIfile: mris is NULL! found when parsing file
> /home/mu/aoki/work/surf_sphere/sample_vol2surf_lh.gii
> MRISread failed
> mriseadGIFTIfile: mris is NULL! found when parsing file
> /home/mu/aoki/work/surf_sphere/sample_vol2surf_lh.gii
> ---
>
> The output of `mris_info` is:
>
> ---
> % mris_info sample_vol2surf_lh.gii
> ==
> gifti_image struct
>  version= 1.0
>  numDA  = 1
> gim->meta nvpairs struct, len = 3 :
>  nvpair: 'UserName' = 'aoki'
>  nvpair: 'Date' = 'Thu Feb 27 17:32:40 2020'
>  nvpair: 'gifticlib-version' = 'gifti library version 1.09, 28 June, 2010'
>
> gim->labeltable giiLabelTable struct, len = 0 :
> --
> gim->darray[0] giiDataArray struct
>  intent  0 = NIFTI_INTENT_NONE
>  datatype   16 = NIFTI_TYPE_FLOAT32
>  ind_ord 1 = RowMajorOrder
>  num_dim   = 1
>  dims  = 155685, 0, 0, 0, 0, 0
>  encoding3 = GZipBase64Binary
>  endian  2 = LittleEndian
>  ext_fname =
>  ext_offset= 0
> darray->meta nvpairs struct, len = 0 :
>  data   = 
>  nvals  = 155685
>  nbyper = 4
>  numCS  = 0
> darray->ex_atrs nvpairs struct, len = 0 :
> --
> gifti_image struct
>  swapped= 0
>  compressed = 1
>   -- darray totals: 1 MB
> gim->ex_atrs nvpairs struct, len = 0 :
> ==
> ---
>
> I checked matching between voxels in the input volume and the surface
> with the output of --srchit option and found the registration was
> fine.
>
> I also tried mgh output but got another invalid file.
>
> ---
> % mris_info sample_vol2surf_lh.mgh
> ERROR: MRISread: file 'sample_vol2surf_lh.mgh' has 0 vertices!
> Probably trying to use a scalar data file as a surface!
>
> No such file or directory
> ---
>
> I would appreciate any advice on this.
>
> Regards,
>
>
> Shuntaro
>
>

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


Re: [Freesurfer] Issue with BBR and Applying CVS Warps to Diffusion Data

2020-02-28 Thread Douglas N. Greve
So the B0-to-Anat registration is ok? What command are you using to map 
the B0s into the CVS space?


On 2/26/2020 3:50 PM, Austin Patrick wrote:


External Email - Use Caution

Dear All,

I have used CVS to align around 180 scans to a single, representative 
subject. I have then used BBR to align the mean b0 image to register 
the diffusion data to the native space T1 and then apply CVS warps; 
however, the resulting aligned images for calculated maps from the 
DWIs are very poor with a great deal of heterogeneity, especially at 
the boundary but also within white matter. The coefficient of 
variation of the mean b0 BB registered to the T1 is around 30% 
globally (excluding the edges of the brain) and 40% or greater for FA. 
I have reviewed the initial rigid registration of the b0s to the T1s 
for gross misalignment and found that FLIRT performed pretty well and 
didn’t fail for any of my subjects and didn’t require manual 
adjustment; however, the result of after applying the CVS warps is 
quite poor. The data T1s are 1mm (MPnRAGE) and the b0s are at 2mm. The 
DWIs were corrected for eddy currents, Gibbs’ ringing, rician noise, 
and B0 distortions and look pretty great. The DWIs are 70x180x180 at 
2mm isotropic and the T1s are 256x256x256 at 1mm isotropic. Are there 
any suggestions for this issue? I have tried re-aligning the DTI 
parameter maps to the b0s before applying the CVS warps (although they 
should be in the same space) and I have tried using both the –t2 and 
–dti, as well as with/out the –fsl-init flag. Is bbregister shifting 
the origin for the images at all? Any help would be appreciated.


Cheers,

-Austin

--

Austin M. Bazydlo, MS

PhD Candidate

Dept. of Medical Physics

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] make_average_subject

2020-02-28 Thread Douglas N. Greve

Look at the release notes for how to resolve this
http://surfer.nmr.mgh.harvard.edu/fswiki/ReleaseNotes


On 2/26/2020 4:34 AM, Benjamin Ineichen wrote:


External Email - Use Caution

Dear Freesurfer experts,

I want to create a new standard template from my study population. For 
this, I thought about using make_average_subject. Thus, I run:

make_average_subject --out avgsubject --subjects REMY001 REMY002 REMY003

I get an error message - ERROR: make_average_surface. Please find 
attached the error.log.


Would be very thankful for advice!

Many thanks!

/Ben

--

Benjamin Victor Ineichen, MD PhD
Karolinska Institutet
Center for Molecular Medicine
Stockholm, Sweden
ineic...@protonmail.ch 
+41 76 391 04 01

Dr. med. et Dr. rer. nat. ETH Benjamin Victor Ineichen
Karolinska Institutet
Center for Molecular Medicine
Stockholm, Sweden
ineic...@protonmail.ch 
+41 76 391 04 01

___
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] beta testing FreeSurfer v7 beta: recon-all-status.log, samseg

2020-02-28 Thread Douglas N. Greve

Yes, if you want to run it now, use
samseg --i orig.mgz --i T2.mgz --o samsegdir
And don't use the T1.mgz
I have fixed this bug in the version that we will release. I mostly 
wanted to make sure that samseg itself would run.



On 2/25/2020 3:08 PM, Antonin Skoch wrote:


External Email - Use Caution

Dear experts,

I began to test beta v7 version of FreeSurfer.

I noticed that some entries in recon-all-status.log seem missing (i.e. 
white and pial surface placement - there is entry Cortical Parc while 
following entry is Refine Pial Surfs).


Running
samseg` --t1w $s/mri/T1.mgz --t2w $s/mri/T2.mgz --s $s --refmode t1w
exits with error in samseg2recon since command

set segvol = `find "$samsegdir" -iname "*crispSegmentation.nii" -print`

results with empty string set to segvol variable.

Antonin

___
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] DOSS questions

2020-02-28 Thread Douglas N. Greve

answers below

On 2/25/2020 4:36 AM, Ferraro, Pilar wrote:


External Email - Use Caution

Thank you so much for all the help!

Below you can find few remaining questions I have following your 
suggestions!



Message: 6
Date: Mon, 24 Feb 2020 09:24:00 -0500
From: "Douglas N. Greve" >

Subject: Re: [Freesurfer] GLM DOSS questions
To: >
Message-ID: <62cf0ae8-3d78-aa44-7a44-17cd603a8...@mgh.harvard.edu 
>

Content-Type: text/plain; charset="utf-8"



On 2/21/2020 4:01 AM, Ferraro, Pilar wrote:


External Email - Use Caution

Dear Freesurfer experts,

I?ve just completed a GLM analysis in Freesurfer and I?d like to be
sure that all the steps I?ve performed are the right ones.

My analysis is looking at age related changes in cortical thickness in
one group of patients, after regressing out the effects of disease
duration. I obviously assume an inverse relationship between age and
cortical thickness so that older age would be associated with cortical
thickness reductions in specific brain regions.

To test this hypothesis with Freesurfer I?ve used a GLM DOSS design.
I?ve generated a fsgd file with the first column being the list of
patients, the second column the age of patients, and the third column
the disease duration.
Then I?ve run the mris_preproc command.

Afterward,? I?ve generated 2 contrast matrices (one for the left and
one for the right hemisphere) with the following structure: 0 -1 0.

1 question. Is the contrast matrices structure I?ve chosen the most
appropriate one for the hypothesis I?d like to test?

Yes, but if you are going to use -1, you need to keep track of that when
you specify the sign (but you are using abs so it does not matter).
Also, you don't need different fsgd and contrast files for each 
hemisphere.


>> Thank you!


Then, I?ve run the glm analysis using the mri_glmfit command.

To visualize the results I?ve used the freeview -f command and set the
overlay_threshold to 1,5 instead of 4, cause I was interested in
looking at all results significant at p < 0.05.

2 question. Is the overlay_threshold I?ve used the correct one?

for visualization, you can use whatever threshold you want. But if you
are going to use monte carlo simulations, then you need p<.001. If you
want to keep p<.05, then you have to do permutation.


>> I totally understand your point on the need for p<.001 threshold 
for Monte Carlo Simulation. However, in this first step of results 
visualization as an exploratory starting point I was just interested 
in uncorrected results generated with the mri_glmfit command with 
threshold p<0.05. So, was the command I’ve reported above the correct 
one in this case?
Sorry, lost track of the command, but yes, you can always threshold at 
any value you want for exploratory purposes




Lastly, I was interested in looking at my results after Montecarlo
correction, so I?ve run the simulation using the mri_glmfit-sim command.
However, here I?ve changed few options:

mri_glmfit-sim \
? --glmdir lh.dur.glmdir \
? --cache 4 neg \ (here I?ve changed to 1,5 since I was interested
again at a P value < 0,05 and not < 0.0001 and I?ve changed the neg
option with abs since I was interested in absolute values identified
through the previously run analysis)
? --cwp? 0.05\
? --2spaces

3 question. Are the edits I made to the command correct? It is not
perfectly clear to me which one should be the preferred sign for the
analysis (neg, pos or abs?).

abs is an unsigned test. If you have an aprior hypothesis, then you can
set the sign to that. Eg, if you are expecting the age slope to be
negative, then you could choose negative (or in your case positive since
you flipped the sign in the contrast)



>> Sounds good, thanks for the explanation!


In the end, in order to visualize the Montecarlo corrected results
I?ve used again the Freeview -f command and again I?ve sent the
overlay threshold to 1,5 since I was interested in all significant
clusters at P < 0,05.

4 question. Again, this threshold is the correct one for my purpose?

It will show all the clusters that are at p<.05 corrected.


>> Ok, so, if I’ve correctly understood, I need to change this step 
either: a) Running a permutation instead of Monte Carlo simulation if 
I want to keep the p value < 0.05, or b) keep the Monte Carlo 
Simulation but change the p value to < 0.001. Is that correct?

correct
Also, for the Permutation analysis should I follow your detailed steps 
explanation reported in here: MultipleComparisonsV6.0Perm 
 ?

Yes




I have one last question concerning the Montecarlo simulation. Are
there any cases in which you would suggest to do not use it since it
would not be an appropriate correction?

I'm recommending that everyone use permutation at this point. MC can
generate inlfated false po

Re: [Freesurfer] Registration error

2020-02-28 Thread Hoopes, Andrew
Hi Tim,

Did you use an auto-completion plugin to fill out the webform? If so, can you 
disable it and try again? We have a fairly ~old-fashioned~ spam detector that 
checks for completed entries in hidden fields.

best,
Andrew


From:  on behalf of "Harrigan, Timothy 
P." 
Reply-To: FS Help 
Date: Monday, February 24, 2020 at 11:16 AM
To: FS Help 
Subject: [Freesurfer] Registration error


External Email - Use Caution
Hi,
I’m trying to learn to use Freesurfer to see if I can use it for some academic 
work on TBI.  I downloaded it to a spare laptop at home, and filled out the 
registration form, and I got a message that stated “Registration Error:  
Spammer. Go Away.”

How could I address this?
Thanks
Tim

Timothy P. Harrigan ScD
Research and Exploratory Development Division
Johns Hopkins University Applied Physics Laboratory
Phone: 240-228-5943
Cell/Text: 240-280-9444

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

Re: [Freesurfer] MNI coordinates from Thalamic nuclei

2020-02-28 Thread Hoopes, Andrew
Hi Corinna,

You can compute label centroids from a segmentation using mri_segcentroids, and 
you can map them into any space with the --lta flag.

best
Andrew


From:  on behalf of Corinna Bauer 

Reply-To: FS Help 
Date: Friday, February 28, 2020 at 10:48 AM
To: FS Help 
Subject: Re: [Freesurfer] MNI coordinates from Thalamic nuclei


External Email - Use Caution
I have them already ask masks in subject space, but I am doing connectivity 
analysis on a few of them and would need the MNI coordinates of the centroids 
for  visualizing those results.

Thanks!



On Fri, Feb 28, 2020 at 10:29 AM Glasser, Matthew 
mailto:glass...@wustl.edu>> wrote:

External Email - Use Caution
Why not represent thalamic nuclei as the actual masks?  Thalamic nuclei are not 
single points.

Matt.

From: 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 on behalf of Corinna Bauer mailto:corinna...@gmail.com>>
Reply-To: Freesurfer support list 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Date: Friday, February 28, 2020 at 9:26 AM
To: Mailing Freesurfer List 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: [Freesurfer] MNI coordinates from Thalamic nuclei


External Email - Use Caution
Hi all,
Is there a way to obtain the MNI coordinates for the thalamic nuclei?

Thanks


Corinna


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] OHBM Brainhack 2020

2020-02-28 Thread Remi gau
External Email - Use Caution

Hello all, The OHBM Open Science Special Interest 
Group is very happy to announce that the 8th Annual 
OHBM Brainhack will be held  June 23-25 at Phi Centre in Montreal.


A hackathon? For who?

At the OHBM Brainhack, members of the community gather to work collaboratively 
on common projects. This year we would like to especially welcome new attendees 
who have never been to hackathon before. We will provide TrainTrack sessions 
tailored for beginners and opportunities to directly apply new skills by 
joining a hackathon project. All members of the community are invited to take 
part in the OHBM Brainhack 2020!


Applications are now open for the OHBM Hackathon Travel Awards.

The Open Science Special Interest Group is pleased to offer 20 travel awards 
that will include free registration at the hackathon plus $500 USD that will go 
towards covering part of the expenses incurred to attend the hackathon. Submit 
your application no later than March 15th: http://ossig.netlify.com/awards.


Registration for the OHBM Brainhack will open in the middle of March.

Soon after OHBM abstract acceptances are sent out, registration for the OHBM 
Brainhack will open. In the past two years the hackathon was fully booked, and 
we therefore recommend to register early. Seats will be allocated on a first 
come first serve basis. In an effort to increase diversity at the event, we 
will reserve part of the seats to attendees who attend a hackathon for the 
first time or who come from traditionally under-represented groups in science 
or in past hackathons.


Please contribute your favorite TrainTrack session!

Are there specific topics that you would like to see covered in the Hackathon 
training sessions? Please let us know using this 
form.


We are very excited to welcome you to the OHBM Hackathon!

For most recent updates please see the OS SIG 
website, follow us on twitter 
@OHBMopen and follow the hbm-hackathon channel on 
the brainhack 
mattermost.

Remi Gau, Elizabeth Levitis and Camille Maumet for the OHBM Open Science 
Special Interest Group
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] MNI coordinates from Thalamic nuclei

2020-02-28 Thread Corinna Bauer
External Email - Use Caution

I have them already ask masks in subject space, but I am doing connectivity
analysis on a few of them and would need the MNI coordinates of the
centroids for  visualizing those results.

Thanks!



On Fri, Feb 28, 2020 at 10:29 AM Glasser, Matthew 
wrote:

> External Email - Use Caution
>
> Why not represent thalamic nuclei as the actual masks?  Thalamic nuclei
> are not single points.
>
>
>
> Matt.
>
>
>
> *From: * on behalf of Corinna
> Bauer 
> *Reply-To: *Freesurfer support list 
> *Date: *Friday, February 28, 2020 at 9:26 AM
> *To: *Mailing Freesurfer List 
> *Subject: *[Freesurfer] MNI coordinates from Thalamic nuclei
>
>
>
> *External Email - Use Caution*
>
> Hi all,
>
> Is there a way to obtain the MNI coordinates for the thalamic nuclei?
>
>
>
> Thanks
>
>
>
>
>
> Corinna
>
>
> --
>
> The materials in this message are private and may contain Protected
> Healthcare Information or other information of a sensitive nature. If you
> are not the intended recipient, be advised that any unauthorized use,
> disclosure, copying or the taking of any action in reliance on the contents
> of this information is strictly prohibited. If you have received this email
> in error, please immediately notify the sender via telephone or return mail.
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] MNI coordinates from Thalamic nuclei

2020-02-28 Thread Glasser, Matthew
External Email - Use Caution

Why not represent thalamic nuclei as the actual masks?  Thalamic nuclei are not 
single points.

Matt.

From:  on behalf of Corinna Bauer 

Reply-To: Freesurfer support list 
Date: Friday, February 28, 2020 at 9:26 AM
To: Mailing Freesurfer List 
Subject: [Freesurfer] MNI coordinates from Thalamic nuclei


External Email - Use Caution
Hi all,
Is there a way to obtain the MNI coordinates for the thalamic nuclei?

Thanks


Corinna


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] MNI coordinates from Thalamic nuclei

2020-02-28 Thread Corinna Bauer
External Email - Use Caution

Hi all,
Is there a way to obtain the MNI coordinates for the thalamic nuclei?

Thanks


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

Re: [Freesurfer] Creating the pial surface of the cerebellum: how to let the mris_make_surfaces to push the pial surface to the boundary

2020-02-28 Thread CiRong Liu
External Email - Use Caution

Hi, Douglas,


Thank you for your reply.


I tried adding -max XXX.

If I set the "-max 5" as the default values, the mris_mask_surfaces would
finish running.


However, if I set the "-max" more than 5, the mris_mask_surfaces would
crash during the running - *Segmentation fault (core dumped).*

*This is my computer config:*

*1) Freesurfer Version - *
freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c

2) Platform: Linux Mint 19.2

3) uname -a: Linux  4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


*Here is the error msg (at the end)for example:*

$mris_make_surfaces -max 10 -max_csf 0.1 -min_gray_at_csf_border 1
-orig_wm  orig  -noaseg  -noaparc  -T1 ceb_sm  marmosetceb_v2 rh

using max_thickness = 10.0

reading original vertex positions from orig

not using aseg volume to prevent surfaces crossing the midline

not using aparc to prevent surfaces crossing the midline

using ceb_sm as T1 volume...

$Id: mris_make_surfaces.c,v 1.164.2.4 2016/12/13 22:26:32 zkaufman Exp $

$Id: mrisurf.c,v 1.781.2.6 2016/12/27 16:47:14 zkaufman Exp $

reading volume
/home/cirong/bin/freesurfer/subjects/marmosetceb_v2/mri/filled.mgz...

reading volume
/home/cirong/bin/freesurfer/subjects/marmosetceb_v2/mri/ceb_sm.mgz...

resampling filled volume to be in voxel register with T1

reading volume
/home/cirong/bin/freesurfer/subjects/marmosetceb_v2/mri/wm.mgz...

changing type of input wm volume to UCHAR...

resampling wm volume to be in voxel register with T1

0 bright wm thresholded.

0 bright non-wm voxels segmented.

reading original surface position from
/home/cirong/bin/freesurfer/subjects/marmosetceb_v2/surf/rh.orig...

computing class statistics...

border white:170215 voxels (0.34%)

border gray  211849 voxels (0.42%)

WM (79.0): 80.8 +- 7.5 [70.0 --> 106.0]

GM (71.0) : 71.9 +- 8.9 [30.0 --> 105.0]

using class modes intead of means, discounting robust sigmas

intensity peaks found at WM=70+-10.4,GM=69+-10.4

setting MIN_GRAY_AT_WHITE_BORDER to 60.1 (was 70)

setting MAX_BORDER_WHITE to 77.5 (was 105)

setting MIN_BORDER_WHITE to 69.0 (was 85)

setting MAX_CSF to 8.0 (was 40)

setting MAX_GRAY to 62.5 (was 95)

setting MAX_GRAY_AT_CSF_BORDER to 60.1 (was 75)

setting MIN_GRAY_AT_CSF_BORDER to 8.0 (was 40)

mean inside = 74.8, mean outside = 73.4

smoothing surface for 5 iterations...

repositioning cortical surface to gray/white boundary

smoothing T1 volume with sigma = 2.000

vertex spacing 0.87 +- 0.21 (0.01-->1.75) (max @ vno 190205 --> 190741)

face area 0.31 +- 0.12 (0.00-->0.93)

mean border=73.1, 45600 (45600) missing vertices, mean dist 2.1 [3.9
(%15.7)->2.6 (%84.3))]

%31 local maxima, %44 large gradients and % 2 min vals, 0 gradients ignored

mean absolute distance = 2.85 +- 2.92

7642 vertices more than 2 sigmas from mean.

averaging target values for 5 iterations...

tol=1.0e-04, sigma=2.0, host=unkno, nav=4, nbrs=2, l_repulse=5.000,
l_tspring=1.000, l_nspring=0.500, l_intensity=0.200, l_curv=1.000

mom=0.00, dt=0.50

complete_dist_mat 0

rms 0

smooth_averages 0

remove_neg 0

ico_order 0

which_surface 0

target_radius 0.00

nfields 0

scale 0.00

desired_rms_height 0.00

momentum 0.00

nbhd_size 0

max_nbrs 0

niterations 25

nsurfaces 0

SURFACES 3

flags 0 (0)

use curv 0

no sulc 0

no rigid align 0

mris->nsize 2

mris->hemisphere 1

randomSeed 0



000: dt: 0., sse=2428827.0, rms=6.800

001: dt: 0.5000, sse=2228267.0, rms=6.217 (8.575%)

002: dt: 0.5000, sse=2028263.5, rms=5.645 (9.199%)

003: dt: 0.5000, sse=1886400.0, rms=5.096 (9.731%)

004: dt: 0.5000, sse=1814327.0, rms=4.583 (10.072%)

005: dt: 0.5000, sse=1721364.9, rms=4.121 (10.063%)

006: dt: 0.5000, sse=1625707.9, rms=3.724 (9.648%)

007: dt: 0.5000, sse=1655070.8, rms=3.394 (8.851%)

008: dt: 0.5000, sse=1652526.4, rms=3.136 (7.621%)

009: dt: 0.5000, sse=1610117.9, rms=2.940 (6.224%)

010: dt: 0.5000, sse=1561510.9, rms=2.795 (4.945%)

011: dt: 0.5000, sse=1554297.9, rms=2.681 (4.083%)

012: dt: 0.5000, sse=1584733.6, rms=2.592 (3.329%)

013: dt: 0.5000, sse=1583861.1, rms=2.517 (2.880%)

014: dt: 0.5000, sse=1546283.4, rms=2.452 (2.578%)

015: dt: 0.5000, sse=1573124.0, rms=2.396 (2.291%)

016: dt: 0.5000, sse=1560157.1, rms=2.343 (2.203%)

rms = 2.30, time step reduction 1 of 3 to 0.250...

017: dt: 0.5000, sse=1584955.1, rms=2.296 (2.021%)

rms = 2.27, time step reduction 2 of 3 to 0.125...

018: dt: 0.2500, sse=1413241.2, rms=2.266 (1.279%)

rms = 2.25, time step reduction 3 of 3 to 0.062...

019: dt: 0.1250, sse=1348002.0, rms=2.251 (0.692%)

positioning took 2.0 minutes

smoothing T1 volume with sigma = 1.000

vertex spacing 0.81 +- 0.26 (0.02-->3.05) (max @ vno 1015 --> 1374)

face area 0.31 +- 0.17 (0.00-->2.54)

mean border=73.2, 37029 (33580) missing vertices, mean dist -0.4 [1.3
(%54.3)->0.9 (%45.7))]

%45 local maxima, %34 large gradients and % 3 min vals, 0 gradients ignored

mean absolute d

[Freesurfer] group analysis for same group in 2 conditions

2020-02-28 Thread Marco Ninghetto
External Email - Use Caution

Dear experts,
I'm performing a study on visual pathways, in which each participant
undergoes to 2 different conditions. One in normal sight (NG, i.e.: No
Goggles) and second in narrowed sight using special goggles (YG, i.e.: Yes
Goggles). I'd like to compare the results between these two conditions
(basically, subject A, B, C in cond1 versus subject A, B, C in cond2).

I created the FSGD file (attached as "RetinotopyStudy" file) and the
contrast matrices, organised as:

1 -1 , named "YG-NG.mtx"
> -1 1,  named "NG-YG.mtx"


In this FSGD sample file, I reported only subjects from 7 to 12.
My folders are organised as follows:

main >> recon_output  >> sub-yy (X folders for X subjects)
> >> Contrasts (with contrast files)
> >> FSGD (with FSGD files)
> >> fsaverage (subjects template
> created during recon-all -qcache)
> >> pRF_function >> analNG (inside, there are the functionals for
> each subject in NG condition)
> >> analYG  (inside, there are the
> functionals for each subject in YG condition)



Once I used the pipeline for the retinotopy analysis
and I have
results for each participant, and now I'd like to make 2nd lev analysis. So
the idea would be, as you probably already got it, condition Yes Goggles
versus condition No Goggles. I use the command:

mris_preproc --fsgd RetinotopyStudy --target fsaverage --hemi ?h --out
> outputname.mgh


But I'm not sure it would calculate in the right way.
The question is: how would I organise the FSGD file or folders in such a
way that FREESURFER would know that it has to compare results from the same
subjects but from two different folders (analNG vs analYG)?

Hoping that's clear, I really look forward to hear from you soon.
Thank you for your time,
Marco

-- 
---
Marco Ninghetto, PhD candidate
Laboratory of Neuroplasticity
Nencki Institute of Experimental Biology
Polish Academy of Sciences
3 Pasteur Street, 02-093 Warsaw, Poland
GroupDescriptorFile 1   
Title RetinotopyStudy   
Class YG
Class NG
Input   sub-07  YG
Input   sub-08  YG
Input   sub-09  YG
Input   sub-10  YG
Input   sub-11  YG
Input   sub-12  YG
Input   sub-07  NG
Input   sub-08  NG
Input   sub-09  NG
Input   sub-10  NG
Input   sub-11  NG
Input   sub-12  NG
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer