Logfile for bbregister
Thu Nov 21 15:12:49 EST 2019

setenv SUBJECTS_DIR /data/freesurfer/new_MPRAGE
cd /data/freesurfer/new_MPRAGE/fMRI
/data/freesurfer/bin/bbregister --mov pa0292_S004_bis_matrix_new_1_preprocessed_output_crop.nii.gz --s subj01 --reg register.dat --t1

$Id: bbregister,v 1.75 2016/05/10 20:02:28 greve Exp $
Linux an 4.15.0-66-generic #75~16.04.1-Ubuntu SMP Tue Oct 1 14:01:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
FREESURFER_HOME /data/freesurfer
mri_convert pa0292_S004_bis_matrix_new_1_preprocessed_output_crop.nii.gz ./tmp.bbregister.5872/template.nii
mri_convert.bin pa0292_S004_bis_matrix_new_1_preprocessed_output_crop.nii.gz ./tmp.bbregister.5872/template.nii 
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from pa0292_S004_bis_matrix_new_1_preprocessed_output_crop.nii.gz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, -0.983571, -0.180519)
k_ras = (0, -0.180519, 0.983571)
writing to ./tmp.bbregister.5872/template.nii...
mri_coreg --s subj01 --mov ./tmp.bbregister.5872/template.nii --regdat ./tmp.bbregister.5872/reg.init.dat --reg ./tmp.bbregister.5872/mri_coreg.lta --nthreads 1 --dof 6 --sep 4 --ftol .0001 --linmintol .01

$Id: mri_coreg.c,v 1.27 2016/04/30 15:11:49 greve Exp $
cwd /data/freesurfer/new_MPRAGE/fMRI
cmdline mri_coreg --s subj01 --mov ./tmp.bbregister.5872/template.nii --regdat ./tmp.bbregister.5872/reg.init.dat --reg ./tmp.bbregister.5872/mri_coreg.lta --nthreads 1 --dof 6 --sep 4 --ftol .0001 --linmintol .01 
sysname  Linux
hostname an
machine  x86_64
user     an
dof    6
nsep    1
cras0    1
ftol    0.000100
linmintol    0.010000
bf       1
bflim    30.000000
bfnsamp    30
SmoothRef 0
SatPct    99.990000
MovOOB 0
optschema 1
Reading in mov ./tmp.bbregister.5872/template.nii
Reading in ref /data/freesurfer/new_MPRAGE/subj01/mri/brainmask.mgz
Reading in and applying refmask /data/freesurfer/new_MPRAGE/subj01/mri/aparc+aseg.mgz
Setting cras translation parameters to align centers
Creating random numbers for coordinate dithering
Performing intensity dithering
Initial parameters -5.5000  7.9323 -75.3923  0.0000  0.0000  0.0000  1.0000  1.0000  1.0000  0.0000  0.0000  0.0000 
Separation list (1):  4   min = 4
DoSmoothing 1
DoCoordDither 1
DoIntensityDither 1
nitersmax 4
ftol 1.000e-04
linmintol 1.000e-02
SatPct 99.990000
Hist FWHM 7.000000 7.000000
nthreads 1
movsat = 785.4111
mov gstd 1.6917 1.6917 1.6917
Smoothing mov
refsat = 119.0000
ref gstd 1.8914 1.8914 1.8914
Smoothing ref
COREGpreproc() done
Testing if mov and target overlap
Init cost   -1.0016336950
nhits = 109816 out of 16777216, Percent Overlap:  41.9
Initial  RefRAS-to-MovRAS
 1.00000   0.00000   0.00000  -5.50000;
 0.00000   1.00000   0.00000   7.93227;
 0.00000   0.00000   1.00000  -75.39230;
 0.00000   0.00000   0.00000   1.00000;
Initial  RefVox-to-MovVox
 0.50000   0.00000   0.00000  -9.25000;
 0.00000   0.09026  -0.49179   105.69458;
 0.00000  -0.49179  -0.09026   111.21078;
 0.00000   0.00000   0.00000   1.00000;
