4D Cardiac MRI Segmentation and Surface Reconstruction
Full text
4D Cardiac MRI Segmentation and Surface Reconstruction Gerard Pons Moll Department of Electrical and Computer Engineering Northeastern University A thesis submitted for the degree of Telecommunications Engineering Masters Thesis 2008 July
1. Reviewer: Name 2. Reviewer: Day of the defense: Signature from head of the committee: ii
Abstract Atrial fibrillation (AF) is a growing problem in modern societies with an enormous impact in both short term quality of life and long term survival. A recently developed promising approach to cure AF uses radiofrequency (RF) ablation to carry out ”pulmonary vein antrum isolation” (PVAI) to the heart. However, the lack of proper 3D visualization during surgery training, planning, and guidance makes surgery a very difficult task to the surgeons and therefore the risk for the patient increases. The purpose of this work is to develop methods for automatically segmenting and tracking the heart in 4-D cardiac MRI datasets. The heart surface will be reconstructed to serve as a virtual computer model for the 3D surgery training, planning and guidance. In this work we also outline some of the methods proposed to solve the problem of cardiac segmentation. Our method is based on an active contour model and a geometric post-processing of the segmentation.
iv
Resum 1La fibril·lac´o auricular ´es un tipus de ar´ıtmia card´ıaca i es un problema creixent en la societat moderna amb un impacte enorme en la qualitat de vida a curt termini aix´ı com en les probabilitats de superviv`encia a llarg termini. Una t`ecnica cir´urgica prometedora desenvolupada recentment consisteix en dur a terme l’ablaci´o per radiofreq¨u`encia a una regi´o espec´ıfica del cor. Amb la tecnologia i software actual, el cirurgians han de realitzar l’ablaci´o per radiofreq¨u`encia amb un cat`eter i la ´unica visualitzaci´o de la que disposen s´on imatges en 2D provinents de una c`amera endosc`opia instal·lada a l’extrem del cat`eter. Normalment el camp de visi´o es molt redu¨ıt i la navegaci´o es en 2D, la qual cosa fa que la operaci´o sigui extremament dif´ıcil i per tant el risc per al pacient incrementa. La falta de visualitzaci´o en 3D en les etapes de entrenament, planificaci´o i guiat de la cirurgia card´ıaca ha motivat la realitzaci´o d’aquest projecte presentat en aquest treball. L’objectiu principal d’aquest projecte es extendre l’entorn de treball del cirurgi`a card´ıac creant un entorn virtual en el qual es pugui navegar amb el cat`eter visualitzant en pantalla un model tridimensional del cor espec´ıfic pel pacient. Per a que aix`o sigui possible el problema es pot dividir en 2 etapes diferenciades. 1. Creaci´o de un model pre-operatiu 3D+temps del cor espec´ıfic per al pacient. 2. Alinear el sistema de coordenades del model amb les imatges disponibles a la sala d’operacions. Si es poden solucionar aquests dos problemes el model virtual del cor creat abans de la operaci´o estar`a perfectament alineat amb la posici´o del cor real del pacient a la 1Durant la realitzaci´o del Projecte Final de Carrera l’autor estava en el departament de Biomedical Signal Processing a Northeastern University, Boston, USA v
sala d’operacions. El treball presentat en aquesta tesi consisteix en desenvolupar un m`etode per crear autom`aticament el model del cor a partir de les imatges de una sessi´o de resson`ancia magn`etica (MRI) del pacient pre-operativa. Les resson`ancies magn`etiques amb les que treballem consisteixen en volums formats per diversos talls transversals del cor. Per cada fase card´ıaca s’obt´e un d’aquests volums formant per tant un conjunt de dades en 4D del cor. El m`etode esta basat en un contorn actiu per a la localitzaci´o, segmentaci´o i seguiment del cor durant diferents fases del cicle card´ıac. Un cop obtinguts els contorns que defineixen la paret exterior del cor per totes les imatges transversals es proposa un processat geom`etric per donar consist`encia temporal i espaial a les segmentacions obtingudes. Un cop processada la data es procedir`a a la reconstrucci´o de la superf´ıcie card´ıaca a partir de les segmentacions planars processades. Finalment, es visualitzar`a el moviment de les superf´ıcies obtingudes de la paret exterior del cor i del ventricle esquerre. Breu descripci´o del m`etode: S’inicialitzar`a el contorn actiu introduint manualment 5-6 punts per cada un dels talls transversals per a la primera fase del cicle card´ıac. Aquests punts seran interpolats utilitzant splines i es mostrejar`a el contorn amb 5 graus de separaci´o respecte el centroide de la corba formant aix´ı un total de 72 nodes per contorn. Des d’aquest punt endavant el m`etode haur`a de pertorbar els nodes en la direcci´o radial fins que s’enganxin a les parets del cor en la imatge. Per tant es buscar`a en les l´ınies radials del contorn, caracter´ıstiques locals de les imatges per trobar la paret exterior del cor. Quan els 72 nodes s’hagin enganxat a la paret del cor els projectarem a l’espai de Fourier i ens quedarem nom´es amb els primers 5 harm`onics per tal d’obtenir una representaci´o suau de la paret del cor. Quan s’hagi trobat la frontera del cor per un determinat instant temporal es propagar`a el contorn actual i es far`a servir com a estimaci´o per la seg¨uent fase card´ıaca i repetir`a el proc´es anterior. Un cop s’hagin obtingut tots els contorns per un determinat tall transversal s’aprendr`a el moviment din`amic del cor. El moviment din`amic vi
estar`a representat per una matriu que utilitzarem com a informaci´o a priori per millorar les prediccions dels subseq¨uents talls transversals. Aquesta matriu de moviment s’actualitzar`a per cada tall transversal. Un cop s’hagin trobat tots el contorns, procedirem a fer un processat geom`etric dels nodes que defineixen les superf´ıcies temporals. Agruparem els 72 nodes de cada contorn en una matriu 3D. Cada columna descriu el contorn per a un determinat tall transversal i un determinat instant temporal. Es a dir, quan avancem en la matriu horitzontalment anem trobant els diferents contorns del volum del cor per a un mateix instant temporal i quan avancem en la direcci´o de profunditat trobem els contorns per les diferents fases card´ıaques o instants temporals. Els contorns s’han trobat d’una manera mes o menys independent i per tant imposarem consist`encia temporal i espaial als nodes. D’aquesta manera restringirem el problema imposant a les superf´ıcies que tinguin transicions suaus en cadascuna de les 3 dimensions espaials m´es la temporal. Per suavitzar els nodes en totes les direccions i eliminar el soroll creat per l’algoritme utilitzarem ”mtensor smoothing splines”. B`asicament, consisteix en encaixar una funci´o polin`omica a trossos a cadascuna de les dimensions que creuen un node; per tal i com hav´ıem parametritzat les superf´ıcies i la manera com hav´ıem definit la matriu tridimensional les dimensions s´on: •variaci´o angular dins el contorn on es troba el node •variaci´o entre el node i els seus veins en els talls superior i inferior •variaci´o entre un node i els seus ve¨ıns per l’instant temporal anterior i posterior Un cop tinguem una funci´o polin`omica per cada una de les dimensions que travessen un node, el node ser`a substitu¨ıt per el producte ponderat de les tres funcions que el travessen. Es pot pensar aquest problema com una reixa tridimensional, els eixos d’aquesta reixa es deformen d’una manera suau per apropar-se als nodes de la matriu 3D, d’aquesta manera cada node es substitueix per una ponderaci´o de cadascun dels tres eixos que el travessen. Un cop obtinguts els nodes suavitzats reconstruirem la superf´ıcie, la manera de connectar els nodes ´es impl´ıcita en la matriu tridimensional ja que els ve¨ıns dels nodes en la estructura de la superf´ıcie son tamb´e els ve¨ıns en la matriu. D’aquesta manera podrem visualitzar el moviment de les superf´ıcies tridimensionals. Les superf´ıcies obtingudes vii
ajudaran a diagnosticar anomalies en la contracci´o c`ardiaca i podran servir, un cop es registrin amb les imatges operatives, com a model virtual per la visualitzaci´o en 3D durant les etapes de la cirurgia cardiaca. viii
To Laura
LIST OF FIGURES viii
List of Tables 3.1 datasettable ................................. 17 ix
LIST OF TABLES x
Chapter 1 Introduction 1.1 Problem statement and Challenges Atrial fibrillation (AF) is a growing problem in modern societies with an enormous impact in both short term quality of life and long term survival. Standard AF therapy, which includes antiarythmic drugs has been unsatisfactory with success on only 40- 60 % of those treated. A recently developed promising approach to cure AF uses radiofrequency (RF) ablation to carry out ” pulmonary vein antrum isolation” (PVAI). Unfortunately, because of significant clinical and technical challenges this approach is used in less than 0.1% of AF patients, often with suboptimal results. The hypothesis of this research is that current and future magnetic resonance imaging (MRI) will allow PVAI to become the standard treatment for AF. Conventional surgery is performed via a median sternotomy on the arrested heart, requiring the use of cardiopulmonary bypass (CPB), aortic cross clamping , and myocardial preservation. The latter are the main causes of side effects that lead to increased patient recovery times and costs. Unwanted side-effects, such as large incisions, CPB, or cardiac arrest can be reduced by performing cardiac surgery using an endoscope-aided, port-access approach described previously. In practice however, operating on the beating heart without direct vision is extremely challenging. The first problem is the requirement to perform complex maneuvers, normally carried out in the open chest, inside the closed thoracic cavity. Several systems have been effective for such tasks when used by a trained practitioner . The second and more prominent problem is the lack of proper three-dimensional (3D) visualization during the training, planning, and guidance stages of surgery. Currently, 1
1. INTRODUCTION only limited training is conducted, usually on unrealistic and expensive animal and cadaver models. Surgery planning of port locations is also inadequate, often based only on 2D images such as x-rays and angiograms. Finally, the current surgical guidance method is imperfect, due to the small field-of-view (FOV) of the endoscope, and the possibility that this view may become obstructed by blood, anatomy, moisture, etc. The lack of proper 3D surgery training, planning, and guidance can lead to improper patient selection, sub-optimal port placement, longer procedures, and increased risks to the patient. To address these issues, we want to develop interactive catheter and ablation guidance strategies for the treatment of AF through: •Real-time, MRI based navigation systems that guide catheter placement and then monitor lesion formation. In other words, we need to generate a pre-operative 4-D model of the heart so the surgeon has an anatomy reference of the heart that will help him navigate with the catheter in the closed thoracic cavity. This problem can be divided in two major stages, model creation from pre-operative data and the operative alignment of the model with the real heart in the operative room. Our approach will consist in: Pre-operative stage: 1. Find the boundary of the heart in a dataset of 4D- MRI images with minimal user intervention. 2. Render the surface that will model the beating heart. 3. Parameterize this set of volumes, i.e. describe the set of volumes as a set of coefficients or numbers. Operative stage: 4. Find the boundary of the 2D + time imaging that we have available during surgery. 5. Parameterize these boundaries as we did with the 4D model. 2
1.2 Previous Work in registration 6. Find the exact location of the 2D images in the 4D model, i.e we need to register the operative imaging with the pre-operative model. 7. As we will have the parameterized 4D model on one hand and the parameterized contours on the other, we will only have to compare this set of parameters and thus the computational cost will be reduced. If we are able to solve this problem the surgeon will be able to see the virtual computer reproduction of the catheter and the heart model consistent with the real position of the catheter with respect to the heart. The work presented in this paper presents a novel approach to solve the first three steps, segmentation and surface reconstruction from pre-operative cardiac MRI datasets. However, the segmentation and tracking algorithms applied on 1 will also be applied in steps 4 and 5. This will serve as a first step to find the position of the catheter with respect to the heart. So there are two major challenges, the first one is the segmentation and tracking of the heart and the second one is the 2D-3D registration to align the model with the operative environment. The focus of this thesis is on the segmentation of the heart, however we will also outline the current methods in registration of medical images because as we will see segmentation and registration are not two separate problems. In our case we bet for a registration based on surface to contour matching so a previous segmentation is necessary. 1.2 Previous Work in registration To register the pre-operative model with the intra-operative images we will follow a geometric based registration approach. Geometric feature based approaches have the advantage of converging very fast which is necessary for surgical interventions. However, this methods rely on a previous segmentation. Other approaches have been proposed that do not rely on a previous segmentation. Consequently, we can classify registration methods in two main groups, geometric based and voxel similarity based. 1.2.1 Geometric Based Registration 1. Point Based Registration: This method consists in aligning two point sets usually defined manually in the skin of the patient or by landmark identification. 3
1. INTRODUCTION Landmark identification in cardiac MRI is generally a very difficult task since there are a few spatially accurate anatomical landmarks. This landmarks are usually chosen to be the apex, the papillary muscles and the inferior junction of the right ventricle. This methods can be used as an initial registration for further optimization. Note that the registration of skin markers does not guarantee the registration of the heart since the position of the heart inside the body depends on the patient or respiratory contraction. 2. Registration methods based on heart surfaces: The chamfer matching method (5) is often used to register surfaces and point sets. In this method, the sum of the distances between the transformed points and a distance map built upon the segmented surface using the chamfer distance transformation is minimized. Also the iterative closest point algorithm ICP (4) is used to elastically register surfaces and lines. In this approach, the shape to be registered is first placed in close proximity, in location and orientation, to the target shape (6). Second, for each point on one shape, the closest point on the target shape is found and the distance between the two shapes is computed as a least square sum of their distances. Third, the pose parameters of the shape are adjusted incrementally at the direction which minimizes the sum of squared distances SSD between the two shapes. The process of calculating and minimizing this distance is iterated until convergence. This algorithm is effective, easy to implement, and robust if the initial pose is close enough to the true pose of the target shape. However, with a distant initial pose, the process can converge to local minima. The ”head and hat” algorithm has also been proposed for registering medical images and was first presented to register brain images (12; 45). This algorithm models the contours from one of the images (usually higher resolution) as a surface (the ”head”) and the contours of the other image set as a series of points (the ”hat”). The algorithm then determines the optimum rigid transformation, which minimizes the mean squared deviation between the points of the hat and the surfaces of the head by using the Powell minimization algorithm. 4
1.3 Previous Work in Cardiac Segmentation 1.2.2 Voxel similarity measures: This class of methods have the advantage of not depending on a previous segmentation. However a strong correlation between pixels of different imaging sessions is assumed. Image registration methods can also be classified in terms of the type of search that is needed to compute the transformation between the two image domains. In searchbased methods the effect of different image deformations is evaluated and compared. In direct methods, such as the Lucas Kanade method and phase-based methods, an estimate of the image deformation is computed from local image statistics and is then used for updating the estimated image deformation between the two domains. For the comparison of the two images several measures have been used, sum of squared differences SSD, sum of absolute differences SAD (28) or by correlation coefficients CC all of them leading to very similar performances. Mutual information has also been used as a similarity measure. Mutual information theory measures the statistical dependencies between two random variables or the amount of information that one variable contains about the other (51; 52). Mutual information can be qualitatively considered as a measure of how well one image explains the other. The mutual information is maximized at the optimal alignment. For further reading on registration methods we refer to (56; 58) and specifically for cardiac analysis and segmentation (32) and the references therein. 1.3 Previous Work in Cardiac Segmentation The literature for segmenting cardiac medical images is vast. We will give a brief description of the previous work in cardiac segmentation and tracking. We have grouped the current cardiac segmentation in four groups, methods based on registration and optical flow, model based segmentation methods, region based approaches and finally active contour based methods. 1.3.1 Manual Segmentation and Registration Manual segmentation requires human expert that selects a number of control points around the boundary of the heart and then this points are interpolated. This is a very tedious and time consuming work. Furthermore, we will need some post-processing if we want to find temporal and space consistency in our segmentations. Several authors 5
1. INTRODUCTION have proposed learning the cardiac motion by elastically registering a manually 3D- MRI segmented heart for the end-dyastolic phase to the rest of the cardiac phases (28; 49; 51; 53; 54), see figure. Therefore, the registration methods used are based Figure 1.1: Temporal registration-The end-dyastolic phase is elastically registered to successive phases2 on voxel similarity measures, see page 4, usually a bending penalty constraint is added in the minimization to find correspondences. This methods are prone to errors if the image sequences are noisy and the texture distribution change over time. 1.3.2 Model based This methods rely on building a model statistically created from a database. The model is going to be deformed to wrap around the boundary of the particular unseen data that we want to segment. Model based approaches consist in two steps: 1. Model creation from the training set. 2. Model matching with unseen data A very popular type of statistical models are Active Appearance Models, AAM (8). Recently AAM have become very popular for segmenting cardiac datasets (7; 15; 47; 48; 57). AAM models two features of the datasets, shape and texture. To model shape a set of landmarks in every dataset in the training set have to be identified. Landmarks are points that can be identified in all the datasets and thus are very useful to find correspondences. There are 4 kinds of landmark points: 2Figure taken from ”Determining Epicardial Surface Motion Using Elastic Registration (53) 6
1.3 Previous Work in Cardiac Segmentation •Anatomical landmarks correspond between organisms in some biologically meaningful way. Such points are identified by a human expert. •Junctions are points where different clearly distinguished boundaries meet. •Mathematical landmarks points are located using some mathematical property such as high curvature. •Pseudo landmarks points located between two landmarks. The problem of automatically identifying landmarks is far from being solved, besides a landmark has to be identified in all the training sets so any landmark point in one training example has to define exactly the corresponding salient point as in all other training examples. This represents a challenge for human experts when doing the manual annotation because they have to be very precise. Once all the training sets have been annotated, the coordinates of the landmarks each training set are arranged in a single vector. The order doesn’t matter as long as there is a 1-to-1 correspondence, by convention its usually s= (x1, y1, z1, x2, y2, z2, ..., xN, yN, zN)T where xi, yi, ziare the coordinates of the ithlandmark point and Nthe number landmark points. After this we want to reduce the dimensionality and find a set of basis that with a few coefficients we can describe the main variations seen in the training set. This is precisely what principal component analysis (PCA) does. However, before applying PCA all the shapes in the training set must be aligned i.e. make all the shapes have the same rotation, translation and scale. The next step is to compile the individual (aligned) shapes siof the training set to a matrix Swhere siis the i-th column vector. The last step in building the shape model then is to calculate the principal component analysis (PCA) of matrix S, 1.1: s= ˆs+ k X n=1 cnΦn(1.1) Once we have the new basis, eigenvectors of SST, we can describe any shape as a linear combination of this set of basis. In 1.1 sis an arbitrary heart shape, cnare called the modes of the shape model and kis the number of eigenvectors used to describe the shape, so the greater the kthe more accurate the description. The greatness of PCA is that the first eigenvectors have almost all the information of the shape variations in 7
1. INTRODUCTION artificial separation of prediction and segmentation by representing the curve as a set of pre-specified points and each of them has an associated velocity. The idea is that the curve should stop when the potential energy is big enough to stop the kinetic energy, so it’s similar to the physical problem. The potential energy of the curve Uis the energy of the original snake formulation (26): U=Z1 0 1 2w1kCpk2+1 2w2kCppk2+g(C)dp (1.18) The kinetic energy is the velocity or inertia of the curveT: T=Z1 0 1 2µkCtkdp (1.19) The Lagrangian is then: L=T−U=Z1 0 1 2µkCtkdp −1 2w1kCpk2−1 2w2kCppk2−g(C)dp (1.20) And we can find the candidate minimizer of the above Lagrangian computing the first variational δL: µCtt =∂ ∂p(w1Cp)−∂2 ∂p2(w2Cpp)− ∇g(1.21) In (43) they extend the formulation proposed by (50) formulating the same equation with a pure geometric representation of the curve and thus overcoming the parameterization drawbacks. Active contours are generally defined for planar curves, recently extensions to 3D active surfaces have also been used for segmenting the LV surface (24). 14
Chapter 2 Aims of the project 2.1 Final aim Our ultimate goal is to develop interactive catheter and ablation guidance strategies for the treatment of Atrial Fibrilation through real time MRI based navigation systems that guide catheter placement and then monitor lesion formation. 2.2 Preliminary aims Our initial goal though is going to be the first step of the big problem. We are going to provide the tools to semi-automatically segment the 4D MRI cardiac datasets and visualize the epicardium wall motion over the cardiac cycle. We want to segment the whole 4D dataset with minimal user intervention. To initialize the algorithm we will place some control points around the heart boundary for the first time instant. Then, we want to refine this rough segmentation and propagate it to segment the heart for the rest of the cardiac phases. 15
2. AIMS OF THE PROJECT 16
Chapter 3 Datasets The 4D MRI datasets that we are going to work with consist of short axis SA images i.e. cross-sectional images of canine hearts transversal to its major axis. For each time instant we have one of this volumetric set of images. Our aim is to segment the heart in each of this time instants and slice locations to reconstruct a 4D model of the epicardium surface. The MRI datasets acquisition parameters are the following : Modality XY res. Z (inter slice res.) temporal res. Dataset 1 MRI 1 mm x 1 mm 4 mm 15 cardiac cycles Dataset 2 MRI 1 mm x 1 mm 6 mm 15 cardiac cycles Table 3.1: dataset table - Dataset characteristics The image acquisition is done by acquiring multiple successive slices for different times within the cardiac cycle. The acquisition is triggered by an ECG signal, and several cycles of the heart must be acquired. Several cardiac images corresponding to the same cardiac phase can be averaged to improve the PSNR (34). The imaging is done on breath hold to avoid respiratory motion. Figure 3.1 illustrates the image acquisition process. The first dataset was acquired after inducing ablation to the dog by radiation procedures. We can observe the lesion formed in the right ventricle of the heart. The second dataset was taken from a healthy heart, pre-ablation. In the figures below 2Figure taken from ”A review of Cardiac Image Registration Methods” (32) 17
3. DATASETS Figure 3.1: MRI ECG gated-SA, Illustration of a classical acquisition of SA images with a ECG-gated cine MR sequence. 2 3.2,3.3 we show a down-sampled version of the datasets. Along the horizontal axis we show the heart variation in time and along the vertical axis we can see it as a sliced volume. In the vertical direction the slices go from the base to the apex, most inferior part of the septum of the heart. In the horizontal direction we can appreciate that the heart is first contracting and then expanding. In the second dataset we can clearly see in the top slices, three distinguished bright ”chambers”. This are the right ventricle tracts on the extremes and the aorta on the middle. Just looking at the data we can guess that one of the main difficulties to segment the heart for each of the time/slice location is the heart shape variation from top to bottom. In addition, all the veins coming out and in of the heart are going to be false contours we must avoid. 18
Figure 3.2: The figure shows various slices for different times and locations-This dataset includes some section of the atriums and all the ventricles to the apex. The bigger circular chamber with thicker walls is the left ventricle and the elongated chamber is the right ventricle. Figure 3.3: Canine heart dataset2-The figure shows various slices for different times and locations 19
3. DATASETS 20
Chapter 4 First Approach 4.1 Geodesic Curves to find the boundary Before working with real data, we worked with a binary heart as a first approach. Start with the easier problem and climb step by step to the difficult problem. The binary heart was obtained from The Center for Cardiovascular Bioinformatics and Modeling. This is a simplification of our problem, the heart walls are white and the rest of the image is black. We will not extend too much with this first part, but we will outline just the most important ideas. We will want to find the epicardium boundary. To achieve this, we will start from an initial contour and will drag it to the heart outer wall. The contour is defined by a spline curve going through a sequence of control points. This is well known as Snakes. The Snake consists in applying 2 forces to the contour. 1. Internal Force : This force drives the curve to its center. 2. External Force : This force should be strong enough to compensate the Internal Force at the boundary location. Our approach is going to be slightly different than the conventional snake algorithm. We know that for the real data, once we’ve found the contour for a pair (ti, zi) we will use it as an initial guess for (ti+1, zi). In other words we will start looking for the contour not very far away from it, so we won’t need more than two iterations to find the boundary. We will interpolate an initial set of points piwith a spline. For each point in the curve C(s) we will look in the normal direction at the gray value of the 21
4. FIRST APPROACH image. The Curve parameterization: C(s)=(x(s), y(s)) s∈ {0, Curve Length}(4.1) and the normal to the curve: −→ N(s) = ∂x(s) ∂s ,∂y(s) ∂s (4.2) The search lines correspond to the blue lines in figures 4.1,4.2. If this line of search crosses the contour we will find a big jump from 0 to 1 if we are outside the heart and 1 to 0 if we are inside. This big transition implies that there is going to be a high derivative at the contour location. So we will only look for high derivative values at each of the lines of search and will move the control points to the contour location. After doing this for all the control points we will interpolate them using splines to find the final contour. In case we have any outliers, points not belonging to the heart boundary, see figure 4.1, we will look for points in the spline with high curvature. We know there shouldn’t be irregularities because the heart is smooth so a point with a high curvature must be an outlier. We will exclude all the points with higher curvature than a certain threshold, this can be seen in figure 4.2. The green line in figure 4.2 is the final contour after excluding the high curvature points. We will exclude the points over two times the mean of the curvature. K(s) = kC0(s)×C00(s)k kC0(s)k3(4.3) Equation 4.3 shows how we calculate the curvature. It tells us how similar to a circumference the curve is locally. We said we looked for the contour in the gradient of the curve direction, but we didn’t specify in which orientation. If we could determine if we are inside the region of interest, in our case the heart walls, we could know what orientation we should take. If we are inside the heart we should look outwards the curve and vice versa, if we are outside our region we should look inwards the curve. This can be seen in figure 4.3. In our simplified problem it is very easy to know if we are inside or outside. If the pixel in question is white we are inside and if the pixel is 22
4.1 Geodesic Curves to find the boundary Figure 4.1: Outlier with high curvature Figure 4.2: High curvature points are erased black we are outside. When we work with real data we will need some estimation of the probability of a pixel belonging to a region. One possible approach would be to model the pdf distribution of the heart walls. Algorithm 1 Drive the contour to the boundary 1: Set of points=p1, .., pi, ..pN 2: Spline Interpolation to the points⇒C(s) = p(s)=(x(s), y(s)) s∈ {0, C.Length} 3: for s= 1 to Ndo 4: Find normal to the curve −→ N(s) = ∂x(s) ∂s ,∂y(s) ∂s 5: LineSearch ≡(xi, yi) = (x(s), y(s)) + −→ N∗wi 6: Pick the pixels r(i) = {I(xi, yi)},∀xi, yi∈LineSearch 7: Find the minimum derivative of the pixel’s grayvalues in the Line 8: argmin i r0(i) 9: Move the point p(s) to the new location (xi, yi) 10: end for 11: Remove points with curvature K(s)≥threshold 23
5. EPICARDIUM SEGMENTATION Figure 5.1: fig-Grayvalue-The figure shows how the gray value at the boundary changes over time and space Figure 5.2: RV fills up-The figure shows how the gray value at the boundary changes over time and space In figure 5.2 we see that the color changes because the right ventricle fills up and expands and we see a much brighter texture in that region. Another difficulty that we have to overcome is that there are a lot of veins and arteries coming out and in the heart. As we are only interested in the heart boundary the curve should our region of interest should exclude the arteries and veins. As we can see in figure 5.3 this is going to be a challenging work because the regions where the Vena Cave comes in the right atrium or the region where the aorta comes out the heart there is no edge at all. Thus, our algorithm should be capable of closing the contour preserving the overall shape even when there is no visible boundary. Another difficulty we will find is the fat stuck to the heart walls, this is going to be a real distractor when looking for the boundary. We can see the fat in figure 5.4. Finally, we will have to deal with our partner present in all engineering problems, noise. 30
5.2 Processing the data Figure 5.3: Contour-closing-Our segmentation should cut the vena cave off the heart Figure 5.4: Fat-Fat stuck to the heart wall at the top of the right ventricle 5.2 Processing the data 5.2.1 Preprocessing As we have seen in section 5.1 the MRI images are noisy and there are a lot of distractors like little veins that appear in the cross sections as bright spots around the contour. We need to clean the image and preserve the heart shape intact at the same time. To achieve this we will use morphological operators to erase the bright spots from the image. To erase the spots we will perform an opening using a disk shaped structuring element of radius 2 pixels se[n], see the result in figure 5.6. We will binarize the output from the opening and will use it as a mask B[n], see figure 5.6. So we will multiply the binary image with the original image pixel by pixel. B[n] = γse(I[n]) = (I[n]Θse[n]) ⊕se[n] (5.1) If[n] = B[n]⊗I[n] (5.2) 31
5. EPICARDIUM SEGMENTATION This way, we erase some of the bright spots in the image, preserving the heart shape and the grayvalue distribution inside the heart remains unchanged. See the final result in 5.8. Figure 5.5: Original image Figure 5.6: Output of opening Figure 5.7: Binary mask Figure 5.8: Final image Figure 5.9: Steps to clean the images 5.2.2 Initial segmentation The first step is to obtain a first estimation of the segmentation for the first cardiac phase to initialize the algorithm. This first segmentation has to be provided by the user. 32
5.2 Processing the data The user will interactively select 6 control points close to the boundary for each slice for the first phase only. Then this points will be interpolated using cubic splines. We will see in the next sections that we will work with ”cylindrical” coordinates because the radial representation of the contours will be more convenient for further processing. Cylindrical coordinates would be useful if a straight line can cross each of the contours close to its centroids. However, as we observe that contours for different slices are misaligned we will use a modification of the cylindrical coordinates. We will warp the major axis of the cylinder so its center line crosses the contours near its centroids, see figure 5.10. Figure 5.10: Curved cylindrical coordinates-The center axis goes by the centroids. The centroids for the first phase are used to parameterize all the phases First of all, we will sample the contours described with splines at 5 degrees of separation as described in section 5.2.3. Then we will find the centroids czas: cz= ( 1 N N X i=1 xz i,1 N N X i=1 yz i, z) (5.3) Once we have found the centroids for all the slices we will fit a 3D parabola to the points. This step is necessary to have all the centroids aligned. All the points of the surface will then be described with respect to this new centroids. Thereby, we will fit a second order polynomial to each of the 3 coordinates of the centroids 5.5. t→(x(t), y(t), z(t)) (5.4) t→(p1(t), p2(t), p3(t)) (5.5) 33
5. EPICARDIUM SEGMENTATION The parameter tvalue for the point is chosen by Eugene Lee’s centripetal scheme, i.e., as accumulated square root of chord length 5.6 just as we did for the spline interpolation. t(i) = i X z=1 pkcz−cz−1k(5.6) The formulation of the linear problem is the following: 1t1t2 1. . . tn 1 1t2t2 2. . . tn 2 1t3t2 3. . . tn 3 . . .. . .. . ..... . . 1tmt2 m. . . tn m a1 a2 a3 . . . an = x1 x2 x3 . . . xn (5.7) Vax=xVay=yVaz=z(5.8) Matrix Vm×nis the Vandermonde matrix and has the form shown in the right hand side of equation 5.7. The tiare the datasites, ais a vector of polynomial coefficients and xis the data. To find the polynomial coefficients the linear problem in 5.8 is solved in a Least Mean Squares fashion for each coordinate. Figure 5.11: The blue dots in the figure correspond to the centroids and the red line is the LMS fit 34
5.2 Processing the data Now that we have found this new centroids that lye in a 1-dimensional smooth line we will find the polar coordinates of each of the contours using them as the centers. 5.2.3 Correct the boundary Now that we have cleaned up the 4D dataset we can proceed to do the segmentation. The statement of the problem is the same as the one in chapter 4. We have an initial crude segmentation for the first frame and we want to refine it and propagate the result to the next frames. We will sample the curve at equally spaced angles with respect to the centroid, in our case we will pick a point at every 5 degrees θi5i 360 starting from north and going clockwise as shown in figure 5.12, see 25 for more details. Figure 5.12: Sampling at 5 degrees separation The radial lines will be our search lines now. We will pick all the pixel locations that belong to the line of search. We know the contour is going to be relatively close to the initial guess so there is no need to look in the whole radial line, we just need to look within a window. We will use a window of 11 pixels, centered in the point of the curve. 35
5. EPICARDIUM SEGMENTATION Figure 5.13: The red curve is the initial guess,the blue lines correspond to the radial search lines, and the curve on left is the grayvalue variation in one of the search lines For each radial line we will look at the grayvalue curve of the 11 pixels in the window, we hope the contour will be sharp enough to be detected by our algorithm. Looking for the heart edge is not an easy task even when we look for it locally as it is the case. In a normal scenario we would expect a jump in the boundary, i.e a high negative derivative if our search lines cross the heart from the inside to the outside. However, in some occasions the grayvalue curve is just the other way around, it jumps from a grayvalue to higher one, this is fairly common in the region where the heart is in contact with the chest of the dog. In some other occasions the border is blurry or noisy with a lot of high edges. Therefore, the derivative will not be enough. To overcome this problem we will first interpolate the grayvalues with a variational spline curve to find more precise curve features than applying direct discrete operators to the 11 point curve. We want to make sure we don’t move our points inside our region of interest, so we will look for the points where we find a knee of the second derivative. The knee of the second derivative indicates us a border because the curve is decreasing fast before the border and losing slope after the border. So we will pick the points where a knee of the second derivative is present as a possible candidates. The grayvalue curve as a function y=f(x). We will then choose the candidate that minimizes a cost function build by five terms: argmin x∈W indow w1 d2y dx2−w2 dy dx −w3y−w4|r(x, θi−1)−r(x, θi)|+w5cos α(5.9) 36
5.2 Processing the data 1. Second derivative: We want this term to be as high as possible 2. First derivative: We want this term to be as low as possible 3. Grayvalue In most of the cases the term should be low, although not always 4. Smoothness term: The radius of consecutive points in the curve shouldn’t change too much 5. Image gradient: The image gradient should be collinear with the normal direction of the contour. We approximate the normal with the radial direction. The terms are controlled by the vector of weights w= (w1, w2, w3, w4, w5) and all the features are normalized so they span [0,1]. Let M, m be the maximum and the minimum of Xrespectively, to make Xspan [0,1] we will apply the following normalization: ˆ X=X−m M−m(5.10) We included the smoothness term in the pay function because we know the radius variation shouldn’t have discontinuities, so this term will penalize edge distractors like veins because this would make the radius make a jump. This term will help us find the contour, even when there is no contour, by following the shape trend of the previous curve points. With this cost function we don’t exclude completely the regions with positive derivative, we penalize them but they still have a chance to be selected. In Figure 5.14: Figure shows how the boundary point is selected 37
5. EPICARDIUM SEGMENTATION figure 5.14 we see how the boundary location scores well in the first three terms of the cost function. The jumps of the third derivative (black line) will give us the location of the second derivative knees. So to find them we are actually looking at high fourth derivative values. We can also appreciate that in the border we see this slope decrease we explained before. If we just looked for high derivative values like most edge detectors do we would cut some pixels of the heart off because the slope hasn’t reached the bottom yet. The image gradient term is used to avoid local minima of the cost function. At the boundary of the heart the normal direction of the contour and the image gradient must be collinear. Since the heart shape is elongated its normal direction and the radial direction will be very similar. Therefore, we will use this radial lines to compare them with the image gradient. A high projection of the image gradient to the radial is a high indicative that we are at the boundary. For that reason we included the projection term cos αinto the cost function. cos α=~r ·~g krk kgk(5.11) Equation 5.11 shows how the projection of the image gradient gand the radial direction ris computed. The image gradient ~g is found using the Sobel filter for the horizontal and vertical directions. In figure 5.15 we can see that the red dots indicate the points where the boundary is not clearly identifiable. With this boundary strokes the best we can do is to interpolate the curve, so we want only the smoothing term to influence in the decision. Therefor, the point that minimizes the smoothing term will be chosen for that locations. 5.2.4 Curve parameterization and FFT Once we’ve found all the boundary points we will obtain a rough curve around the heart boundary. We are looking locally at contour edges so although we have a smoothness term in our pay function, we obtain a curve with irregularities. There are 72 guesses for each slice-time, we can’t expect them all to be perfectly correct and congruent with each other. This is fairly common in these kind of problems. Humans find the boundaries of objects globally, we close the contour if necessary and visualize a smooth and continuous contour around the objects. Consequently, we will impose smoothness to this 72 guesses at each contour. Because of the elliptical shape of the heart we realized 38
5.2 Processing the data Figure 5.15: Image gradient Projection-The blue arrows indicate the gradient directions. The red dots indicate the points where the projection of ~g over ~r is less than 0.6 that Fourier coefficients are well suited for reducing and constraining the dimensionality of our problem. We know the heart boundary must be smooth without jumps, so we should be able to express the contour as a sum of a few Fourier Coefficients, 4 or 5 maximum. If we needed more coefficients would mean that our curve is not correct, because only a lot of Fourier coefficients are needed to represent more complex curves. So first of all, we will transform our coordinates, (xi, yi) to (ri, θi). We find out when we plot ri(θi) that is a noisy sum of sinusoids, see the plot on the left of figure 5.16. (Actually it was after plotting radius versus angle that we thought it could be useful to us Fourier.) Second of all we find the first NcFFT coefficients of the curve radius. Rk= N−1 X n=0 rne−2πi Nnk k= 0, . . . , Nc −1.(5.12) Given that rnare real: RN−k=R∗k(5.13) 39
5. EPICARDIUM SEGMENTATION 5.2.7.1 Velocity computation The movement of the heart is defined by a matrix that we will call velocity matrix. The rows of this matrix are the velocities of each node and the columns are the velocities of a node at each temporal instant. So V(n, t) or V(θi, t) if you prefer is determining how the node n has to move at time t to reach time t+1. As a first approach we calculated V(n, t) as a motion vector parallel to the normal of the curve at n. This way to work out the velocities is computationally more expensive and leads to errors because it’s too sensitive to the curve slope. We will rather find the radial velocities since we already have the points evenly angled sampled. V(n, t) = r(n, t) r(n, t −1) (5.27) We will find V(n, t) as in equation 5.27. You may have appreciated that V(n, t) is not a velocity, is a scaling a-dimensional, the actual velocity would be calculated as V(n, t) = r(n, t)−r(n, t −1). We choose the scaling factor instead of the velocities because the scaling is scale invariant which in our case is desirable because we are propagating the velocities from one slice location to the above or below one. So, if we define the matrix of N nodes by T frames Rwith elements r(n, t), to find the vector of scalings viwe just need to divide the row i+ 1 with the row i.viis going to be the vector to go from the contour ito i+ 1. Thereby each of the T−1 rows of the matrix V will tell us how to move from time tto time t+ 1. V=v1v2· · · vT−1(5.28) Observing the data we can differentiate three phases in a cardiac cycle, the sistole, when the hear is contracting, the diastole when the heart is expanding and a state in which the heart is relaxed. For example, for the second dataset for which we have 12 frames per cycle we can classify the frames in the following categories: •Frames 12,1,2,3,4: Sistole •Frames 5,6,7,8,9: Dilation •Frames 9,10,11: Relaxed 46
5.2 Processing the data According to this, the velocity matrix should describe this movement; if we look at equation 5.27 it is pretty straightforward to induce how the trajectory of node should be. When the heart is contracting the velocity scaling should be less than one , when the heart is expanding the velocity should be greater than one and when the heart is relaxed it should be equal to one. V(n, t)<1 =⇒Heart Contracting (5.29) V(n, t)<1 =⇒Heart Expanding (5.30) (5.31) Looking at equation 5.31, and taking into account the previous frame classification the plot of V(ni, t) versus time should be similar to a parabola with its tip on frame 7 or 8. In figure we have plotted the surface of the whole velocity matrix, one axis are nodes or angles, and the other axis are time. If the heart contraction and dilation were perfectly uniform, the surface should be a parabola in the time and more or less constant in angle or node dimension through the nodes. Unfortunately, the heart mechanical motion is not that easy. We can see in figure 5.23 that some of the nodes trajectories follow the pattern described, but some of them follow more complex trajectories. Figure 5.23: Surface of the velocity matrix We have plotted in figure 5.23 the plane at one cutting the surfaces in two halves. Ideally the frames over the plane correspond to the diastolic phase and the frames below 47
5. EPICARDIUM SEGMENTATION correspond to the siastolic phase. The velocity matrix corresponds to a cross-section of the upper part of the ventricles. 5.2.8 The code Algorithm 2 Find and track the heart boundary 1: Given a rough segmentation of the first cardiac phase, C(0) z 2: for z= 1 to Nslices do 3: for t= 1 to Nframes do 4: Find the estimate: C(t−1) z Vz −→ ˆ C(t) z 5: Correct the estimated contour: ˆ C(t) z Vz −→ C(t−1) z 6: end for 7: Smooth the node trajectories in time 8: Find Vz 9: Use Vzas an estimate of Vz+1 −→ ˆ Vz+1 =Vz 10: end for 48
Chapter 6 Heart Surface Reconstruction 6.1 M-Tensor Product Splines Once we have segmented the heart for all the slices and frames, we want to visualize the 4D data as a surface representing the heart beat. We will use the algorithm used in section Surface Rendering to connect the points from all the different contour layers. As you may have expected the surface with no post-processing after the segmentation doesn’t look perfect. We have smoothed each single contour with elliptical Fourier filtering and time with polynomial fitting. The stacking of all the segmented contours is not smooth at all. We have found the contours at each slice location separately, so it’s not a surprise that the pieces of the puzzle don’t match perfectly. We know the heart is smooth in all the dimensions, x,y,z,t. So we have a cloud of 4D points p(x, y, z, t) and we want to fit a smooth hyper surface, a set of time surfaces, to them. Because of the shape of the heart it is going to be more convenient for us to work with cylindrical coordinates, spherical can work as well. The point is that instead of smoothing a d-valued function we will smooth a 1-valued function. To achieve that, we will consider the representation of the points as a radial function dependent on three parameters, angle, z height or slice location and time as shown in equation 6.1. R(θ, z, t) = f(θ, z, t) (6.1) Remember that we have a point at every 5 degrees of each contour. So in total we have 72∗Nslices∗Nframes points. Now each value of the function R(θ, z, t) at (θi, zi, ti) is the radius riof the point respect to the centroid of the contour at (zi, ti). The radius of 49
6. HEART SURFACE RECONSTRUCTION the points with respect to its respective centroids shouldn’t change too much between adjacent points in any of the three dimensions. Figure 6.1: We need to smooth the radius of the points in the 3 dimensions So we will arrange this radius in a 3D matrix in a way such that all the points in the matrix have its physical neighbors as shown in 6.1. That means that the points are ordered in a matrix such that the real connectivity between them is preserved. The columns of the 3D matrix will be the contours for different slices and times. Starting with the first time-slice contour C(t=1) (z=1) =rwe will fill up the columns of the matrix with all the slice and time contours until C(t=T) (z=N)=r. Following the notation, C(t) z= {r1, r2, . . . , rn}where each contour is a vector of radius now, the matrix would have the form shown in figure 6.2. We will use m-tensor product smoothing splines to smooth Figure 6.2: 3D matrix structure 50
6.2 Smoothing splines this hypersurface. We can’t use a simple cubic box or an spherical Gaussian filter to smooth the 3D data because we would spread the outliers. An m-tensor product smoothing spline will take the multivariate data as a product of functions. R(θ, z, t) = f(θ)g(z)h(t). It will smooth coordinatewise the data and then will take the product of each smoothing spline weighted by some coefficient matrix to approximate the data sites. The problem of smoothing multivariate data is very similar to univariate data, so we will explain for the one-dimensional case and then extrapolate it to the multivariate case is going to be obvious. 6.2 Smoothing splines The statement of the problem is as it follows; we have a set of data points y=g(x)+ni that follow a smooth function g(x) and are corrupted by some random unknown noise product of our algorithm n. We are interested in recovering g(x) so we will project our data to a subspace of polynomial functions. We want to find a basis that can represent g(x) but can’t follow the fast noise. We choose piecewise cubic polynomial functions with some constraints to approximate our points. Given a set of points (xi, g(xi) + ni) we would construct the following function: f(x) = Pi(x)xi≤x<xi+1 (6.2) i∈0, . . . , n Pi ∈P3(6.3) The function f(x) minimizes the following expression: p N X j=1 w(j)|y(j)−f(j)|2+ (1 −p)Z|f00(x)|2dx (6.4) The first term of the cost function controls the accuracy of f(x) i.e. how close to the points we are, and the second term forces f(x) to be smooth. We have a trade off between accuracy and smoothness. The choice of p depends on which of this two conflict goals we accord the greater importance. For p= 1 we would obtain the least squares line fit to the data. Besides this constraint we will impose that f(x) is twicely 51
6. HEART SURFACE RECONSTRUCTION differentiable, f(x)∈C2. This gives rise to the following set of equations: Pi−1=Pix=g(xi) (6.5) P0 i−1(xi) = P0 i(xi) (6.6) P00 i−1(xi) = P00 i(xi) (6.7) (6.8) At the break points of f(x) the function, first and second derivative have to match. Polynomials Pimay be expressed in Newton form: Pi(x) = ai+bi(x−xi) + ci(x−xi)2+di(x−xi)3(6.9) Inertially we have 4 degrees of freedom for each polynomial ai, bi, ci, di, if we impose the smoothness constraints 6.6,6.7,6.8 we only have one degree of freedom. Hence we will express all the polynomial coefficients as a function of aiand find the ai that minimize the cost function in equation 6.4. Applying the continuity constraint 6.6 to 6.9 we find the following expression for bi: bi=∆ai ∆xi −ci(∆xi)2−di(∆xi)3(6.10) With ∆xi=xi+1 and ∆ai=ai+1 −ai. Forcing the second derivative continuity 6.7 gives us the following expression for di: ci+ 3di∆xi=ci+1 (6.11) di=1 3∆xi (ci+ 1 −ci) (6.12) Using 6.10 and 6.12 we can express bias: bi= ∆xi=xi−2 3∆xici−1 3∆xici+1 (6.13) Applying the second derivative continuity constraint 6.13 gives us the equation: bi−1+ 2∆xi−1ci−1+ 3(∆xi−1)2di−1=bi(6.14) 52
6.2 Smoothing splines Using 6.12,6.13 and simplifying we find the following relationship between the ci and the ai: ∆xi−1ci−1+ 2(∆xi−1+ ∆xi)ci−1+ ∆xici+ 1 = 3 ∆ai ∆xi −∆ai−1 ∆xi−1(6.15) Where Rf is a symmetric triangular matrix with general row: [∆xi−1,2(∆xi−1+ ∆xi,∆xi] We can write this relationship in a matrix form: Rc =3QTa(6.16) and QTthe tridiagonal matrix with general row: [1/∆xi−1,−1/∆xi−1−1∆xi,1/∆xi] The relationship between band acan also be written in matrix form: b=Wa −Zc (6.17) where Wn×n= −1 ∆x0 1 ∆x0. . . 0 −1 ∆x1 1 ∆x1 . . . . . ....... −1 ∆xn−2 1 ∆xn−2 0. . . −1 ∆xn−2 1 ∆xn−2 (6.18) and Zn×n−2=1 3 ∆x0. . . 0 2∆x1∆x1 . . . ...... . . . 2∆xn−3∆xn−3 2∆xn−2 0. . . −∆xn−2 (6.19) Using 6.16 we can finally write b as a function of just a: b= (W−3ZR−1QT)a=Fa (6.20) where F= (W−3ZR−1QT) 53
6. HEART SURFACE RECONSTRUCTION (6.21) Now, that we have found all the parameters in terms of a, we will construct the linear system of equation 6.4 and will find the solution in terms of a. Over each interval the smoothness term in 6.4 is the integral of the square of the line (2ci+ 6di(x−xi)2) (second derivative of 6.9). Since for any straight line l: Zh 0 l2(x)dx = (h/3)(l2(0) + l(0)l(h) + l2(h),(6.22) We can write the integral term as (1 −p)Zxn−1 x0 |f00(x)|2=4 3(1 −p) n X i=0 ∆xi(ci+cici+1 +c2 i+ 1) (6.23) And writing the cost function in 6.4 S=p(y−a)TD−2(y−a)+(1−p)cTRc (6.24) expressing c in terms of a 6.16 (6.25) S(a) = p(y−a)TDp−2(y−a) + (1 −p)(R−1QTa)TR(R−1QTa) (6.26) Because Dand (R−1QTa)TR(R−1QTa) are positive semidefinite. the cost function is minimized when asatisfies 12(1 −p)(R−1QT)TR(R−1QTa)−2pD−1(y−a) = 0 (6.27) Isolating a (6.28) 12(1 −p)(R−1QT)TR(R−1QT) + 2pD−1a=pD−2y (6.29) and we solve the linear system (6.30) Ax =y(6.31) Once we know awe can find b, c, d with equations 6.176.166.12 respectively. For further details we refer to (9) 54
6.2 Smoothing splines Finally, once we have the smoothing spline for each dimension we will take the m-tensor product of them. R(θ, z, t) = f(θ)g(z)h(t) (6.32) This can be thought as a gridded cube such that its axis smoothly deform to get close to the data. Then the datasites are approximated by the geometric average of each of this curved axis that cross them. We can see the resulting radius of the nodes before and after the smoothing for a constant time t=cnt in figures 6.3 and 6.4, and for θ=cnt in figures 6.5 and 6.6 respectively. Figure 6.3: Radius 3D matrix crosssection for t=tibefore smoothing splines Figure 6.4: Radius 3D matrix crossection for t=tiafter smoothing splines Figure 6.5: Radius 3D matrix crossection for θ=θibefore smoothing splines Figure 6.6: Radius 3D matrix crossection for θ=θiafter smoothing The 3-D radius matrix cross-section for a constant time can be regarded as the heart surface for a certain phase 6.4. Consequently we are looking at the parameterized heart 55
7. RESULTS Figure 7.6: Epicardium and LV surfaces and contours-The figure shows the result of the segmentation for different slices 9 and 15 in the vertical direction. The cardiac phases correspond to mid-systole, end-systole, mid-dyastole, end-dyastole 62
Figure 7.7: Epicardium wireframe in red and LV surface in blue Figure 7.8: View1: Epicardium and LV surfaces Figure 7.9: View2: Epicardium and LV surfaces Figure 7.10: View3: Epicardium and LV surfaces 63
7. RESULTS Figure 7.11: We can perfectly see the LV in this vertical cross-section Figure 7.12: LV mesh along with the data Figure 7.13: LV after adding faces to the mesh Figure 7.14: Mesh of both the epicardium in red and the LV in blue 64
Figure 7.15: Long axis cross-section Figure 7.16: Long axis cross-section along with the epicardium wireframe Figure 7.17: 3D heart surface overlapped to the data Figure 7.18: 3D heart surface from a different view 65
7. RESULTS Figure 7.19: Long axis cross-section with LV surface in blue Figure 7.20: Epicardium and LV surfaces, we can see how they fit the data for Figure 7.21: Epicardium and LV wireframe models intersecting a short axis image Figure 7.22: Epicardium wireframe and LV surface, we can clearly see how the aorta comes out the LV surface 66
Chapter 8 Discussion and Future Work 8.1 Conclusions We have briefly presented a review of the current approaches for epicardium and endocardium segmentation and discussed the advantages and disadvantages of them. We shortly reviewed the anatomical background and outlined special properties of cardiac MRI data. The successfully achieved goals of this thesis are listed below: •We have presented a method for segmenting the epicardium in 4D cardiac MRI datasets that exploits the spatial and time dependencies of the heart. •Our method can track the epicardium with an error of less than 2 mm with very little user interaction. We have seen that the segmented surfaces are space-time consistent. •We have adapted our method to segment the left ventricle with very little modifications obtaining acceptable results. •We have presented the results obtained for the segmentation of the epicaridum and the left ventricle. This surfaces have been displayed in cine sequences to visualize the dynamics of the epicardium and LV together. •Both surfaces, epicardium and LV are time and space consistent with no irregularities. 67
8. DISCUSSION AND FUTURE WORK Future work will be the validation and improvement of the method and extensions to make it suitable for cardiac surgery interventions. This will include the following issues: 8.2 Reducing the complexity To obtain the final surfaces our methods goes through a series of steps. Each of this steps introduces a small undesirable bias, every data fitting step assumes the data lies within a certain class. Although we can not see this artifacts in our results, it can be a problem when the method is applied to other datasets. Therefore we will study the possibility of reducing the number of steps. In our algorithm we find all the contours for a certain slice location we smooth the time trajectories of the nodes and learn the dynamics from there. Instead we could jump the time trajectories smoothing step, learn the dynamics from the noisy data and smooth the resulting velocity matrix. Then the time inconsistent data is going to be smoothed in the final step with the time-space smoothing. 8.3 Initialization of the algorithm In this thesis we have assumed that an initial rough segmentation estimate was given. We could make the process fully automatic if we find a first segmentation estimate close enough to the actual boundary. In (46) they make use of the temporal correlation between images to initialize a snake. If we analyze a certain slice location and we look at the time variance in the pixel domain, we will see that the heart pixels will have in general a higher variance than background pixels. This is due to the wall motion of the heart during contraction and due to the heavy blood flow inside the heart. Vz=1 T T X t=1 (It z−Mz)2(8.1) where Mz is the mean image: Mz=1 T T X t=1 It z(8.2) We have experimentally proved that the variance is not discriminative enough to find a good initial guess for all the slices. Hence we will study the possibility of using 68
8.4 Shape priors area and region based (33) similarity measures between adjacent variance images to find a consistent heart volume. This initial heart volume will serve as an initialization. 8.4 Shape priors Our method makes no assumption about the heart shape. This is has the advantage of being general enough to work better with substantially different heart shapes in comparison with template based (55) or model based (7; 8; 23; 47; 48; 57) approaches. However, our method struggles with the base and the apex of the heart. At the base the aorta occludes the boundary and at the apex the heart boundary is very difficult to detect even for a human eye. Therefore we will include shape priors to the method (15; 20; 27; 44) for the correct segmentation of base and apex slices. We will include also shape priors to deal with the papillary muscle present in the left ventricular interior wall. 8.5 Include heart rotation and axial shortening to the model Our algorithm models very well the radial movement of the heart. However the surfaces don’t model the heart rotation and twisting nor the axial shortening towards the apex. We plan to include this to movements in our segmentations. Right now our contours are parameterized using Fourier coefficients, so we have information about phase available. Note that a linear shift of Φ in the phase of the coefficients represents a rotation in the contours of Φ degrees. Thus we can easily find the Φ that minimizes the distance between two consecutive slices. We can combine this with a minimization of the grayvalue sum of squared differences SSD at the node locations. 8.6 Respiratory motion The pre-operative datasets where acquired using ECG-gated cine MR on breath hold. This requires to have the patients retain their breath during 15-20 seconds which makes 69
8. DISCUSSION AND FUTURE WORK it implausible for intra-operative image acquisition. We want to extend our algorithm to be capable of compensating the moving artifacts due to the motion of respiration. Biplane coronary angiograms have been used to recover the 3-D displacements due to respiration using stereo reconstruction (11; 36). A parametric motion model is used to separate cardiac and respiratory motion fields. 8.7 2D-3D geometric based registration Our final goal is to register the intra-operative images with the pre-operative model. Due to patient’s body position and acquisition inaccuracies the pre-operative model is misaligned with the intra-operative images. Before doing the 2d-3D registration we need to align the coordinates of the model to those in the operating room. Therefore, a first registration using skin markers or by an ultra-sound based registration of the ribs of the patient to those in the model (21) must be done first. Registration of coronary angiograms (13) has also been proposed for model-to-operative environment alignment. Such registration step provides a suitable starting point for the 2D-3D registration. The time alignment will be done using an external marker, ECG signal. Then an efficient 2D-3D registration algorithm based on geometry features (1; 19) will be used. We want to make use of the desirable rotational properties of Fourier descriptors to register the 2D contour of the intra-operative images with the 3D surface model. 70
References [1] 2d-3d registration based on shape matching. 70 [2] Veress AI, Segars WP, Weiss JA, Tsui BM, and Gullberg GT. Normal and pathological ncat image and phantom data based on physiologically realistic left ventricle finite-element models. IEEE Trans Med Imaging, 2006. [3] Ben Appleton. Optimal geodesic active contours: Application to heart segmentation. pages 27–32. APRS Workshop on Digital Image Computing, The University of Queensland, 2003. 10, 13 [4] P.J. Besl and N.D. McKay. A method for registration of 3-d shapes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 14(2):239–256, 1992. 4 [5] Gunilla Borgefors. Distance transformations in digital images. Comput. Vision Graph. Image Process., 34(3):344–371, 1986. 4 [6] Xin Chen, Martin R. Varley, Lik-Kwan Shark, Glyn S Shentall, and Mike C. Kirby. ”an extension of iterative closest point algorithm for 3d-2d registration for pre-treatment validation in radiotherapy”. MediVis06, 2008. 4 [7] Haili Chui and Anand Rangarajan. Unsupervised learning of an atlas from unlabeled point-sets. IEEE Trans. Pattern Anal. Mach. Intell, 26:160–172, 2001. 6, 9, 69 [8] T. F. Cootes and C. J. Taylor. Active appearance models. In IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 484–498. Springer, 1998. 6, 69 71