Pre-processing for “VoxelBased Morphometry” John Ashburner The Wellcome Trust Centre for Neuroimaging 12 Queen Square, London, UK. Contents • Introduction • Segmentation • DARTEL Registration Voxel-based Morphometry • Pre-process the images of lots of subjects, to generate spatially normalised grey matter maps of each subject. • Smooth spatially. • Perform voxel-wise statistics. • Try to interpret the findings in terms of volumetric differences. Segment into different tissue classes Spatially Normalize – with scaling by Jacobian determinant Smooth Spatially Mass-univariate statistical testing Inference via Random Field Theory Smoothing Each voxel after smoothing effectively becomes the result of applying a weighted region of interest (ROI). Before convolution Convolved with a circle Convolved with a Gaussian Possible Explanations for Findings Mis-classify Mis-register Folding Thickening Thinning Mis-register Mis-classify Contents • Introduction • Segmentation – Mixture of Gaussians – Bias correction – Warping to match tissue probability maps • DARTEL Registration Tissue Segmentation • Circularity: – Registration is helped by tissue classification or bias correction. – Tissue classification helped by registration and bias correction. – Bias correction is helped by registration and tissue classification. • The solution is to put everything in the same generative model. – A MAP solution is found by repeatedly alternating among classification, bias correction and registration steps. • Should produce “better” results than simple serial applications of each component. A Generative Model • A model of how the data may have been generated, which comprises: – Mixture of Gaussians (MOG) – Bias Correction – Non-linear Inter-subject Registration g a0 a Ca c1 y1 m c2 y2 s2 c3 y3 b cI yI Cb b0 Mixture of Gaussians (MOG) • Tissue classification is based on a Mixture of Gaussians model (MOG), which represents the intensity probability density by a number of Gaussian distributions. Frequency Image Intensity Belonging Probabilities Belonging probabilities are assigned by normalising to one. Non-Gaussian Intensity Distributions • Multiple Gaussians per tissue class allow nonGaussian intensity distributions to be modelled. – E.g. accounting for partial volume effects Modelling a Bias Field Corrupted image Bias Field Corrected image Tissue Probability Maps • Tissue probability maps (TPMs) are used instead of the proportion of voxels in each Gaussian as the prior. ICBM Tissue Probabilistic Atlases. These tissue probability maps are kindly provided by the International Consortium for Brain Mapping, John C. Mazziotta and Arthur W. Toga. Deforming the Tissue Probability Maps • Tissue probability images are deformed so that they can be overlaid on top of the image to segment. Optimisation • The “best” parameters are those that maximise the log-probability. • Optimisation involves finding them. • Begin with starting estimates, and repeatedly change them so that the objective function decreases each time. Steepest Descent Start Optimum Alternate between optimising different groups of parameters Spatially normalised BrainWeb phantoms (T1, T2 and PD) Tissue probability maps of GM and WM Cocosco, Kollokian, Kwan & Evans. “BrainWeb: Online Interface to a 3D MRI Simulated Brain Database”. NeuroImage 5(4):S425 (1997) Contents • Introduction • Segmentation • DARTEL Registration – Scaling and squaring – Optimisation – Warping GM and WM images to their average Parameterization Deformations parameterized by a single flow field, which is considered to be constant in time. Not really a proper Lie Group. Often referred to as a one parameter subgroup. Diffeomorphic Anatomical Registration Through Exponentiated Lie Algebra Euler Integration • Parameterising the deformation • φ(0)(x) = x 1 • φ(1)(x) = ∫ u(φ(t)(x))dt • u is a flow field to be estimated t=0 • Scaling and squaring is used to generate deformations. – c.f. matrix exponentiation Euler integration • The differential equation is dφ(x)/dt = u(φ(t)(x)) • By Euler integration φ(t+h) = φ(t) + hu(φ(t)) • Equivalent to φ(t+h) = (x + hu) o φ(t) For (e.g) 8 time steps Simple integration • φ(1/8) = x + u/8 • φ(2/8) = φ(1/8) o φ(1/8) • φ(3/8) = φ(1/8) o φ(2/8) • φ(4/8) = φ(1/8) o φ(3/8) • φ(5/8) = φ(1/8) o φ(4/8) • φ(6/8) = φ(1/8) o φ(5/8) • φ(7/8) = φ(1/8) o φ(6/8) • φ(8/8) = φ(1/8) o φ(7/8) 7 compositions Scaling and squaring • φ(1/8) = x + u/8 • φ(2/8) = φ(1/8) o φ(1/8) • φ(4/8) = φ(2/8) o φ(2/8) • φ(8/8) = φ(4/8) o φ(4/8) 3 compositions • Similar procedure used for the inverse. Starts with φ(-1/8) = x - u/8 Scaling and squaring example Deformations at different times Jacobians • Jacobian fields can also be obtained by scaling and squaring. • If warps are composed by: ϕC=ϕB○ϕA then Jacobian matrices are obtained by: JϕC=(JϕB○ϕA) JϕA Jacobian determinants remain positive (almost) See also… • C. Moler and C. van Loan. “Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later”. SIAM Review 45(1):3-49 (2003). • V. Arsigny, O. Commowick, X. Pennec and N. Ayache. “A LogEuclidean Polyaffine Framework for Locally Rigid or Affine Registration”. Proc. Of the 3rd International Workshop on Biomedical Image Registration (WBIR'06), 2006, pp. 120-127. LNCS vol 4057. Springer-Verlag, Utrecht, NL. • V. Arsigny, O. Commowick, X. Pennec and N. Ayache. “A LogEuclidean Framework for Statistics on Diffeomorphisms”. Proc. of the 9th International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI'06), 2006, pp. 924-931. LNCS 4190. Springer-Verlag, Berlin, Germany. • M. Hernandez, M. N. Bossa, and S. Olmos. “Registration of anatomical images using geodesic paths of diffeomorphisms parameterized with stationary vector fields”. IEEE workshop on Math. Meth. in Biom. Image Anal. (MMBIA’07), 2007. Contents • Introduction • Segmentation • DARTEL Registration – Scaling and squaring – Optimisation – Warping GM and WM images to their average Multinomial Likelihood Term • Model is multinomial for matching tissue class images. -log p(t|μ,ϕ) = -ΣjΣk tjk log(μk(ϕj)) t – individual GM, WM and background μ – template GM, WM and background ϕ – deformation • A general purpose template should not have regions where log(μ) is –Inf. Prior Term • ½uTHu • DARTEL has three different models for H – Membrane energy – Linear elasticity – Bending energy • H is very sparse An example H for 2D registration of 6x6 images (linear elasticity) Regularization models “Membrane energy” Images registered using a small deformation approximation “Bending energy” Optimization • Uses Gauss-Newton – Requires a matrix solution to a very large set of equations at each iteration u(k+1) = u(k) - (H+A)-1 b – b are the first derivatives of objective function – A is a sparse matrix of second derivatives – Computed efficiently, making use of scaling and squaring Relaxation • To solve Mx = c Split M into E and F, where • E is easy to invert • F is more difficult • If M is diagonally dominant (membrane energy): x(k+1) = E-1(c – F x(k)) • Otherwise regularize (bending or linear elastic energy): x(k+1) = x(k) + (E+sI)-1(c – M x(k)) – Diagonal dominance is when |mii| > Σi≠j |mij| 2nd derivs of prior term 2nd derivs of likelihood term M = H+A = E+F Easy to invert Difficult to invert Highest resolution Full Multi-Grid Lowest resolution A •Prolongation of low resolution solution to current resolution. •Add this to existing solution. •Perform a few iterations of relaxation. •Restrict residuals down to lower resolution. B •Prolongation of low resolution solution to current resolution. •Add this to existing solution at current resolution. •Perform a few iterations of relaxation. •Prolongation of solution to higher resolution. C •Restrict high resolution residuals to current resolution. •Perform a few iterations of relaxation. •Restrict residuals down to lower resolution. E •Restrict higher resolution residuals to current resolution. •Obtain exact solution by matrix inversion. •Prolongation of solution to higher resolution. See also… • W. H. Press, S. A. Teukolsky, W. T. Vetterling and B. P. Flannery. Numerical Recipes in C (Second Edition). Cambridge University Press, Cambridge, UK. 1992. – Chapter 15, Section 5 explains GaussNewton optimization (Levenberg-Marquardt without the regularisation). – Chapter 19, Section 6 explains the basics of multi-grid methods. Contents • Introduction • Segmentation • DARTEL Registration – Scaling and squaring – Optimisation – Warping GM and WM images to their average Template Generation Initial Average Iteratively generated from 471 subjects. After a few Began with rigidly iterations aligned tissue probability maps. Regularization lighter for later iterations. Final template Generative Model • p(ϕ1,t1, ϕ2,t2, ϕ3,t3,… μ) = p(t1,ϕ1|μ) p(t2,ϕ2|μ) p(t3,ϕ3|μ) … p(μ) • = p(t1|ϕ1,μ) p(ϕ1) p(t2|ϕ2,μ) p(ϕ2)… p(μ) ϕ1 t1 • MAP solution obtained for template. t • Requires p(μ) ϕ2 μ t2 5 ϕ5 t4 ϕ4 t3 ϕ3 Laplacian Smoothness Priors on template 2D 3D Template modelled as softmax of a Gaussian process μk(x) = exp(ak(x))/(Σj exp(aj(x))) MAP solution determined for a, by Gauss-Newton optimisation, using multi-grid. ML and MAP templates from 6 subjects Nonlinearly aligned Rigidly aligned ML MAP log 471 Subject Average 471 Subject Average 471 Subject Average Subject 1 471 Subject Average Subject 2 471 Subject Average Subject 3 471 Subject Average Preprocessing with DARTEL u Hu Variable velocity framework (as in LDDMM) “Initial momentum” Variable velocity framework (as in LDDMM) “Initial momentum” Determining amount of regularisation • Matrices too big for Bayesian variance component estimation. • Used crossvalidation. • Smooth an image by different amounts, see how well it predicts other images: Nonlinear registered log p(t|μ) = ΣjΣk tjk log(μjk) Rigidly aligned