sep = 4 -----------------------------------
COREGoptBruteForce() 30 1 30
Turning on MovOOB for BruteForce Search
#BF# sep= 4 iter=0 lim=30.0 delta=2.00 -35.50000  37.93227 -87.39230   2.00000  -8.00000 -20.00000   -1.0176424
Turning  MovOOB back off after brute force search


---------------------------------
Init Powel Params dof = 6
Starting OpenPowel2(), sep = 4
InitialCost        -1.0016460419 
#@#  4  188  -35.50000 37.93227 -87.39230 2.00000 -8.00000 -20.00000   -1.0016460
fs_powell::minimize
  nparams 6
  maxfev 4
  ftol   0.000100
  linmin_xtol_   0.010000
  powell nthiter 0: fret = -1.001646
#@#  4  190  -34.50000 37.93227 -87.39230 2.00000 -8.00000 -20.00000   -1.0017091
#@#  4  191  -32.88197 37.93227 -87.39230 2.00000 -8.00000 -20.00000   -1.0017759
#@#  4  192  -31.21396 37.93227 -87.39230 2.00000 -8.00000 -20.00000   -1.0018216
#@#  4  193  -28.78393 37.93227 -87.39230 2.00000 -8.00000 -20.00000   -1.0018293
#@#  4  194  -29.73425 37.93227 -87.39230 2.00000 -8.00000 -20.00000   -1.0018336
#@#  4  205  -29.73425 36.31424 -87.39230 2.00000 -8.00000 -20.00000   -1.0018873
#@#  4  206  -29.73425 33.69621 -87.39230 2.00000 -8.00000 -20.00000   -1.0019592
#@#  4  207  -29.73425 24.92757 -87.39230 2.00000 -8.00000 -20.00000   -1.0019922
#@#  4  210  -29.73425 31.67587 -87.39230 2.00000 -8.00000 -20.00000   -1.0020072
#@#  4  212  -29.73425 31.95787 -87.39230 2.00000 -8.00000 -20.00000   -1.0020169
#@#  4  214  -29.73425 32.22190 -87.39230 2.00000 -8.00000 -20.00000   -1.0020263
#@#  4  226  -29.73425 32.22190 -87.41714 2.00000 -8.00000 -20.00000   -1.0020278
#@#  4  238  -29.73425 32.22190 -87.41714 1.78395 -8.00000 -20.00000   -1.0020294
#@#  4  240  -29.73425 32.22190 -87.41714 1.75864 -8.00000 -20.00000   -1.0020295
#@#  4  244  -29.73425 32.22190 -87.41714 1.76864 -8.00000 -20.00000   -1.0020316
#@#  4  246  -29.73425 32.22190 -87.41714 1.76864 -7.00000 -20.00000   -1.0020400
#@#  4  247  -29.73425 32.22190 -87.41714 1.76864 -5.38197 -20.00000   -1.0020432
#@#  4  250  -29.73425 32.22190 -87.41714 1.76864 -6.53736 -20.00000   -1.0020461
#@#  4  254  -29.73425 32.22190 -87.41714 1.76864 -6.57207 -20.00000   -1.0020508
#@#  4  269  -23.96851 26.51153 -87.44199 1.53729 -5.14414 -20.00000   -1.0021099
#@#  4  272  -14.63934 17.27196 -87.48219 1.16294 -2.83371 -20.00000   -1.0021986
#@#  4  276  -1.32613 4.08662 -87.53955 0.62874 0.46340 -20.00000   -1.0022950
#@#  4  281  -1.77220 4.52841 -87.53763 0.64664 0.35293 -20.00000   -1.0023177
#@#  4  282  -1.82986 4.58551 -87.53738 0.64895 0.33865 -20.00000   -1.0023190
#@#  4  284  -1.89689 4.65190 -87.53709 0.65164 0.32205 -20.00000   -1.0023195
  powell nthiter 1: fret = -1.002319
#@#  4  286  -0.89689 4.65190 -87.53709 0.65164 0.32205 -20.00000   -1.0023205
#@#  4  291  -0.66561 4.65190 -87.53709 0.65164 0.32205 -20.00000   -1.0023222
#@#  4  292  -0.64054 4.65190 -87.53709 0.65164 0.32205 -20.00000   -1.0023242
#@#  4  294  -0.58755 4.65190 -87.53709 0.65164 0.32205 -20.00000   -1.0023249
#@#  4  295  -0.60622 4.65190 -87.53709 0.65164 0.32205 -20.00000   -1.0023253
#@#  4  296  -0.61622 4.65190 -87.53709 0.65164 0.32205 -20.00000   -1.0023263
#@#  4  303  -0.61622 4.65190 -87.53709 0.65164 0.32205 -19.61803   -1.0023273
#@#  4  310  -0.61622 4.65190 -87.53709 0.65164 0.32205 -19.60488   -1.0023274
#@#  4  314  -0.61622 4.65190 -89.15512 0.65164 0.32205 -19.60488   -1.0024000
#@#  4  315  -0.61622 4.65190 -91.77316 0.65164 0.32205 -19.60488   -1.0025277
#@#  4  316  -0.61622 4.65190 -96.00922 0.65164 0.32205 -19.60488   -1.0025502
#@#  4  317  -0.61622 4.65190 -94.31071 0.65164 0.32205 -19.60488   -1.0025666
#@#  4  319  -0.61622 4.65190 -93.34145 0.65164 0.32205 -19.60488   -1.0025984
#@#  4  323  -0.61622 4.65190 -93.42725 0.65164 0.32205 -19.60488   -1.0026040
#@#  4  330  -0.61622 4.65190 -93.42725 -0.96639 0.32205 -19.60488   -1.0026494
#@#  4  335  -0.61622 4.65190 -93.42725 -0.34836 0.32205 -19.60488   -1.0026574
#@#  4  337  -0.61622 4.65190 -93.42725 -0.59625 0.32205 -19.60488   -1.0026705
#@#  4  338  -0.61622 4.65190 -93.42725 -0.62104 0.32205 -19.60488   -1.0026729
#@#  4  340  -0.61622 4.65190 -93.42725 -0.66229 0.32205 -19.60488   -1.0026749
#@#  4  349  -0.61622 4.65190 -93.42725 -0.66229 0.13864 -19.60488   -1.0026829
#@#  4  351  -0.61622 4.65190 -93.42725 -0.66229 0.16934 -19.60488   -1.0026832
#@#  4  352  -0.61622 4.65190 -93.42725 -0.66229 0.15934 -19.60488   -1.0026853
  powell nthiter 2: fret = -1.002685
#@#  4  371  -1.23425 4.65190 -93.42725 -0.66229 0.15934 -19.60488   -1.0026871
#@#  4  373  -1.15391 4.65190 -93.42725 -0.66229 0.15934 -19.60488   -1.0026881
#@#  4  378  -1.16391 4.65190 -93.42725 -0.66229 0.15934 -19.60488   -1.0026901
#@#  4  395  -1.16391 4.65190 -94.04528 -0.66229 0.15934 -19.60488   -1.0026928
#@#  4  398  -1.16391 4.65190 -94.08119 -0.66229 0.15934 -19.60488   -1.0026950
#@#  4  401  -1.16391 4.65190 -94.09931 -0.66229 0.15934 -19.60488   -1.0026953
#@#  4  402  -1.16391 4.65190 -94.10931 -0.66229 0.15934 -19.60488   -1.0026963
#@#  4  413  -1.16391 4.65190 -94.10931 -0.60766 0.15934 -19.60488   -1.0026982
#@#  4  415  -1.16391 4.65190 -94.10931 -0.62429 0.15934 -19.60488   -1.0026988
Powell done niters total = 2
OptTimeSec 13.1 sec
OptTimeMin  0.22 min
nEvals 438
Final parameters  -1.16390514   4.65190411 -94.10931396  -0.62429339   0.15933746 -19.60487747 
Final cost   -1.002698780091612
 

---------------------------------
mri_coreg utimesec    56.867486
mri_coreg stimesec    0.167951
mri_coreg ru_maxrss   463020
mri_coreg ru_ixrss    0
mri_coreg ru_idrss    0
mri_coreg ru_isrss    0
mri_coreg ru_minflt   135895
mri_coreg ru_majflt   0
mri_coreg ru_nswap    0
mri_coreg ru_inblock  0
mri_coreg ru_oublock  16
mri_coreg ru_msgsnd   0
mri_coreg ru_msgrcv   0
mri_coreg ru_nsignals 0
mri_coreg ru_nvcsw    36
mri_coreg ru_nivcsw   395
Final  RefRAS-to-MovRAS
 0.94203  -0.33553   0.00278  -1.16391;
 0.33554   0.94196  -0.01090   4.65190;
 0.00104   0.01120   0.99994  -94.10931;
 0.00000   0.00000   0.00000   1.00000;
Final  RefVox-to-MovVox
 0.47101   0.00139   0.16777  -26.55700;
 0.16511   0.08490  -0.46425   84.18485;
 0.02978  -0.49274  -0.07951   97.17450;
 0.00000   0.00000   0.00000   1.00000;
Final parameters -1.1639  4.6519 -94.1093 -0.6243  0.1593 -19.6049 
nhits = 108006 out of 16777216, Percent Overlap:  41.2
mri_coreg RunTimeSec 57.1 sec
To check run:
   tkregisterfv --mov ./tmp.bbregister.5872/template.nii --targ /data/freesurfer/new_MPRAGE/subj01/mri/brainmask.mgz --reg ./tmp.bbregister.5872/mri_coreg.lta --s subj01 --surfs 

mri_coreg done

mri_segreg --mov ./tmp.bbregister.5872/template.nii --init-reg ./tmp.bbregister.5872/reg.init.dat --out-reg ./tmp.bbregister.5872/bbr.pass1.dat --subsamp-brute 100 --subsamp 100 --tol 1e-4 --tol1d 1e-3 --brute -4 4 4 --surf white --gm-proj-frac 0.5 --wm-gt-gm 0.5
$Id: mri_segreg.c,v 1.113 2016/05/10 03:23:20 greve Exp $
setenv SUBJECTS_DIR /data/freesurfer/new_MPRAGE
cd /data/freesurfer/new_MPRAGE/fMRI
mri_segreg --mov ./tmp.bbregister.5872/template.nii --init-reg ./tmp.bbregister.5872/reg.init.dat --out-reg ./tmp.bbregister.5872/bbr.pass1.dat --subsamp-brute 100 --subsamp 100 --tol 1e-4 --tol1d 1e-3 --brute -4 4 4 --surf white --gm-proj-frac 0.5 --wm-gt-gm 0.5 
sysname  Linux
hostname an
machine  x86_64
user     an
movvol ./tmp.bbregister.5872/template.nii
regfile ./tmp.bbregister.5872/reg.init.dat
subject subj01
dof 6
outregfile ./tmp.bbregister.5872/bbr.pass1.dat
UseMask 0
UseLH 1
UseRH 1
nsubsamp 100
PenaltySign  1
PenaltySlope 0.500000
PenaltyCenter 0.000000
surfname white
GMProjFrac 0.500000
WMProjAbs 2.000000
lhcostfile (null)
rhcostfile (null)
interp  trilinear (1)
frame  0
TolPowell 0.000100
nMaxItersPowell 36
n1dmin  3
Profile   0
Gdiag_no  -1
AddNoise  0 (0)
SynthSeed 1574883162
TransRandMax 0.000000
RotRandMax 0.000000
Translations 0.000000 0.000000 0.000000
Rotations   0.000000 0.000000 0.000000
Input reg
 0.94203  -0.33553   0.00278  -0.76910;
-0.05955  -0.15903   0.98548  -19.52498;
 0.33021   0.92851   0.16979  -3.52132;
 0.00000   0.00000   0.00000   1.00000;

Loading mov
Extracting frame 0
Projecting LH Surfs
Loading lh.white surf
Loading lh.thickness for GM
GM Proj: 1 0.500000 2.000000
WM Proj: 0 0.500000 2.000000
Projecting RH Surfs
Loading rh.white surf
Loading rh.thickness for GM
Projecting RH Surfs
Using lh.cortex.label
Using rh.cortex.label
Computing relative cost
 0  -25.0 -25.0 -25.0   0.963127
 1  -25.0 -25.0  25.0   1.008963
 2  -25.0  25.0 -25.0   0.961991
 3  -25.0  25.0  25.0   0.953881
 4   25.0 -25.0 -25.0   0.944672
 5   25.0 -25.0  25.0   1.000353
 6   25.0  25.0 -25.0   0.986916
 7   25.0  25.0  25.0   0.994338
REL:  8  1.008523    7.814241  0.976780 rel = 1.0325 
Initial costs ----------------
Number of surface hits 2191
WM  Intensity     1.7577 +/-  66.1025
Ctx Intensity     1.5275 +/-  69.5355
Pct Contrast     74.0066 +/- 3976.4440
Cost   1.0085
RelCost   1.0325


WARNING: initial G-W contrast is positive, but expecting negative.
If the mov data has a T2 contrast, re-run with --T2



------------------------------------
Brute force preopt -4 4 4, n = 729
     0  -4.0000  -4.0000  -4.0000  -4.0000  -4.0000  -4.0000      0.9662   0.9662  0.0
     2  -4.0000  -4.0000  -4.0000  -4.0000  -4.0000   4.0000      0.9642   0.9642  0.0
    24  -4.0000  -4.0000  -4.0000   4.0000   4.0000  -4.0000      0.9580   0.9580  0.0
    26  -4.0000  -4.0000  -4.0000   4.0000   4.0000   4.0000      0.9406   0.9406  0.0
    53  -4.0000  -4.0000   0.0000   4.0000   4.0000   4.0000      0.9182   0.9182  0.0
Brute Force --------------------------
Min cost was 0.918200
Number of iterations   729
Search time 0.797000 sec
Parameters at best (transmm, rotdeg)
 -4.000  -4.000   0.000  4.000  4.000  4.000 
--------------------------------------------

Starting Powell Minimization
Init Powel Params dof = 6
0 -4
1 -4
2 0
3 4
4 4
5 4
fs_powell::minimize
  nparams 6
  maxfev 36
  ftol   0.000100
  linmin_xtol_   0.001000
  powell nthiter 0: fret = 0.918200
  23 -4.000 -4.136  0.000  4.000  4.000  4.000   0.9086565550
  25 -4.000 -4.174  0.000  4.000  4.000  4.000   0.9017809508
  43 -4.000 -4.174 -0.016  4.000  4.000  4.000   0.8998735666
  45 -4.000 -4.174 -0.017  4.000  4.000  4.000   0.8998562219
  46 -4.000 -4.174 -0.018  4.000  4.000  4.000   0.8998483820
  47 -4.000 -4.174 -0.019  4.000  4.000  4.000   0.8982062172
  49 -4.000 -4.174 -0.020  4.000  4.000  4.000   0.8976082902
  60 -4.000 -4.174 -0.020  4.015  4.000  4.000   0.8946780831
  61 -4.000 -4.174 -0.020  4.019  4.000  4.000   0.8934758960
  78 -4.000 -4.174 -0.020  4.019  4.002  4.000   0.8934489671
  79 -4.000 -4.174 -0.020  4.019  4.003  4.000   0.8925697608
  94 -4.000 -4.174 -0.020  4.019  4.003  4.001   0.8924824886
  powell nthiter 1: fret = 0.892482
 107 -3.998 -4.174 -0.020  4.019  4.003  4.001   0.8920948463
 108 -3.997 -4.174 -0.020  4.019  4.003  4.001   0.8914839940
  powell nthiter 2: fret = 0.891484
Powell done niters = 2
Computing relative cost
 0  -25.0 -25.0 -25.0   0.983715
 1  -25.0 -25.0  25.0   0.974800
 2  -25.0  25.0 -25.0   0.979868
 3  -25.0  25.0  25.0   0.981657
 4   25.0 -25.0 -25.0   0.961551
 5   25.0 -25.0  25.0   0.971912
 6   25.0  25.0 -25.0   0.989047
 7   25.0  25.0  25.0   1.015183
REL:  8  0.891484    7.857733  0.982217 rel = 0.907625 
Number of iterations     2
Min cost was 0.891484
Number of FunctionCalls   269
TolPowell 0.000100
nMaxItersPowell 36
OptimizationTime 0.312000 sec
Parameters at optimum (transmm) -3.99651 -4.17383 -0.01956
Parameters at optimum (rotdeg)  4.01907  4.00253  4.00100 
Final costs ----------------
Number of surface hits 2170
WM  Intensity     0.5405 +/-  71.3605
Ctx Intensity    -0.3895 +/-  68.1213
Pct Contrast   -609.5490 +/- 11148.1948
Cost   0.8915
RelCost   1.0325
Reg at min cost was 
 0.96584  -0.25457  -0.04839  -3.75998;
-0.01520  -0.24207   0.97014  -23.43443;
 0.25868   0.93627   0.23767  -4.83511;
 0.00000   0.00000   0.00000   1.00000;

Writing optimal reg to ./tmp.bbregister.5872/bbr.pass1.dat, type = 14 
Original Reg 
 0.94203  -0.33553   0.00278  -0.76910;
-0.05955  -0.15903   0.98548  -19.52498;
 0.33021   0.92851   0.16979  -3.52132;
 0.00000   0.00000   0.00000   1.00000;

Original Reg - Optimal Reg
-0.02382  -0.08096   0.05117   2.99088;
-0.04436   0.08304   0.01534   3.90945;
 0.07153  -0.00776  -0.06788   1.31379;
 0.00000   0.00000   0.00000   0.00000;

Computing change in lh position
LH rmsDiffMean 9.634814
Computing change in rh position
Surface-RMS-Diff-mm 8.668209 1.983774 12.927540


WARNING: initial G-W contrast was positive, but expected negative.
If the mov data has a T2 contrast, re-run with --T2


mri_segreg done
mri_segreg --mov ./tmp.bbregister.5872/template.nii --init-reg ./tmp.bbregister.5872/bbr.pass1.dat --out-reg register.dat --interp trilinear --wm-proj-abs 2 --tol 1e-8 --tol1d 1e-3 --c0 0 --mincost register.dat.mincost --dof 6 --nmax 36 --param register.dat.param --surf white --brute -0.1 0.1 0.1 --cur-reg ./tmp.bbregister.5872/reg.curopt.dat --gm-proj-frac 0.5 --nsub 1 --wm-gt-gm 0.5
$Id: mri_segreg.c,v 1.113 2016/05/10 03:23:20 greve Exp $
setenv SUBJECTS_DIR /data/freesurfer/new_MPRAGE
cd /data/freesurfer/new_MPRAGE/fMRI
mri_segreg --mov ./tmp.bbregister.5872/template.nii --init-reg ./tmp.bbregister.5872/bbr.pass1.dat --out-reg register.dat --interp trilinear --wm-proj-abs 2 --tol 1e-8 --tol1d 1e-3 --c0 0 --mincost register.dat.mincost --dof 6 --nmax 36 --param register.dat.param --surf white --brute -0.1 0.1 0.1 --cur-reg ./tmp.bbregister.5872/reg.curopt.dat --gm-proj-frac 0.5 --nsub 1 --wm-gt-gm 0.5 
sysname  Linux
hostname an
machine  x86_64
user     an
movvol ./tmp.bbregister.5872/template.nii
regfile ./tmp.bbregister.5872/bbr.pass1.dat
subject subj01
dof 6
outregfile register.dat
UseMask 0
UseLH 1
UseRH 1
nsubsamp 1
PenaltySign  1
PenaltySlope 0.500000
PenaltyCenter 0.000000
surfname white
GMProjFrac 0.500000
WMProjAbs 2.000000
lhcostfile (null)
rhcostfile (null)
interp  trilinear (1)
frame  0
TolPowell 0.000000
nMaxItersPowell 36
n1dmin  3
Profile   0
Gdiag_no  -1
AddNoise  0 (0)
SynthSeed 1575049146
TransRandMax 0.000000
RotRandMax 0.000000
Translations 0.000000 0.000000 0.000000
Rotations   0.000000 0.000000 0.000000
Input reg
 0.96584  -0.25457  -0.04839  -3.75998;
