tic; tutWebsite; toc, diary off Tutorial for FAIR: All in One (C) 2008/08/13, Jan Modersitzki, see FAIR and FAIRcopyright.m. - set-up data [ShekharEtAl2005] - generate multi-level representation (see getMultilevel.m) - set-up viewer (viewImage2D), interpolator (splineInter2D, regularized), distance (NGF), transformation (affine2D, not regularized) regularizer (curvature, matrix free) - run Multi-Level Iage Registration getMultilevel(fig=2,2 image(s), 2D data,level=3:7) getMultilevel: [7,6,5,4,3] done % ==== [ MultiLevel Image Registration, minLevel=4:maxLevel=7 ] ============== [viewImage] viewImage: 'viewImage2D' colormap: 'bone(256)' [inter] inter: 'splineInter2D' regularizer: 'moments' theta: 0.0050 [trafo] trafo: 'affine2D' [PIRregularizer] OPTN is empty [regularizer] regularizer: 'mfelastic' alpha: 0.1000 mu: 1 lambda: 0 grid: 'staggered' % ================================================================================ % ---------- [ MLIR: level 4 from 4 to 7, [ 16 16] ] ------------------------- compute 2D spline coefficients, m=[ 16 16], regularizer=[moments], theta=[0.005] compute 2D spline coefficients, m=[ 16 16], regularizer=[moments], theta=[0.005] Parametric Image Registration: J(w)=D(T(y(w)),R) + alpha*w'*M*w != min m : [ 16 16] omega : [ 50 50] INTERPOLATION : splineInter2D DISTANCE : NGF TRAFO : affine2D length(wc) : 6 alpha : 0 beta : 0 % ---------- [ GaussNewtonArmijo(JM 2008/08/05) ] ---------------------------- [ maxIter=50 / tolJ=0.001 / tolY=0.01 / tolG=0.01 / length(Yc)=6 ] iter J Jold-J |\nabla J| |dY| LS ---------------------------------------------------------------- -1 2.4998e+003 0.000e+000 0.000e+000 0.000e+000 0 0 2.4998e+003 0.000e+000 2.619e-001 0.000e+000 0 1 2.4998e+003 1.174e-002 2.282e-001 1.098e+000 1 2 2.4998e+003 4.233e-003 7.601e-002 1.379e+000 1 3 2.4998e+003 1.713e-003 8.378e-002 1.653e+000 1 4 2.4998e+003 3.209e-004 4.518e-002 5.339e-001 2 5 2.4998e+003 1.107e-004 2.353e-002 3.568e-001 2 6 2.4998e+003 3.990e-005 2.083e-002 1.231e-001 2 7 2.4998e+003 1.652e-005 1.109e-002 1.343e-001 2 8 2.4998e+003 8.637e-006 1.125e-002 8.633e-002 2 9 2.4998e+003 4.444e-006 6.105e-003 7.133e-002 2 10 2.4998e+003 2.542e-006 6.484e-003 5.220e-002 2 11 2.4998e+003 1.392e-006 3.593e-003 4.090e-002 2 12 2.4998e+003 8.146e-007 3.766e-003 3.120e-002 2 STOPPING: 1[ (Jold-Jc) = 4.60586307e-007 <= tolJ*(1+|Jstop|) = 2.50084680e+000] 1[ |Yc-Yold| = 2.40109495e-002 <= tolY*(1+norm(Yc)) = 3.99235244e-002] 1[ |dJ| = 2.16504444e-003 <= tolG*(1+abs(Jstop) = 2.50084680e+001] 0[ norm(dJ) = 2.16504444e-003 <= eps = 2.22044605e-013] 0[ iter = 13 >= maxIter = 50 ] % ---------- [ GaussNewtonArmijo : done ! ] ---------------------------------- wOpt = 0.9342 0.1427 -2.3563 -0.0497 1.0066 1.2219 Non-Parametric Image Registration J(y) = D(T(y),R) + alpha*S(y-yreg) != min INTERPOLATION : splineInter2D DISTANCE : NGF REGULARIZER : mfelastic alpha,mu,lambda : 0.1 1 0 GRID : staggered MATRIX FREE : 1 m : [ 16 16] omega : [ 50 50] % ---------- [ GaussNewtonArmijo(JM 2008/08/05) ] ---------------------------- [ maxIter=10 / tolJ=0.001 / tolY=0.01 / tolG=0.01 / length(Yc)=544 ] iter J Jold-J |\nabla J| |dY| LS ---------------------------------------------------------------- -1 2.5037e+003 3.845e+000 0.000e+000 0.000e+000 0 0 2.4998e+003 3.845e+000 7.996e-003 4.030e+001 0 STOPPING: 1[ (Jold-Jc) = 1.11332429e-004 <= tolJ*(1+|Jstop|) = 2.50467374e+000] 1[ |Yc-Yold| = 1.73789996e-001 <= tolY*(1+norm(Yc)) = 6.77616468e+000] 1[ |dJ| = 2.96820457e-003 <= tolG*(1+abs(Jstop) = 2.50467374e+001] 0[ norm(dJ) = 2.96820457e-003 <= eps = 2.22044605e-013] 0[ iter = 1 >= maxIter = 10 ] % ---------- [ GaussNewtonArmijo : done ! ] ---------------------------------- % ---------- [ MLIR: level 5 from 4 to 7, [ 32 32] ] ------------------------- compute 2D spline coefficients, m=[ 32 32], regularizer=[moments], theta=[0.005] compute 2D spline coefficients, m=[ 32 32], regularizer=[moments], theta=[0.005] % ---------- [ GaussNewtonArmijo(JM 2008/08/05) ] ---------------------------- [ maxIter=10 / tolJ=0.001 / tolY=0.01 / tolG=0.01 / length(Yc)=2112 ] iter J Jold-J |\nabla J| |dY| LS ---------------------------------------------------------------- -1 2.5029e+003 3.769e+000 0.000e+000 0.000e+000 0 0 2.4991e+003 3.769e+000 1.519e-001 7.878e+001 0 1 2.4990e+003 9.506e-002 6.388e-002 1.823e+001 1 STOPPING: 1[ (Jold-Jc) = 4.21248847e-002 <= tolJ*(1+|Jstop|) = 2.50388467e+000] 1[ |Yc-Yold| = 1.28219331e+001 <= tolY*(1+norm(Yc)) = 1.35094676e+001] 1[ |dJ| = 4.12822013e-002 <= tolG*(1+abs(Jstop) = 2.50388467e+001] 0[ norm(dJ) = 4.12822013e-002 <= eps = 2.22044605e-013] 0[ iter = 2 >= maxIter = 10 ] % ---------- [ GaussNewtonArmijo : done ! ] ---------------------------------- % ---------- [ MLIR: level 6 from 4 to 7, [ 64 64] ] ------------------------- compute 2D spline coefficients, m=[ 64 64], regularizer=[moments], theta=[0.005] compute 2D spline coefficients, m=[ 64 64], regularizer=[moments], theta=[0.005] % ---------- [ GaussNewtonArmijo(JM 2008/08/05) ] ---------------------------- [ maxIter=10 / tolJ=0.001 / tolY=0.01 / tolG=0.01 / length(Yc)=8320 ] iter J Jold-J |\nabla J| |dY| LS ---------------------------------------------------------------- -1 2.5006e+003 4.044e+000 0.000e+000 0.000e+000 0 MG: 7>6>5>4>3>2>1>coarse([ 1 1])<2<3<4<5<6<7>. 0 2.4965e+003 4.044e+000 3.504e-001 1.619e+002 0 STOPPING: 1[ (Jold-Jc) = 4.06089184e-001 <= tolJ*(1+|Jstop|) = 2.50157651e+000] 1[ |Yc-Yold| = 1.07586200e+001 <= tolY*(1+norm(Yc)) = 2.67688314e+001] 1[ |dJ| = 2.02720769e-001 <= tolG*(1+abs(Jstop) = 2.50157651e+001] 0[ norm(dJ) = 2.02720769e-001 <= eps = 2.22044605e-013] 0[ iter = 1 >= maxIter = 10 ] % ---------- [ GaussNewtonArmijo : done ! ] ---------------------------------- % ---------- [ MLIR: level 7 from 4 to 7, [ 128 128] ] ----------------------- compute 2D spline coefficients, m=[ 128 128], regularizer=[moments], theta=[0.005] compute 2D spline coefficients, m=[ 128 128], regularizer=[moments], theta=[0.005] % ---------- [ GaussNewtonArmijo(JM 2008/08/05) ] ---------------------------- [ maxIter=10 / tolJ=0.001 / tolY=0.01 / tolG=0.01 / length(Yc)=33024 ] iter J Jold-J |\nabla J| |dY| LS ---------------------------------------------------------------- -1 2.4958e+003 3.335e+000 0.000e+000 0.000e+000 0 MG: 8>7>6>5>4>3>2>1>coarse([ 1 1])<2<3<4<5<6<7<8>. 0 2.4925e+003 3.335e+000 7.159e-001 3.290e+002 0 STOPPING: 1[ (Jold-Jc) = 1.06232700e+000 <= tolJ*(1+|Jstop|) = 2.49684407e+000] 1[ |Yc-Yold| = 2.63741684e+000 <= tolY*(1+norm(Yc)) = 5.32328620e+001] 1[ |dJ| = 3.97212118e-001 <= tolG*(1+abs(Jstop) = 2.49684407e+001] 0[ norm(dJ) = 3.97212118e-001 <= eps = 2.22044605e-013] 0[ iter = 1 >= maxIter = 10 ] % ---------- [ GaussNewtonArmijo : done ! ] ---------------------------------- % ---------- [ MLIR : done ! ] ----------------------------------------------- Elapsed time is 8.706013 seconds.