Diffeomorphic Image Registration by Geodesic Shooting
Total Page:16
File Type:pdf, Size:1020Kb
Small Deformation Model Large-Deformation Diffeomorphic Metric Mapping Geodesic Shooting Diffeomorphic Image Registration by Geodesic Shooting John Ashburner Wellcome Trust Centre for Neuroimaging UCL Institute of Neurlogy London, UK. John Ashburner Geodesic Shooting Small Deformation Model Large-Deformation Diffeomorphic Metric Mapping Geodesic Shooting Outline 1 Small Deformation Model Differential Operator Optimisation 2 Large-Deformation Diffeomorphic Metric Mapping Diffeomorphisms & Geodesics LDDMM Itself 3 Geodesic Shooting Generating Deformations from Initial Velocities Optimising the Initial Velocities Initial Momentum Examples John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Small Deformation Approximation µ ° (x−v(x)) f ° (x+v(x)) f ° (x+v(x)) µ ° (x−v(x)) x−v(x) x+v(x) x+v(x) x−v(x) |Jx−v(x)| |Jx+v(x)| |Jx+v(x)| |Jx−v(x)| John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Small Deformation Model Should fit a model to the data (as opposed to fitting the data to the model). The objective function for least-squares fitting is often expressed as: 1 1 E = jjLvjj2 + jjf − µ (Id − v) jj2 2 2σ2 f is our image (data). µ is the template (model). v is a displacemet field. Id is an identity transform. L is a differential operator. John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Linear Elasticity Operator The differential operator used is essentially the same linear elasticity operator used by Christensen (where D indicates computing the Jacobian: Z 2 λ1 T 2 2 2 jjLvjj = jjDv + (Dv) jj + λ2tr(Dv) + λ3jjvjj dx x2Ω 4 This has three terms that penalise different things. 1 Length changes (Dv + (Dv)T ). 2 Volume changes (tr(Dv)). 3 Absolute displacement (v { needed to make the operator invertable). John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Discretisation Images and deformations are really stored discretely, and made continuous by interpolation. Generalised interpolation involves representing fields etc by linear combinations of basis functions. Linear interpolation, which involves very local triangular basis functions (bi (x)), so: X v(x) = wi bi (x) i John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Differential Operator in 1D In 1D, a simple operator could compute the gradients by Gw, where: 0−1 1 0 0 :::1 B 0 −1 1 0 :::C B C B 0 0 −1 1 :::C G = B C B 0 0 0 −1 :::C @ . A . .. Penalty (jjLvjj2) could be the sum of squares of the gradients. Computed by (Gw)T (Gw) ≡ wT GT Gw ≡ wT Aw. p Note that the norm jjLvjj (ie wT Aw) can be thought of as a distance. John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Differential Operator in 2D For more dimensions, we can use Kroneker tensor products. 0 1 g11B ::: g1nB B . .. C G ⊗ B = @ . A gm1B ::: gmnB So, computing horizontal and vertical gradients of a square image (reshaped to a column vector) may be achieved using the following matrix: I ⊗ G G ⊗ I John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Differential Operator for Computing Jacobians (2D) If we stack the x component of the displacement field on top of the y component, then we can compute elements of the Jacobians by: 0I ⊗ G 0 1 BG ⊗ I 0 C B C w @ 0 I ⊗ GA 0 G ⊗ I The divergence of the displacement is simply the trace of the Jacobian, so can be computed using: I ⊗ GG ⊗ I w John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Symmetric and Anti-symmetric Matrices A square matrix (J) can be decomposed into the sum of a symmetric and anti-symmetric (skew symmetric) matrix. The symmetric part is (J + JT )=2. The anti-symmetric part is (J − JT )=2. The symmetric elements of the Jacobian of the displacement can be obtained from: 0 I ⊗ G 0 1 @ 0 G ⊗ I A w 1 1 2 G ⊗ I 2 I ⊗ G Similar large sparse matrices can be generated for 3D data. John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Matrix Exponentials A matrix exponential (\expm" in MATLAB) is given by: 1 X 1 eJ = Jk k! k=0 For matrices very close to zero, eJ ' I + J. The determinant jeJj may be computed from etr(J). If J is anti-symmetric, then eJ is orthogonal (ie a rigid rotation). 0 0 1 01 00 0 −11 00 0 01 J = w1 @−1 0 0A + w2 @0 0 0 A + w3 @0 0 1A 0 0 0 1 0 0 0 −1 0 We do not wish to penalise rotations, so only penalise the symmetric parts of the Jacobians. John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Greens Function Note that the Green's function (K) of the operator may be computed from the (pseudo)inverse of A, although it is often easier to use Fourier methods. If you think of applying a differential operator as a convolution, then applying the Green's function is a deconvolution. John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Gauss-Newton Optimisation An iterative procedure, using both first and second derivatives. 2 −1 (i+1) (i) @ E @E w = w − 2 @w w(i) @w w(i) @E = Aw + g @w @2E = A + H @w2 John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Gradients 2 3 g11 6g217 6 7 6g317 Using trilinear interpolation to 6 7 6 . 7 represent the displacement fields, 6 . 7 6 7 where the density of the control 6gI 17 g = 6 7 points is equal to the pixel 6g117 6 7 spacing. Therefore 6g 7 6 217 #(x ) = [x − w ; x − w ]. 6g 7 i i1 i1 i2 i2 6 317 6 . 7 4 . 5 gI 1 1 g = (f (x ) − µ(#(x ))) ((r µ) ◦ (#(x ))) il σ2 i i l i John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Hessian 2 3 h111 0 0 ::: 0 h121 0 0 ::: 0 6 0 h211 0 ::: 0 0 h221 0 ::: 0 7 6 7 6 0 0 h311 ::: 0 0 0 h321 ::: 0 7 6 7 6 . .. .. 7 6 . 7 6 7 6 0 0 0 ::: hI 11 0 0 0 ::: hI 217 H = 6 7 6h112 0 0 ::: 0 h122 0 0 ::: 0 7 6 7 6 0 h 0 ::: 0 0 h 0 ::: 0 7 6 212 222 7 6 0 0 h ::: 0 0 0 h ::: 0 7 6 312 322 7 6 . .. .. 7 4 . 5 0 0 0 ::: hI 12 0 0 0 ::: hI 22 1 h = ((r µ) ◦ #(x ))((r µ) ◦ #(x )) ilm σ2 l i m i John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting Matrix Solution A A B A multigrid approach used to −1 solve (A + H) (Aw + g). Based A A B C B C B on a relaxation scheme at several resolutions. See Numerical Recipes (2nd edition onwards) for A A B C B C B C B C B more details. E E E E E E E John Ashburner Geodesic Shooting Small Deformation Model Differential Operator Large-Deformation Diffeomorphic Metric Mapping Optimisation Geodesic Shooting At The Solution At the solution, the derivatives of the objective function are zero. @E = Aw + g = 0 @w Therefore w = A−1g We see that the displacements are a smoothed version of a difference image multiplied by the warped gradients of the template. v = K ((f − µ(#))((rµ) ◦ #)) John Ashburner Geodesic Shooting Small Deformation Model Diffeomorphisms & Geodesics Large-Deformation Diffeomorphic Metric Mapping LDDMM Itself Geodesic Shooting Outline 1 Small Deformation Model Differential Operator Optimisation 2 Large-Deformation Diffeomorphic Metric Mapping Diffeomorphisms & Geodesics LDDMM Itself 3 Geodesic Shooting Generating Deformations from Initial Velocities Optimising the Initial Velocities Initial Momentum Examples John Ashburner Geodesic Shooting Small Deformation Model Diffeomorphisms & Geodesics Large-Deformation Diffeomorphic Metric Mapping LDDMM Itself Geodesic Shooting Nonlinearity of Shapes µ f According to David Mumford (Fields Medal, 1974): \Shapes are the ultimate non-linear µ ° θ f ° φ sort of thing" Relative shapes can not be added and subtracted (ie, they are nonlinear). Instead, θ φ deformations should combined by composing them together. Deformations that are smooth and invertable |Jθ| |Jφ| are known as diffeomorphisms, and form a mathematical group. John Ashburner Geodesic Shooting Small Deformation Model Diffeomorphisms & Geodesics Large-Deformation Diffeomorphic Metric Mapping LDDMM Itself Geodesic Shooting Linear Methods for Data on Manifolds We are dealing with non- Euclidean geometry, so conceptualise the curved spaces as manifolds embedded in higher dimensions. John Ashburner Geodesic Shooting Small Deformation Model Diffeomorphisms & Geodesics Large-Deformation Diffeomorphic Metric Mapping LDDMM Itself Geodesic Shooting Diffeomorphism Groups A group is a set, G, together with an operation, ◦, that combines any two elements a and b to form another element, denoted a ◦ b. To qualify as a group, the set and operation must satisfy four requirements known as the group axioms: Closure. For all a, b in G, the result of the operation, a ◦ b, is also in G. Associativity. For all a, b and c in G,(a ◦ b) ◦ c = a ◦ (b ◦ c).