-0.01520  -0.24207   0.97014  -23.43443;
 0.25868   0.93627   0.23767  -4.83511;
 0.00000   0.00000   0.00000   1.00000;

Loading mov
Extracting frame 0
Projecting LH Surfs
Loading lh.white surf
Loading lh.thickness for GM
GM Proj: 1 0.500000 2.000000
WM Proj: 0 0.500000 2.000000
Projecting RH Surfs
Loading rh.white surf
Loading rh.thickness for GM
Projecting RH Surfs
Using lh.cortex.label
Using rh.cortex.label
Computing relative cost
 0  -25.0 -25.0 -25.0   0.974206
 1  -25.0 -25.0  25.0   0.991062
 2  -25.0  25.0 -25.0   0.989707
 3  -25.0  25.0  25.0   0.986763
 4   25.0 -25.0 -25.0   0.981931
 5   25.0 -25.0  25.0   0.975738
 6   25.0  25.0 -25.0   0.991439
 7   25.0  25.0  25.0   0.995398
REL:  8  0.988078    7.886244  0.985781 rel = 1.00233 
Initial costs ----------------
Number of surface hits 220921
WM  Intensity     0.9388 +/-  70.9162
Ctx Intensity     1.1746 +/-  70.5053
Pct Contrast    136.6612 +/- 102160.5385
Cost   0.9881
RelCost   1.0023


WARNING: initial G-W contrast is positive, but expecting negative.
If the mov data has a T2 contrast, re-run with --T2



------------------------------------
Brute force preopt -0.1 0.1 0.1, n = 729
     0  -0.1000  -0.1000  -0.1000  -0.1000  -0.1000  -0.1000      0.9382   0.9382  0.0
     1  -0.1000  -0.1000  -0.1000  -0.1000  -0.1000   0.0000      0.9330   0.9330  0.0
     5  -0.1000  -0.1000  -0.1000  -0.1000   0.0000   0.1000      0.9292   0.9292  0.0
     7  -0.1000  -0.1000  -0.1000  -0.1000   0.1000   0.0000      0.9226   0.9226  0.0
    19  -0.1000  -0.1000  -0.1000   0.1000  -0.1000   0.0000      0.9220   0.9220  0.0
    20  -0.1000  -0.1000  -0.1000   0.1000  -0.1000   0.1000      0.9164   0.9164  0.0
    23  -0.1000  -0.1000  -0.1000   0.1000   0.0000   0.1000      0.9162   0.9162  0.0
    37  -0.1000  -0.1000   0.0000   0.0000  -0.1000   0.0000      0.9140   0.9140  0.0
   113  -0.1000   0.0000   0.0000  -0.1000   0.0000   0.1000      0.9105   0.9105  0.0
   266   0.0000  -0.1000  -0.1000   0.1000   0.0000   0.1000      0.9070   0.9070  0.0
   346   0.0000   0.0000  -0.1000   0.1000   0.0000   0.0000      0.9029   0.9029  0.0
   356   0.0000   0.0000   0.0000  -0.1000   0.0000   0.1000      0.9013   0.9013  0.0
   364   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000      0.8915   0.8915  0.0
Brute Force --------------------------
Min cost was 0.891484
Number of iterations   729
Search time 0.924000 sec
Parameters at best (transmm, rotdeg)
  0.000   0.000   0.000  0.000  0.000  0.000 
--------------------------------------------

