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 

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 

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-24 Thread Douglas N. Greve

Try setting -max XXX
where XXX is the maximum allowable thickness. It is default to 5, so try 
something large


On 2/21/2020 11:36 AM, CiRong Liu wrote:


External Email - Use Caution

Dear experts of the freesurfer,

I was trying to create the white matter and pial surfaces of 
the cerebellum of the marmoset, based on ultra-high (80um) resolution 
ex-vivo images.


I manually segment the cerebellum into the white matter and the gray 
matter and change the header information to 1mm.


Based on the manual segmented files, I created white matter surfaces 
(rh.orig).


I tried to use the mris_make_surfaces to expand the white matter to 
create the matched pial surface.


However, the /mris_make_surfaces/ failed to push the surface enough. 
See the attached files and screenshots.


I tried smoothing the segmentation, enhancing the contrasts, and 
tested different expert option (for example: -max_csf 0.1 
-min_gray_at_csf_border 1)


This was this best I got, but still cannot get an optimal result (not 
pushed enough):


/mris_mask_surfaces -max_csf 0.1 -min_gray_at_csf_border 1 -orig_wm 
orig -orig_pial orig -noaseg -noaparc -T1 ceb_sm marmosetceb rh /


Since I have already manually segmented the cerebellum, *is there a 
way to force the /mris_make_surfaces/ to expand to the boundary of the 
image?*


The files can be download to replicate what I did:
https://pitt.box.com/s/6269a9mnwbs6zi0azn08dn55u47yfa7i

Thank you very much!

Best Regards, CiRong Liu

___
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] Creating the pial surface of the cerebellum: how to let the mris_make_surfaces to push the pial surface to the boundary

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

Dear experts of the freesurfer,

I was trying to create the white matter and pial surfaces of the cerebellum
of the marmoset, based on ultra-high (80um) resolution ex-vivo images.

I manually segment the cerebellum into the white matter and the gray matter
and change the header information to 1mm.

Based on the manual segmented files, I created white matter surfaces
(rh.orig).

I tried to use the mris_make_surfaces to expand the white matter to create
the matched pial surface.

However, the *mris_make_surfaces* failed to push the surface enough. See
the attached files and screenshots.

I tried smoothing the segmentation, enhancing the contrasts, and tested
different expert option (for example: -max_csf 0.1 -min_gray_at_csf_border
1)

This was this best I got, but still cannot get an optimal result (not
pushed enough):

*mris_mask_surfaces -max_csf 0.1 -min_gray_at_csf_border 1 -orig_wm orig
-orig_pial orig -noaseg -noaparc -T1 ceb_sm marmosetceb rh *

Since I have already manually segmented the cerebellum, *is there a way to
force the mris_make_surfaces to expand to the boundary of the image?*

The files can be download to replicate what I did:
https://pitt.box.com/s/6269a9mnwbs6zi0azn08dn55u47yfa7i

Thank you very much!

Best Regards, CiRong Liu
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer