{'fraction_non_alphanumeric': 0.02742213747389449, 'fraction_numerical': 0.008535367293198946, 'mean_word_length': 4.806009488666315, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cortical Surface Co-Registration based on MRI Images and Photos

Brain shift, i.e. the change in configuration of the brain after opening the dura mater, is a key problem in neuronavigation. We present an approach to co-register intra-operative microscope images with pre-operative MRI to adapt and optimize intra-operative neuronavigation. The tools are a robust classification of sulci on MRI extracted cortical surfaces, guided user marking of most prominent sulci on a microscope image, and the actual variational registration method with a fidelity energy for 3D deformations of the cortical surface combined with a higher order, linear elastica type prior energy. Furthermore, the actual registration is validated on an artificial testbed with known ground truth deformation and on real data of a neuro clinical patient.


Introduction
The development of medical imaging in the last decades quickly triggered intense interest from the medical world to translate this progress on the imaging side to clinical diagnostics and treatment planning. In that respect image registration and in particular recently also the fusion of 2D and 3D image data is a fundamental task in image-guided medical intervention. In [1] 2D photographs of human faces are registered with a triangulated facial surface extracted from MRI data using rigid deformations. A registration method for sparse but highly accurate 3-D line measurements with a surface extracted from volumetric planning data based on the consistent registration idea and higher order regularization is introduced in [2].
The matching of photographic images with pre-operative MRI data is a particular challenge in cranial neuronavigation. The photograph-MRI registration problem in the context of intracranial electroencephalography has been investigated via a control point matching approach in [3]. Recently, normalized mutual information has been applied for the rigid transformation co-registration of brain photographs and MRI extracted cortical surfaces [4]. A major limitation of note, however, is that due to the brain shift the surgeon's view of the operating site is not in a rigid transformation correspondence to pre-operative images. Indeed, standard intracranial neuronavigation devices do not correct for this movement of brain [5]. The main contributions of this paper are a novel classification method for crease pattern such as sulci on implicit (cortical) surfaces and the actual 2D-3D registration method, where a non-rigid 3D deformation of the cortical surface is identified based on user marked sulci on photographs and the camera parameters.

Materials and Methods
The aim of this paper is to register a photograph of the exposed human cortex with the cortex geometry extracted from an MRI data set, see Fig. 1, using the sulci as fiducials. The main ingredients of the proposed approach are a sulci classification on the cortex geometry (Section 2.1) and on the photograph (Section 2.2), as well as a model that uses the two classifications to register 3). The 2D digital photographs were taken intra-operatively after supratentorial craniotomy and durotomy, and before corticotomy, using a digital camera with 10 mega pixel resolution positioned 20 cm above the craniotomy. The MR imaging was performed on a 3T MRI scanner. A T1-weighted MP2RAGE sequence (1×1×1 m 3 , 256×256×176 matrix) was segmented into gray and white matter using BrainVoyager QX [6] and then converted into a signed distance function of the cortical surface using a fast marching method.

Sulci Classification on MRI Data
In this section, we describe how to classify creases on the contour surface of a 3D object B ⊂ Ω represented via its signed distance function d : Ω → R on a computational domain Ω. In the application the object is a brain volume dy which returns larger values in flat regions of C than in edge regions and even smaller near corners (cf. [7] for a related moment based classification on explicit surfaces). We define the scalar classification C( Fig. 2 illustrates the behavior of the classifier C on three simple shapes and a cortical surface extracted from an MRI using a white-green-blue-red color coding. We observe a robust distinction for a single set of parameters (β = 20 and = 8h or 4h, where h denotes the grid width). Fig. 3. Cortex photograph and dictionary based pre-classification Essential problems for the classification of sulci on photographs are additional structures and their misinterpretation. Most prominent are cortical veins, which in addition partially occlude sulci (these veins are almost invisible in MRI in the used MP2RAGE sequence). On this background we here confine to a still manual marking of sulci by an expert who is supported by the results of a prior automatic pre-classification of sulci based on learned discriminative dictionaries, cf. Fig. 3, where the method from [8] is used.

Registration of Photograph and Cortex Geometry
The co-registration of an MRI extracted cortical surface C ⊂ R 3 and a photograph to compensate for effects such as the brain shift is based on a coregistration of the sulci classifiers on C and the photograph. To this end, we with parameter domain ω ⊂ R 2 and graph function z : ω → R. We are interested in a local registration described by the craniotomy, where such a graph representation can be easily derived from the signed distance function used in Section 2.1. Furthermore, let g ∈ L 2 (Ω) denote the sulci classifier on the photograph domain Ω (cf. Section 2.2), and f ∈ L 2 (ω) the corresponding classifier on the cortical surface given as a function on the parameter domain ω, obtained by a suitable clamping of C and rescaling of the values to the unit interval [0, 1] (cf. Section 2.1). Both classifiers are supposed to be close to 1 in the central region of the sulci and small outside. Finally, we denote by P : R 3 → Ω the projection of points in R 3 onto the image plane Ω derived from known camera parameters. Let us remark that we thereby implicitly rule out self occlusions of the graph surface C under the image plane projections. Now, we ask for a deformation Ψ : ω → R 3 defined on the parameter domain ω of the graph function z that matches C to its deformed configuration represented under the projection P in the photograph. Thereby, matching is encoded via the coincidence of the surface classifier f (x) on the MRI described cortical surface and the image classifier g(P (ψ(x))) evaluated at the projected deformed position P (ψ(x)) for all x on the parameter domain ω. Thus, proper matching can be encoded via the minimization of the matching energy based on a surface integral over C with the area element A(x) = (1 + |∇z(x)| 2 ) 1 2 , to consistently reflect the cortex geometry. In the overall variational approach the matching energy is complemented by a suitable elastic regularization energy, which acts as a prior on admissible deformations ψ. Here, we consider the second order, elastic energy Note that a simple first order regularization like the Dirichlet energy of the displacement ψ − (·, z(·)) is not sufficient since matching information is mostly given on a low dimensional subset where proper nonlinear extrapolation is required and bending modes play an important role. Obviously, E reg is rigid body motion invariant (cf. [9]). Finally, we combine the matching energy E match and the regularization energy E reg to the total energy functional on deformations ψ encoding the deformation of the cortical surface C, where λ is a positive constant controlling the strength of the regularization.
To minimize the objective functional we use a time discrete regularized gradient descent taking into account a suitable step size control combined with a cascadic descent approach to handle the registration in a coarse to fine manner. The first variation necessary for the descent algorithm is where the natural boundary conditions ∂ ν ∆ψ = ∆ψ = 0 on ∂ω for the normal ν on ∂ω are considered and ψ is initialized as the identity on C, i. e. ψ(x) = (x, z(x)). For the spatial discretization we consider bilinear Finite Elements on a rectangular mesh overlaying ω and Ω, and approximate the bi-Laplacian ∆ 2 by the squared standard discrete Laplacian ∆ 2 h = M −1 LM −1 L. Here, M and L denote the standard (lumped) mass and stiffness matrices, respectively.

Results
We have applied our registration approach both to test data and to real data. For the test data a cortical surface segmented on a 3D MRI data set has been taken as input together with an image generated from this surface via a given manual segmentation moment-based segmentation before registration after registration projection concatenated with an additional 3D nonrigid deformation. Then on the projected image selected sulci have been marked by hand. This pair of input data together with the computed registration result are depicted in Fig. 5. Furthermore, we considered a photograph of the brain surface seen through a left fronto-temporo-parietal craniotomy performed in a patient before placement of a subdural electrode grid for investigation of drug-resistant cryptogenic epilepsy. We segmented sulci using the procedure in Section 2.2. This is then registered via the proposed approach with the cortical surface extracted from the corresponding pre-interventional 3D MRI data. Again input data and achieved registration are shown in Fig. 5.

Discussion
We have proposed a novel method for the registration of photographs (2D) of the brain with the cortical surface extracted from 3D MRI data. The method turns out to be effective and robust both on test and on real data. It can be considered as an alternative to intra-operative MRI allowing subsequent co-registration with neuronavigation [10]. Currently, we aim for a validation study with an increased number of cases considering also data of patients with substantially smaller craniotomies.
Furthermore, there is potential, that the iterative 2D/3D surface registration of digital images together with morphological 3D MRI data sets will enable to build up a "dictionary" of brain surface features. Ultimately, the creation of such a dictionary might, to a certain extent, permit "intelligent" automatic recognition of brain surface features, where the 2D brain surface, seen through the intraoperative microscope standardly used during intra-cerebral procedures, would directly be co-registered to pre-interventional 3D MRI data.
As already discussed, the sensitivity of MRI and photography is substantially different for different anatomic structures, e. g. veins are very prominent on images yet not on the MRI modality used here. One could incorporate multiple MRI sequences and fuse vein sensitive images with the present images to improve the registration results. Finally, let us remark that one could also consider stereo photographs of the deformed surface to improve the methods performance. In that respect our approach can easily be adapted summing over copies of the matching energy.