Im trying to run the SSwarp in my T1 data but I don’t understand what ishappening with the SkullStrip step. It is giving me a very ugly results
I will be gratefull if you help me with this, Im sorry if is a dump question, Im kind of new with this program
Here is also my output of the sswarper
- Based on input, the output directory will be:
/Users/lbohorquez/Desktop/example/307_122117/anat
++ 3dUnifize: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
- Pre-processing: ADV…UWGm
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/anatU.ssWarp.nii
++ ===== CPU time = 137.7 sec Elapsed = 19.8
++ Notice SUMA_BrainWrap_ParseInput (SUMA_3dSkullStrip.c:1219 @08:58:33):
Setting fill_hole to 10
++ Notice 3dSkullStrip (SUMA_3dSkullStrip.c:1529 @08:58:33):
Loading dset, performing Spatial Normalization
3dSkullStrip:
Original resolution -0.937500, -0.937500, 1.000000
SpatNorm resolution 0.937500, 0.937500, 1.000000
++mri_brainormalize: normalizing
++mri_brainormalize: Rescaling.
++mri_brainormalize: Eroding, clustering … - Eroded 642134 voxels
- Restored 587395 eroded voxels
- Clustering voxels …
- Largest cluster has 4457392 voxels
- Clustering voxels …
- Largest cluster has 1687639 voxels
++mri_brainormalize: Clipping extreme values. - scaling by fac=0.035397
3dSkullStrip: -spatnorm: Expecting 6195700 voxels in in_vol dset (167 212 175)
3dSkullStrip: Edge threshold set to 41.218464. (minimum acceptable was 24.292912)
(92.000000 percentile =41.218464, 99.999001 percentile = 242.929123)
3dSkullStrip: Prepping volume…
SUMA_LoadPrepInVol: Volume 4500527.000000, radius 102.421638
++ Notice SUMA_LoadPrepInVol (SUMA_BrainWrap.c:183 @08:58:37):
Radius estimated at 102.421638 is large.
Setting back to 100.0
3dSkullStrip: Beginning brain extraction…
3dSkullStrip: Have surface, OK for 1st entry.
3dSkullStrip: Stretching to avoid ventricles.
SO->Center is [-0.203728 11.719861 1.268312]
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: pastarea = 66015.661895
SUMA_StretchToFitLeCerveau:
Stage1: MaxExp = 0.567497, darea = 0.000000, going for more…
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: satiated, small area differential.
SUMA_StretchToFitLeCerveau:
reducing tightness, applying touchup with Stage2Type = 1
SUMA_StretchToFitLeCerveau:
Stage 2, type 1: 5887 troubled nodes, going for more…
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: satiated, small area differential.
SUMA_StretchToFitLeCerveau:
reducing tightness, applying touchup with Stage2Type = 1
SUMA_StretchToFitLeCerveau:
Stage 2, type 1: 0.443859 change in troubled nodes.
SUMA_StretchToFitLeCerveau:
Continuing with Stage.
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: satiated, small area differential.
SUMA_StretchToFitLeCerveau:
reducing tightness, applying touchup with Stage2Type = 1
SUMA_StretchToFitLeCerveau:
Stage 2, type 1: 0.082773 change in troubled nodes.
SUMA_StretchToFitLeCerveau:
Continuing with Stage.
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: satiated, small area differential.
SUMA_StretchToFitLeCerveau:
reducing tightness, applying touchup with Stage2Type = 1
SUMA_StretchToFitLeCerveau:
Stage 2, type 1: 0.010989 change in troubled nodes.
SUMA_StretchToFitLeCerveau:
Continuing with Stage.
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: satiated, small area differential.
SUMA_StretchToFitLeCerveau:
reducing tightness, applying touchup with Stage2Type = 1
SUMA_StretchToFitLeCerveau:
Stage 2, type 1: 0.040741 change in troubled nodes.
SUMA_StretchToFitLeCerveau:
Continuing with Stage.
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: satiated, small area differential.
SUMA_StretchToFitLeCerveau:
reducing tightness, applying touchup with Stage2Type = 1
SUMA_StretchToFitLeCerveau:
Stage 2, type 1: 0.021762 change in troubled nodes.
SUMA_StretchToFitLeCerveau:
Continuing with Stage.
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: satiated, small area differential.
SUMA_StretchToFitLeCerveau:
reducing tightness, applying touchup with Stage2Type = 1
SUMA_StretchToFitLeCerveau:
Stage 2, type 1: -0.009329 change in troubled nodes.
SUMA_StretchToFitLeCerveau:
Stage converged. Moving to new Stage or Type.
SUMA_StretchToFitLeCerveau:
In stage 1
SUMA_StretchToFitLeCerveau:
Stage1: satiated, small area differential.
SUMA_StretchToFitLeCerveau:
Stage 3, type 2: 1.000000 change in troubled nodes.
SUMA_StretchToFitLeCerveau:
Continuing with Stage.
3dSkullStrip: Checking for self intersection…
3dSkullStrip: No intersections found.
3dSkullStrip: Final smoothing of 72
3dSkullStrip: Touchup correction, pass 1 …
3dSkullStrip: The beauty treatment smoothing.
3dSkullStrip: Locating voxels inside surface …
3dSkullStrip: Setting output to orig_vol (iset = 0x7fee81804c00) (osnd = 0x7fee4100f200)…
3dSkullStrip: Coercing…
3dSkullStrip: Writing masked volume …
3dSkullStrip: Applying a bit of erosion and dilatation
++ OpenMP thread count = 15
++ 3dQwarp: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
++ Starting 3dAllineate (affine register) command:
3dAllineate -base /Users/lbohorquez/abin/MNI152_2009_template_SSW.nii.gz[1] -source /Users/lbohorquez/Desktop/example/307_122117/anat/anatU.ssWarp.nii -prefix AFN_6dV8ibQNvXSA7A38zvsJiQ.nii -1Dmatrix_save AFN_6dV8ibQNvXSA7A38zvsJiQ -cmass -final wsinc5 -float -master BASE -twobest 7 -zclip -fineblur 4.44
++ ###########################################################
++ 3dAllineate: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Zhark the Registrator
++ Source dataset: /Users/lbohorquez/Desktop/example/307_122117/anat/anatU.ssWarp.nii
++ Base dataset: /Users/lbohorquez/abin/MNI152_2009_template_SSW.nii.gz
++ Loading datasets
++ 6608697 voxels in source_automask+0
++ Zero-pad: ybot=0 ytop=1
++ Computing -autobox
++ 8007930 voxels [93.5%] in weight mask
++ Number of points for matching = 3763727
++ OpenMP thread count = 15
++ ======= Allineation of 1 sub-bricks using Hellinger metric =======
++ *** Coarse pass begins ***
++ *** Fine pass begins ***
- Final fine fit Parameters:
x-shift= -9.8505 y-shift=-30.2513 z-shift= 7.7683
z-angle= 29.9972 x-angle= -0.9430 y-angle= 0.2854
x-scale= 1.0294 y-scale= 1.1859 z-scale= 0.9280
y/x-shear= -0.0524 z/x-shear= -0.0080 z/y-shear= -0.0153
++ Output dataset ./AFN_6dV8ibQNvXSA7A38zvsJiQ.nii
++ Wrote -1Dmatrix_save AFN_6dV8ibQNvXSA7A38zvsJiQ.aff12.1D
++ 3dAllineate: total CPU time = 774.0 sec Elapsed = 282.5
++ ###########################################################
++ # Please check results visually for alignment quality #
++ ###########################################################
++ 3dQwarp: replacing source dataset with 3dAllineate result /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5_Allin.nii
- 3dAllineate output files have been renamed
mat44 3dAllineate matrix:
0.891573 0.514593 -0.005128 -9.850480
-0.639590 0.999954 -0.019249 -30.251301
-0.001752 -0.004263 0.928154 7.768310
++ Dataset zero-pad: xbot=34 xtop=33 ybot=28 ytop=37 zbot=34 ztop=28 voxels
++ +++++++++++ Begin warp optimization: base=/Users/lbohorquez/abin/MNI152_2009_template_SSW.nii.gz source=/Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5_Allin.nii
++ AFNI warpomatic: 260 x 294 x 255 volume ; autobbox = 40…219 41…253 40…214 [clock= 4m 44s 595ms]
lev=0 18…241 15…279 19…235: [first cost=-0.00967] … done [cost:-0.00967==>-0.13139]
lev=1 patch=195x221x191 [clock= 6m 3s 372ms]… done [cost:-0.13139==>-0.20469 ; 5 patches optimized, 3 skipped]
lev=2 patch=147x165x143 [clock= 7m 6s 560ms]… done [cost:-0.20469==>-0.24007 ; 5 patches optimized, 7 skipped]
lev=3 patch=111x125x107 [clock= 7m 43s 286ms]… done [cost:-0.24007==>1.73064 ; 19 patches optimized, 8 skipped]
lev=4 patch=83x93x81 [clock= 10m 3s 137ms]… done [cost:1.73064==>0.67559 ; 54 patches optimized, 26 skipped]
lev=5 patch=61x71x61 [clock= 12m 54s 371ms]… done [cost:0.67559==>0.17896 ; 135 patches optimized, 81 skipped]
++ ========== total number of parameters ‘optimized’ = 5337
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5_AWARP.nii
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5.nii
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5_WARP.nii
++ Inverting warp *********…:…
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5_WARPINV.nii
++ ===== CPU time = 5034.5 sec clock time = 16m 45s 17ms
++ no -frac option: defaulting to -union
++ processing 1 input datasets…
++ padding all datasets by 1 (for dilations)
++ frac 0 over 1 volumes gives min count 0
++ voxel limits: 0 clipped, 2000189 survived, 6529832 were zero
++ writing result junk.SSwarper.qYoxXgLeCSu_MASK.nii…
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_MASK.nii
++ 3dcalc: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5mm.nii
++ 3dNwarpApply: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Zhark the Warped
++ -master dataset is ‘/Users/lbohorquez/Desktop/example/307_122117/anat/anatS.ssWarp.nii’
** AFNI converts NIFTI_datatype=2 (UINT8) in file /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5mm.nii to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
++ opened source dataset ‘/Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5mm.nii’
++ Processing -nwarp
++ Warping:.Z
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5ww.nii
++ total CPU time = 86.7 sec Elapsed = 8.8
++ no -frac option: defaulting to -union
++ processing 1 input datasets…
++ padding all datasets by 2 (for dilations)
++ frac 0 over 1 volumes gives min count 0
++ voxel limits: 0 clipped, 2117569 survived, 6412452 were zero
++ writing result junk.SSwarper.qYoxXgLeCSu_MASK.nii…
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_MASK.nii
++ 3dNwarpApply: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Zhark the Warped
++ -master dataset is ‘/Users/lbohorquez/Desktop/example/307_122117/anat/anatS.ssWarp.nii’
++ opened source dataset ‘/Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_MASK.nii’
++ Processing -nwarp
++ Warping:.Z
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_MASKO.nii
++ total CPU time = 68.5 sec Elapsed = 7.0
++ 3dcalc: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/anatSS.ssWarp.nii
++ 3dAllineate: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Zhark the Registrator
** AFNI converts NIFTI_datatype=2 (UINT8) in file /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_TAL5mm.nii to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
++ Source dataset: /Users/lbohorquez/Desktop/example/307_122117/anat/anatSS.ssWarp.nii
++ Base dataset: (not given)
++ Loading datasets
++ OpenMP thread count = 15
++ ========== Applying transformation to 1 sub-bricks ==========
++ wsinc5 interpolation setup:
- taper function = Min sidelobe 3 term
- taper cut point = 0.000
- window radius = 5 voxels
- window shape = Cubical
- The above can be altered via the AFNI_WSINC5_* environment variables.
- (To avoid this message, ‘setenv AFNI_WSINC5_SILENT YES’.)
- wsinc5 CUBE(5) mask has 1000 points
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_AffSS.nii
++ 3dAllineate: total CPU time = 17.5 sec Elapsed = 2.4
++ ###########################################################
++ OpenMP thread count = 15
++ 3dQwarp: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
++ Dataset zero-pad: xbot=34 xtop=33 ybot=28 ytop=37 zbot=34 ztop=28 voxels
++ Weightizing the base image
++ +++++++++++ Begin warp optimization: base=/Users/lbohorquez/abin/MNI152_2009_template_SSW.nii.gz source=/Users/lbohorquez/Desktop/example/307_122117/anat/junk.SSwarper.qYoxXgLeCSu_AffSS.nii
++ AFNI warpomatic: 260 x 294 x 255 volume ; autobbox = 53…207 48…238 35…198 [clock= 5s 670ms]
lev=1 patch=195x221x191 [clock= 7s 801ms][first cost=-1.48624] . done [cost:-1.48624==>-1.56122 ; 1 patches optimized, 8 skipped]
lev=2 patch=147x165x143 [clock= 20s 855ms][first cost=-1.23232] . done [cost:-1.56122==>-1.27021 ; 1 patches optimized, 8 skipped]
lev=3 patch=111x125x107 [clock= 30s 474ms][first cost=0.85435] … done [cost:-1.27021==>-0.35103 ; 16 patches optimized, 11 skipped]
lev=4 patch=83x93x81 [clock= 2m 12s 653ms][first cost=-0.08011] … done [cost:-0.35103==>-0.42353 ; 32 patches optimized, 32 skipped]
lev=5 patch=61x71x61 [clock= 3m 45s 63ms][first cost=-0.24244] …:[cost=-0.43276]:… done [cost:-0.42353==>-0.49690 ; 153 patches optimized, 97 skipped]
lev=6 patch=47x53x45 [clock= 7m 7s 520ms][first cost=-0.38270] …:[cost=-0.45075]:… done [cost:-0.49690==>-0.47322 ; 408 patches optimized, 278 skipped]
lev=7 patch=35x39x35 [clock= 10m 58s 828ms][first cost=-0.39106] …:[cost=-0.43503]:… done [cost:-0.47322==>-0.43361 ; 991 patches optimized, 809 skipped]
lev=8 patch=27x29x25 [clock= 15m 7s 250ms][first cost=-0.38754] …:[cost=-0.41560]:… done [cost:-0.43361==>-0.40339 ; 2437 patches optimized, 2267 skipped]
lev=9 patch=19x23x19 [clock= 20m 40s 942ms][first cost=-0.38713] … done [cost:-0.40339==>-0.40732 ; 2779 patches optimized, 2423 skipped]
lev=10 patch=15x17x15 [clock= 24m 47s 347ms][first cost=-0.37899] … done [cost:-0.40732==>-0.35802 ; 6104 patches optimized, 6040 skipped]
lev=11 patch=11x11x11 [clock= 32m 8s 674ms][first cost=-0.37682] … done [cost:-0.35802==>-0.39537 ; 18406 patches optimized, 20468 skipped]
++ ========== total number of parameters ‘optimized’ = 751872
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/anatQQ.ssWarp.nii
++ Output dataset /Users/lbohorquez/Desktop/example/307_122117/anat/anatQQ.ssWarp_WARP.nii
++ ===== CPU time = 12916.6 sec clock time = 51m 42s 978ms
Illegal variable name.
– trying to start Xvfb :302
[1] 21375
++ 3dAutobox: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Auto bbox: x=8…184 y=8…221 z=-13…176
++ 3dAutobox: output dataset = ./zzerm.X302-330924.acrop.nii
++ 3dAllineate: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Zhark the Registrator
++ Source dataset: /Users/lbohorquez/abin/MNI152_2009_template_SSW.nii.gz
++ Base dataset: (not given)
++ Loading datasets
++ OpenMP thread count = 15
++ ========== Applying transformation to 1 sub-bricks ==========
++ Output dataset ./zzerm.X302-330924.epiR.nii
++ 3dAllineate: total CPU time = 0.5 sec Elapsed = 0.4
++ ###########################################################
++ 3dMedianFilter: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Output dataset ./zzerm.X302-330924.epiRS.nii
++ 3dedge3: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ 3dAutomask: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Emperor Zhark
++ 3dcalc: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./zzerm.X302-330924.epiEM.nii
Precompiled binary macosx_10.7_local: Aug 28 2018 (Version AFNI_18.2.15)
Thanks go to J Rajendra for great efforts
Initializing: X11[The X.Org Foundation v 11804000]… Widgets… Input files:
session # 1 = fromCLI ==> 2 datasets
dataset count = 2
Time series = 1 files read
Plugins = 0 libraries read
++ Writing one 1284x380 image to filter ‘/usr/local/bin/cjpeg -quality 95 > zzerm.X302-330924.sag.jpg’
++ Writing one 1062x380 image to filter ‘/usr/local/bin/cjpeg -quality 95 > zzerm.X302-330924.cor.jpg’
++ Writing one 1062x428 image to filter ‘/usr/local/bin/cjpeg -quality 95 > zzerm.X302-330924.axi.jpg’
AFNI QUITTs!
@snapshot_volreg output image = /Users/lbohorquez/Desktop/example/307_122117/anat/AMssWarp.jpg
Illegal variable name.
– trying to start Xvfb :257
[1] 21466
++ 3dAutobox: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Auto bbox: x=8…185 y=8…222 z=-10…177
++ 3dAutobox: output dataset = ./zzerm.X257-917921.acrop.nii
++ 3dAllineate: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Zhark the Registrator
++ Source dataset: /Users/lbohorquez/Desktop/example/307_122117/anat/anatQQ.ssWarp.nii
++ Base dataset: (not given)
++ Loading datasets
++ OpenMP thread count = 15
++ ========== Applying transformation to 1 sub-bricks ==========
++ Output dataset ./zzerm.X257-917921.epiR.nii
++ 3dAllineate: total CPU time = 0.4 sec Elapsed = 0.4
++ ###########################################################
++ 3dMedianFilter: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Output dataset ./zzerm.X257-917921.epiRS.nii
++ 3dedge3: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ 3dAutomask: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: Emperor Zhark
++ 3dcalc: AFNI version=AFNI_18.2.15 (Aug 28 2018) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./zzerm.X257-917921.epiEM.nii
Precompiled binary macosx_10.7_local: Aug 28 2018 (Version AFNI_18.2.15)
Thanks go to SM Laconte for inspiration
Initializing: X11[The X.Org Foundation v 11804000]… Widgets… Input files:
session # 1 = fromCLI ==> 2 datasets
dataset count = 2
Time series = 1 files read
Plugins = 0 libraries read
++ Writing one 1290x376 image to filter ‘/usr/local/bin/cjpeg -quality 95 > zzerm.X257-917921.sag.jpg’
++ Writing one 1068x376 image to filter ‘/usr/local/bin/cjpeg -quality 95 > zzerm.X257-917921.cor.jpg’
++ Writing one 1068x430 image to filter ‘/usr/local/bin/cjpeg -quality 95 > zzerm.X257-917921.axi.jpg’
AFNI QUITTs!
@snapshot_volreg output image = /Users/lbohorquez/Desktop/example/307_122117/anat/MAssWarp.jpg
##Here is my script
#!/bin/bash
subject=“$1”
export SUBJECTS_DIR=/Users/lbohorquez/Desktop/“$subject”/
#Run SSwarp
cd /Users/lbohorquez/Desktop/example/307_122117/anat
@SSwarper -input /Users/lbohorquez/Desktop/example/307_122117/anat/307_Ax_FSPGR_3D_GR.nii.gz -base MNI152_2009_template_SSW.nii.gz -subid ssWarp