Starting Powell Minimization
Init Powel Params dof = 6
0 0
1 0
2 0
3 0
4 0
5 0
fs_powell::minimize
  nparams 6
  maxfev 36
  ftol   0.000000
  linmin_xtol_   0.001000
  powell nthiter 0: fret = 0.988078
  10  0.002  0.000  0.000  0.000  0.000  0.000   0.9880736799
  16  0.002 -1.618  0.000  0.000  0.000  0.000   0.9852442208
  17  0.002 -1.278  0.000  0.000  0.000  0.000   0.9827634469
  24  0.002 -1.275  0.000  0.000  0.000  0.000   0.9827303156
  25  0.002 -1.268  0.000  0.000  0.000  0.000   0.9825352395
  29  0.002 -1.270  0.000  0.000  0.000  0.000   0.9825342218
  30  0.002 -1.271  0.000  0.000  0.000  0.000   0.9825064784
  34  0.002 -1.271 -1.618  0.000  0.000  0.000   0.9770265001
  38  0.002 -1.271 -2.618  0.000  0.000  0.000   0.9736306302
  39  0.002 -1.271 -3.236  0.000  0.000  0.000   0.9730059008
  41  0.002 -1.271 -2.958  0.000  0.000  0.000   0.9718082691
  42  0.002 -1.271 -2.972  0.000  0.000  0.000   0.9713556978
  43  0.002 -1.271 -3.081  0.000  0.000  0.000   0.9712694558
  45  0.002 -1.271 -3.028  0.000  0.000  0.000   0.9705964932
  49  0.002 -1.271 -3.024  0.000  0.000  0.000   0.9704503197
  50  0.002 -1.271 -3.025  0.000  0.000  0.000   0.9704272547
  51  0.002 -1.271 -3.026  0.000  0.000  0.000   0.9704098364
  68  0.002 -1.271 -3.026  0.002  0.000  0.000   0.9703511308
  80  0.002 -1.271 -3.026  0.002 -0.013  0.000   0.9701141590
  82  0.002 -1.271 -3.026  0.002 -0.009  0.000   0.9699027647
  powell nthiter 1: fret = 0.969903
Powell done niters = 1
Computing relative cost
 0  -25.0 -25.0 -25.0   0.979165
 1  -25.0 -25.0  25.0   1.002296
 2  -25.0  25.0 -25.0   0.988417
 3  -25.0  25.0  25.0   0.986801
 4   25.0 -25.0 -25.0   0.986063
 5   25.0 -25.0  25.0   0.992788
 6   25.0  25.0 -25.0   0.988774
 7   25.0  25.0  25.0   0.995498
REL:  8  0.969903    7.919803  0.989975 rel = 0.979724 
Number of iterations     1
Min cost was 0.969903
Number of FunctionCalls   193
TolPowell 0.000000
nMaxItersPowell 36
OptimizationTime 12.420000 sec
Parameters at optimum (transmm)  0.00177 -1.27118 -3.02595
Parameters at optimum (rotdeg)  0.00152 -0.00884  0.00000 
Final costs ----------------
Number of surface hits 219282
WM  Intensity     1.1713 +/-  72.3166
Ctx Intensity     1.2420 +/-  71.4819
Pct Contrast   -662.4825 +/- 249711.1626
Cost   0.9699
RelCost   1.0023
Reg at min cost was 
 0.96580  -0.25471  -0.04843  -3.75747;
-0.01520  -0.24209   0.97013  -24.70548;
 0.25883   0.93622   0.23769  -7.86226;
 0.00000   0.00000   0.00000   1.00000;

Writing optimal reg to register.dat, type = 14 
Original Reg 
 0.96584  -0.25457  -0.04839  -3.75998;
-0.01520  -0.24207   0.97014  -23.43443;
 0.25868   0.93627   0.23767  -4.83511;
 0.00000   0.00000   0.00000   1.00000;

Original Reg - Optimal Reg
 0.00004   0.00014   0.00004  -0.00251;
 0.00001   0.00002   0.00001   1.27106;
-0.00015   0.00005  -0.00002   3.02715;
 0.00000   0.00000   0.00000   0.00000;

Computing change in lh position
LH rmsDiffMean 3.285258
Computing change in rh position
Surface-RMS-Diff-mm 3.281485 0.004695 3.291151


WARNING: initial G-W contrast was positive, but expected negative.
If the mov data has a T2 contrast, re-run with --T2


mri_segreg done
MinCost: 0.969903 1.171304 1.242019 -662.482460 
Cleaning up
 
Started at Thu Nov 21 15:12:49 EST 2019 
Ended   at Thu Nov 21 15:14:14 EST 2019
BBR-Run-Time-Sec 85
 
bbregister Done
To check results, run:
tkregisterfv --mov pa0292_S004_bis_matrix_new_1_preprocessed_output_crop.nii.gz --reg register.dat --surfs 
