Build a 4D MRI blood-flow velocity atlas
Abstract
Cardiovascular disease (CVD) are the global number one cause of death. The current diagnosis of CVD is mainly based on functions and morphology. We have built a statistical vector field model based on 4D flow MRI, by applying real/quaternion PCA to get the mean and main variations of the blood flow.
Full text
Universitat Polit`ecnica de Catalunya (UPC) - BarcelonaTech Facultat d’Inform`atica de Barcelona (FIB) Master in Innovation and Research in Informatics Final Master Thesis Report Build a 4D MRI Blood-flow Velocity Atlas Submitted by Hongping Feng Advised by Dr. Anna Vilanova Department of Computer Graphics & Visualization Group Delft University of Technology Tutored by Llu´ıs A. Belanche Computer Science Department Universitat Polit`ecnica de Catalunya (UPC) - BarcelonaTech 18th June, 2019
Abstract Cardiovascular diseases(CVDs) are the global number one cause of death. Current diagnosis of CVDs is mainly based on functions and morphology of cardiovascular structures. Magnetic resonance imaging (MRI), especially the 4D flow MRI has become a new and powerful tool for CVD diagnosis, which allows both anatomical and functional analysis in a single measurement. However, it is still difficult to efficiently utilize this data source to diagnose CVDs. One of the main reasons is the lack of standard analysis and understanding of this rather new imaging modality. The common method to understand the healthy behaviour and its variation is to build an atlas. Current blood flow atlas does not support 3D velocity vector field full information. We have built a statistical vector field model (SVFM) based on 4D flow MRI, which is similar to statistical shape and appearance models by applying Principal Component Analysis (PCA) to get the mean and main variations of the blood flow fields. The visualization of this atlas would help physicians understand the 4D MRI data and assist them to identify whether the data is abnormal or not. In order to get more efficient representations of variations for vector fields, we also tested Complex PCA and Quaternion PCA, besides traditional Real PCA. Finally, we visualize the results such that they can be interpretable. 1
Acknowledgement Firstly, I would like to sincerely thank my thesis supervisor, Dr. Anna Vilanova, for helping me with kindness and patience in the registration process, and providing me invaluable guidance throughout the whole research process. I really enjoy the time discussing with you every week, and feel grateful for your effort helping me tackling every obstacle I encountered during the project. I also want to thank my thesis tutor, PhD. Llu´ıs A. Belanche, who is so kind to agree to accept me as his student and give me guidance on my thesis. I would like to thank PhD. Klaus Hildebrandt, who has provided me a lot of help solving the problems with PCA. I would like to thank Ruud de Jong, who is so nice and has helped me solve the installation problems of Elastix. I want to thank David Gobbi, who is so patient and knowledgeable, helping me solve the problem of building vtk from source when I wanted to use Tkinter to embed vtk rendering. I also want to thank Mrs. Inge Grootjans from TUDelft international office, and Carol and Ginesta from FIB, UPC, in guiding me to successfully finish the registration process in TuDelft. Finally, I want to thank my parents, who are always supportive for everything I am dedicated to do and every audacious decision I have made. 2
Contents 1 Introduction and Motivation 8 1.1 Background ............................. 8 1.2 Motivation.............................. 9 1.3 MainObjective ........................... 10 1.4 Challenges.............................. 10 1.5 Principal Contributions . . . . . . . . . . . . . . . . . . . . . . . 11 1.6 ThesisStructure........................... 11 1.7 Specification............................. 12 2 Related Work 13 2.1 4D MRI Blood Flow Data . . . . . . . . . . . . . . . . . . . . . 13 2.2 Traditional PCA and Applications . . . . . . . . . . . . . . . . . 14 2.2.1 PCA in Statistical Shape Models (SSM) . . . . . . . . . 15 2.3 ComplexPCA............................ 17 2.4 QuaternionPCA .......................... 18 2.4.1 Quaternions Algebra . . . . . . . . . . . . . . . . . . . . 19 2.4.2 Quaternions Matrix . . . . . . . . . . . . . . . . . . . . . 20 2.4.3 SVD of a Quaternion Matrix (QSVD) . . . . . . . . . . . 21 3 Dataset 23 3.1 RealVessels............................. 23 3.2 Synthetic Curved Tubes . . . . . . . . . . . . . . . . . . . . . . 23 3.2.1 Overview .......................... 23 3.2.2 The Method of Generating Curved Tubes . . . . . . . . . 24 4 4D Flow Atlas Generation 27 4.1 Overview............................... 27 4.2 Registration of Vector Field Data Volumes . . . . . . . . . . . . 28 4.2.1 Temporal Maximum Intensity Projection (tMIP) . . . . 29 4.2.2 Image Registration . . . . . . . . . . . . . . . . . . . . . 30 4.2.3 Velocity Reorientation . . . . . . . . . . . . . . . . . . . 32 4.3 Masking ............................... 34 4.4 Building a Statistical Vector Field Model (SVFM) . . . . . . . . 34 4.4.1 Representation of a Blood Flow Velocity Vector . . . . . 34 4.4.2 RealPCA.......................... 35 4.4.3 ComplexPCA........................ 36 4.4.4 Quaternion PCA . . . . . . . . . . . . . . . . . . . . . . 37 4.4.5 The Effect of Rotation . . . . . . . . . . . . . . . . . . . 39 4.5 4D Flow Visualization . . . . . . . . . . . . . . . . . . . . . . . 43 5 Implementation 46 5.0.1 Mathematica ........................ 46 3
5.0.2 Elastix............................ 46 5.0.3 SimpleITK.......................... 47 5.0.4 Numpy............................ 47 5.0.5 vtk8.2............................ 48 5.0.6 ParaView .......................... 48 5.0.7 qt 5.9 in Python and Qt Designer . . . . . . . . . . . . . 48 6 Result 49 6.1 QPCAtheorytest.......................... 49 6.2 Experiments of Synthetic Dataset . . . . . . . . . . . . . . . . . 50 6.2.1 Preprocessing ........................ 50 6.2.2 RPCAandQPCA ..................... 50 6.2.3 Interpretation........................ 53 6.3 Experiments of Real-world Dataset . . . . . . . . . . . . . . . . 57 6.3.1 Sub-Volume Selection . . . . . . . . . . . . . . . . . . . . 57 6.3.2 Registration and Reorientation . . . . . . . . . . . . . . 58 6.3.3 Masking........................... 58 6.3.4 RPCAandQPCA ..................... 58 6.3.5 Interpretation........................ 59 7 Conclusion 65 7.1 Main Findings and Implications . . . . . . . . . . . . . . . . . . 66 7.2 FutureWork............................. 67 A Appendix 72 A.1 GUI ................................. 72 A.2 Visualization of 3rd Time Step of Real Vessels using Glyphs . . . 73 A.3 Visualization of 6th Time Step of Real Vessels using Glyphs . . . 74 A.4 Parameters of the Real Vessels . . . . . . . . . . . . . . . . . . . 75 4
List of Figures 2.1 4D MRI blood flow data . . . . . . . . . . . . . . . . . . . . . . 14 2.2 Variation of mean shape. Adopted from the paper [20]. . . . . . 16 2.3 The mean shape and shape instances generated from the first four eigenvectors for the real, complex shape representations of human face. Adopted from the paper [26]. . . . . . . . . . . . . 18 3.1 3D blood flow visualization in the thoracic aorta . . . . . . . . . 24 3.2 Six examples of synthetic tubes . . . . . . . . . . . . . . . . . . 24 3.3 B´ EZIERcurve............................ 25 3.4 Created stream flow, vortex and helix . . . . . . . . . . . . . . . 26 4.1 The four steps of the proposed solution . . . . . . . . . . . . . . 28 4.2 Population-based atlas construction . . . . . . . . . . . . . . . . 32 4.3 Velocity reorientation flow . . . . . . . . . . . . . . . . . . . . . 33 4.4 The signs of eigenvectors in RPCA could be different in different methods, but they could represent the same eigenvectors. . . . . 36 4.5 The angles of eigenvectors in CPCA could be different in different methods, but they could represent the same eigenvectors. . . . . 37 4.6 The angles of eigenvectors in QPCA could be different in different methods, but they could represent the same eigenvectors. . . . . 38 4.7 The representations before and after Rotation using the first eigenvector calculated in RPCA and CPCA . . . . . . . . . . . 41 4.8 Glyphs of the thoracic aortas . . . . . . . . . . . . . . . . . . . 44 4.9 Streamlines of the thoracic aortas . . . . . . . . . . . . . . . . . 45 6.1 Explained variance in RPCA and QPCA for simulated data . . 49 6.2 Explained variance in RPCA and QPCA for synthetic tubes . . 51 6.3 Reconstruction experiments of RPCA and QPCA . . . . . . . . 52 6.4 Reconstruction experiments using 10, 12, 18 samples . . . . . . 53 6.5 Variation of mean volume of 24 synthetic tubes from RPCA . . 54 6.6 Variation of mean volume of 24 synthetic tubes from QPCA . . 55 6.7 Variation of mean volume of 6 synthetic tubes from RPCA . . . 56 6.8 Variation of mean volume of 6 synthetic tubes from QPCA . . . 57 6.9 Explained variance in RPCA and QPCA for thoracic vessels . . 59 6.10 Reconstruction experiments of RPCA and QPCA . . . . . . . . 60 6.11 Variation of mean volume of five thoracic vessels from RPCA usingstreamlines .......................... 61 6.12 Variation of mean volume of five thoracic vessels from QPCA usingstreamlines .......................... 62 6.13 Variation of mean volume of 5 thoracic vessels from RPCA . . . 63 6.14 Variation of mean volume of 5 thoracic vessels from QPCA . . . 64 A.1 GUIpanels ............................. 73 A.2 Three additional parameter panels of the GUI . . . . . . . . . . 74 5
A.3 Variations of five thoracic vessels in the 3rd time step from RPCA 74 A.4 Variations of five thoracic vessels in the 3rd time step from QPCA 75 A.5 Variations of five thoracic vessels in the 6th time step from RPCA 76 A.6 Variations of five thoracic vessels in the 6th time step from QPCA 77 6
List of Tables 6.1 Relationship of real and quaternion eigenvectors . . . . . . . . . 54 A.1 Key parameters of thoracic aortas (1) . . . . . . . . . . . . . . . 75 A.2 Key parameters of thoracic aortas (2) . . . . . . . . . . . . . . . 76 7
Chapter 1 Introduction and Motivation 1.1 Background According to World Health Organization(WHO) report in 2017, cardiovascular disease (CVD) is the global number 1 cause of death annually, which take away 17.9 million people’s lives every year, accounting for 31% of all global deaths. CVD is expected to be the major cause of mortality in most developing nations by 2020 [34]. What is a cardiovascular disease? We human bodies are composed of various organs, which ensure our homeostasis and viability. The cardiovascular system (also called the circulatory system) is an organ system that comprises the blood, heart and blood vessels. Pumped by the heart, the vessels permit blood to circulate and transport nutrients and oxygen to and waste materials away from all body tissues. Arteries move blood away from the heart and veins return it. Lymph vessels are part of a cleaning system that removes damaged cells from human bodies and protects the body from infections and cancer. Any condition affects this system is regarded as a vascular disease. The diseases range from problems with people’s arteries, veins, and vessels that carry lymph to disorders that affect how blood flows. A disease can limit the flow of oxygen-rich blood to the human body organs and other parts of the human body, called atherosclerosis, which can lead to serious, even life-threatening problems, including heart attack, stroke, or even death. There are also many other types of vascular diseases, such as cerebrovascular disease, peripheral arterial disease. Vascular diseases are caused due to a variety of reasons, and many of them can be prevented with healthy living habits, such as reducing tobacco use, having a healthy diet and engaging in physical activity [34]. Also, early detection and health management can help prevent and reduce acute problems, mainly heart attack and stroke. Therefore, in order to save more lives and improve the quality of life, early detection and health management are essential for people at high risk of vascular diseases. However, since a person may have various symptoms, it may be difficult to diagnose the vascular disease. Usually, a detailed analysis of blood flow in the heart and vessels is needed in order to acquire a thorough understanding of the underlying pathomechanisms, using data from tests such as Cardiovascular Magnetic Resonance Imaging (MRI). MRI is a powerful technique which uses magnets and radio waves to form pictures of organs inside human bodies. MRI has undergone substantial develop- 8
The primary goal of PCA is to explore the hidden information and identify the inherent patterns of the dataset, such as different poses or expressions presented in the eigenface. In PCA, information is variance. The basic idea of PCA is to use orthogonal projection of data onto a lower dimensional space, such that the variance of projected data is maximized [15]. The new set of variables, called the principal components (PC) in the new space, are uncorrelated. If there are nobservations with pvariables, then the number of valid principal components is min(n−1, p). A valid PC is corresponding to a positive eigenvalue. The first principal component captures the largest amount of variance presented in the dataset. Each subsequent component has the highest possible variance under the constraints orthogonal to the previous components. Another important linear algebra concept is the singular value decomposition (SVD). PCA and SVD are closely related. SVD, regarded as a more general form of PCA, can also be used to find the principal components that we want in PCA. PCA requires the matrix to be symmetrical, square, positive and semi-definite, which are the properties of covariance matrix [25]. While, SVD can factorize any real matrix Aas: A=USVT, where Uand Vare orthogonal matrices with eigenvectors from AATand ATA, respectively [25]. Both algorithms have been already packaged in many programming languages, such as numpy for python. 2.2.1 PCA in Statistical Shape Models (SSM) Statistical shape models (SSM) provides a reference to obtain the mean and variations of a dataset. Specifically, SSM applies PCA to compute the mean shape and variations from a bunch of hand-segmented shapes. It is similar to the methodology in our research to calculate the variations of the 4D flow MRI dataset. The term shape is generally defined as: ”Shape is all the geometrical information that remains when location, scale and rotational effects are filtered out from an object.” [14]. The geometrical information of an object refers to the outline of an object in 2D or 3D space [20]. A shape can be represented using an ordered set of points. For example, a 2D shape can be defined [20] as: ~ C= (x1, y1, ..., xr, yr), where (xi,yi) denotes a point. The point (xi,yi) is connected by its adjacent points, i.e., (xi−1,yi−1) and (xi+1,yi+1). In SSM, it is required that all training shapes must be represented by the same number of points and that all points have to be located at corresponding positions along all training shapes [20] . Therefore, before applying PCA, rigid shape alignment is done, which is a combination of translation, scale and rotation. The original shape can be approximately reconstructed with the mean shape and its variations, the author [20] gives a vivid example of variations of the hand shapes, shown in Figure 2.2. The shapes in the middle column are the same shape, all of which represent the mean shape. And the shapes on the left side are generated using the top first to fifth principal components (PC). They are calculated by subtracting 3σi× corresponding PC from the mean shape, where σiis the ith eigenvalue. Similarly, the shapes on the right side are also synthesized from the top five components, by adding 3σi×corresponding PC to the mean shape. How to match the model to a new target is for an extended discussion of shape matching we refer to the paper [5] and reference therein. One potential problem of statistical shape models is a limited number of train- 15
Figure 2.2: Variation of mean shape. Adopted from the paper [20]. ing data, i.e., the subset of shapes used to build the mean and variations. This is possibly due to the tedious and time-consuming process of manually extracting the points from given images. The small training sample size is a problem because it is assumed that all plausible shapes can be described by linear combinations of the training shapes, which is too restrictive for a small sample size, because the dimension of the shape space cannot be greater than the training size minus one, and the actual dimension could be even smaller because the maximum dimension is only achieved for linearly independent training shapes. Therefore, for a small number of training samples, it will be not enough to capture all variations of a specific dataset. There are some approaches to enhance this situation by obtaining more flexible SSMs, which are divided in three categories, as introduced and listed in the paper [20], including artificial enlargement of shape variations, relaxation of model-constraints and model partitioning. More details about these methods can be further found in these papers [7] [6] [8] [40] [9], etc. In our implementation, however, we do not extend 16
the size of the dataset using the above approaches considering the following reasons: •1) Our primary target is to prove the effectiveness of our solution but not to find accurate patterns representing the given dataset. •2) The added samples may bring in additional error. •3) Due to the complexity and unknown patterns in our dataset, it is difficult to evaluate the performance by enlarging the dataset. Instead, we create a set of synthetic tubes simulating the blood flows in the vessels such that we can control the patterns of the dataset, for example, whether a synthetic tube contains vortex or helix, and where the special patterns are inserted. And we can add as many samples as we need. The main benefit of using synthetic data is that it makes it easier to interpret the results with the original dataset in mind. 2.3 Complex PCA Most of the time, data values are real numbers or split into many parts of real numbers, such as the RGB color image, where the value of each pixel is composed of three components, red, green and blue. However, the representation of the nature of numerical values of data has been limited. In such cases, as mentioned, the traditional PCA method by concatenating the three components may lose the notion that they form a spatial vector. Therefore it can not capture the potential non-linear relationship among the components. There are plenty of cases where complex numbers can represent the data more compactly and retain the relationships between the components. Complex-valued numbers can be divided into two groups: those that are complex by design, and those that are made complex by convenience of representation [26]. One example of the former case is the image feature produced by applying complex-valued kernels, and for the other case, data like points with x and y coordinates in the statistical shape models can be represented as complex numbers [26]. Complex-valued data can be potentially used in many applications, and how we can extend the existing algorithms in real domain to complex domain is worth exploring. Although the complex number is not the right choice to represent 3D vector field data in our research, it can be regarded as a trial on 2D vector field data before we use the quaternions (which will be introduced in the next section) to represent 3D vector field data. As the complex-valued number is a more general form of real-valued number, and the quaternion-valued number is a more general form of complex-valued and real-valued numbers, we intuitively assume that they share some common properties. Unless the complex representation of 2D vector field data is better than that of real representation, no matter in terms of effectiveness or accuracy or others, we will not consider to generalize the representation of 3D vector field data using the quaternions. The author [26] illustrates that many algorithms can be directly used on complexvalued data the same way or similarly as those on real-valued data. Usually we assume the complex-valued data are proper and circular. ”A complex variable is defined to be proper if it is uncorrelated with its complex conjugate, and that a complex random variable is circular if it has a probability distribution that is invariant under rotation in the complex plane, i.e. x and x0=ejaxhave 17
the same pdf for any given real a” [26]. And complex data that are circular is inherently rotation invariant. Complex PCA (CPCA) has been proven more efficient than real PCA (RPCA) in that less components can represent more variance [26]. This can be seen through the eigenvalues that the accumulative percentage of the top r (r <the dimension of the dataset) eigenvalues of CPCA is higher than that of RPCA. It can be seen more intuitively from the visualization of top main eigenvectors. For example, Figure 2.3 (adopted from the paper [26]) illustrates this conclusion. In this figure, the mean shape is located in the middle. The shapes on the top and bottom are generated from the first component, and the images on the left and right are synthesized using the second component. Finally, the shapes on the two diagonals are constructed using the third and fourth eigenvectors. The shapes on the top and left side are produced with a positive weight and the ones on the bottom and the right side are generated with a negative weight. In the real representation, the first component and the second one represent the left/right pose and up/down pose respectively, while these can be explained using only the first component in the complex representation. Figure 2.3: The mean shape and shape instances generated from the first four eigenvectors for the real, complex shape representations of human face. Adopted from the paper [26]. 2.4 Quaternion PCA In the previous section, we have already obtained some evidence that CPCA outperforms RPCA, and we want to further explore the quaternion representation of 3D vector field data. Quaternion algebra has been studied a lot in the past decades, the author [38] introduces a brief history of the origin of the quaternions, and explains the basic algebra step by step with a lot of examples and practices, and finally combining it with computer graphics. The authors [43] [13] [31] further explore the algebra of matrices of quaternions, which provides important contributions to our research. To the best of our knowledge, quaternion PCA (QPCA) or quaternion SVD (QSVD) is still not as widely used as RPCA or CPCA in a variety of applications. The existing related areas using QPCA or QSVD include color images processing [23], color texture segmentation [30], color image compression [24], 3D point cloud matching [42], polarized wave and vector-sensor signal processing [22], to name a few. 18
The authors [22] [23] show that QSVD is also invariant to spatial rotation and color space rotation, and has achieved better results than component-wise RPCA [22]. Besides the property of spatial rotation invariance, we also want to explore whether QPCA to quaternion-valued data is like CPCA to complexvalued data and outperforms RPCA for 3D vector field data with less components to represent more variance. These motivate us to explore the quaternion method in building an hemodynamic atlas based on 4D flow MRI data. 2.4.1 Quaternions Algebra Quaternions are an extension of complex numbers from 2D plane to 3D space(as well as 4D space). Quaternions were invented in 1843 by W.R.Hamilton in 1843 [12] and are a specific class of hypercomplex numbers [16]. Quaternion algebra is the first non-communative algebra to be discovered. A quaternion is made of four parts, one real part and three imaginary parts: q=s+ai +bj +ck, s, a, b, c ∈R(2.1) and i2=j2=k2=ijk =−1 ij =k, jk =i, ki =j ji =−k, kj =−i, ik =−j (2.2) A pure quaternion is a quarternion with a null real part(s=0), and quaternions with non-null real parts are sometimes called full quaternions. The conjugate qof a quaternion q is q=s−ai −bj −ck. (2.3) The norm of a quaternion is |q|=pqq =pqq =√s2+a2+b2+c2.(2.4) The inverse of a quaternion is q−1=q |q|2.(2.5) The multiplication of quaternions is not communative due to the relationships between the three imaginary parts. Given two quaternions q1and q2, we have q1q26=q2q1.(2.6) A vector-signal made of three orthogonal components ~q = (qx, qy, qz) can be represented using quaternions [22] by encoding the three components of a vector as a pure quaternion such that vector function is given by, q=qxi+qyj+qzk. In order to simplify the notation and explain the rotations in 3D space it is easier to consider the polar form of a quaternion. Euler’s formula for the complex 19
exponential generalizes to the hypercomplex form: q=|q|eξθ, where ξis a pure unit quaternion, called eigenaxis and θis the angle, called eigenangle. q=|q|eξθ =|q|(cosθ +ξsinθ) =|q|(cosθ +sinθ cosφ sinψ i +sinθ sinφ sinψ j +sinθ k) (2.7) where φand ψare respectively the azimuth and elevation angles that define the position of ξin 3D space. The polar form will be used to explain the quaternion representation of the velocity vector, and to show the availability of using gram matrix (which will be introduced in section 4.4.2) to efficiently calculate QPCA in case that the number of samples is far less than that of dimensions. 2.4.2 Quaternions Matrix The study of quaternion matrices has been an active field of research for several years, which was started from 1936 [41], and is still in development. A quaternion matrix X∈HN×Mis a matrix, where N is the number of samples and M is the dimension of the dataset. The elements of Xare quaternions, with each row x∈HMas a row vector space of dimension M. (Note: We use row vector through the whole paper, which is different from the usual norm using a column representing a vector in a matrix.) The following is lists some of the main properties of two quaternion matrices A∈HN×Mand B∈HM×P. Quaternion multiplication is non-communative, and this is also true for quaternion matrices. However, many equality relations for real and complex matrices are also valid for quaternion matrices. 1ABH=BHAH, 2AB 6=A B in general, 3 (AH)−1= (A−1)H, 4 (A−1)6=A−1in general. A quaternion vector x∈HMcan be expressed with the Cayley-Dickson notation: x=x1+x2j(2.8) where x1and x2∈CM. A bijection can be defined f:HM→C2M f(x) = x1 −x2.(2.9) This definition is used during the process of quaternion eigenvector construction from its complex adjoint eigenvectors, whcih will be introduced in the following section. Similarly, a quaternion matrix A∈HN×Mcan be expressed using Cayley- Dickson notation: A=A1+A2j(2.10) 20
where A1and A2are complex matrices (∈CN×M.). The complex adjoint matrix, noted as χA∈C2N×2M, corresponding to the quaternion matrix Ais like: χA=A1A2 −A2A1.(2.11) This complex notation for quaternion matrices can be used to compute quaternion matrix eigenvalue decomposition using complex decomposition algorithm. The conjugate transpose or Hermitian transpose of a N-by-M complex matrix A1∈CN×M(or a quaternion matrix A∈HN×M) is a M-by-N matrix A1H(AH), therefore, the covariance matrix of the complex adjoint matrix χA is ΣχA=χAχH A=A1A2 −A2A1AH 1−AT 2 AH 2AT 1(2.12) The following is a summary of the main properties for the given quaternion matrices Aand B∈HN×Mand their complex adjoint matrices χAand χB∈ C2N×2M[22]: 1χAis normal, hermitian or unitary if and only if Ais normal, hermitian or unitary, 2χAB =χBχA, 3χA+B=χA+χB, 4χA−1= (χA)−1if A−1exists, 5χAH= (χA)H. More properties of χAare given in the papers [41][43]. 2.4.3 SVD of a Quaternion Matrix (QSVD) In linear algebra, the singular-value decomposition (SVD) is a factorization of a real or complex matrix. It can also be generalized to a quaternion matrix A∈HN×M[43]. Any quaternion matrix can be decomposed as [43]: A=UΣr0 0 0VH(2.13) where U∈HN×Nand V∈HM×Mare unitary quaternion matrices, which contain the left and right singular vectors of A.Σris a real diagonal matrix and has rnon-null entries on its diagonal (singular values of A). The author [43] has demonstrated the existence of QSVD. In SVD, the term rank of a matrix means ”the dimension of the vector space generated (or spanned) by its columns” [2], which is equal to the number of linearly independent columns or the number of linearly independent rows (they are always the same). Simply put in SVD, it is equal to the number of non-null eigenvalues. Here, if the rank of a quaternion matrix Ais r, then the rank of its complex adjoint χAis 2r[41]. 21
The QSVD can also be written as below [22]: A= r X n=1 unvH nσn,(2.14) where unand vnare respectively the left singular vectors (columns of U) and the right singular vectors (columns of V), abd σris the real (R) singular value. A method to compute SVDQ of a quaternion matrix A∈HN×Mfrom its complex adjoint matrix χA∈C2N×2Mis given in the paper [22]. Here is a brief summary of those steps introduced in the paper [22]. 1 First, obtain the SVD of its complex adjoint matrix χA: χA=ˆ UΣ2r0 0 0ˆ VH= 2r X ˆn=1 ˆ uˆnˆ vH ˆnσˆn(2.15) where the columns ˆ uˆnand ˆ vˆnare the columns of ˆ Uand ˆ V, and they are respectively elements of C2Nand C2M, and can be expressed as below: ˆ uˆn=˙ uˆn −¨ uˆnand ˆ vˆn=˙ vˆn −¨ vˆn(2.16) where ˙ uˆn∈CN,¨ uˆn∈CN,˙ vˆn∈CMand ¨ vˆn∈CM. The diagonal matrix Σ2rhas the following special structure: Σ2r=diag(σ1;σ1;σ2;σ2;...;σr;σr)(2.17) where σi∈R. This repeated structure in the diagonal entries is due to the special form of χA. 2 Associate the nth right (resp. left) singular vector of Awith ˆnth = (2n− 1)th right (resp. left) singular vector of χA, using the following equations: un=˙ uˆn+¨ uˆnj, vn=˙ vˆn+¨ vˆnj, (2.18) 3 Obtain the nth singular value of the diagonal matrix Σr, with ˆnth = (2n− 1)th diagonal element of the diagonal matrix Σ2r. In this way, we obtain the mean and eigenvectors of a quaternion defined space. 22
Chapter 3 Dataset The atlases in our research are built on both the real thoracic vessels from 4D flow MRI and a group of synthetic tubes, respectively. These datasets are introduced in the subsequent sections. 3.1 Real Vessels Our real-world dataset consists of a cohort of five healthy people, with 19∼24 time phases of 3D blood flow velocity vector per individual, and a tMIP per individual. Each time phase is a volume composed of 3D velocity vector field data (vx,vy, and vz) in 3D space. Possibly due to different acquisition processes or different poses of these individuals, neither the number of time phases nor the number of voxels is the same among these five individuals. Figure 3.1 visualizes the 4th time step of the volumes of these 4D MRI volumes, which corresponds to the systole phase of a cardiac cycle. These figures are generated using direct volume rendering technique and streamlines by putting a sphere source (center (-24.1,-51.3,18.5), radius 13.7) in the ascending aorta. The key parameters of this dataset are listed in appendix 4. 3.2 Synthetic Curved Tubes 3.2.1 Overview The main reason to create the synthetic dataset is to be able to evaluate the behaviour of our algorithm with the knowledge of what to expect. The main variations of the real-world dataset are unkown and it is difficult to interpret without enough medical domain knowledge due to the complexity of the realworld dataset. But we can easily identify the variations of the synthetic dataset due to its controllable characteristics and relatively simplicity. Furthermore, the size of real-world dataset we have is small (only 5 samples), but the dimension per volume is large, which is difficult to manipulate. Due to its large dimension, the computational cost is so high that it usually takes more than hours to construct the original 3D vector into quaternion numbers. The synthetic dataset is composed of a group of 24 curved tubes simulating the blood flow in the vessels. To create more variations, we add some perturbations, 23
(a) individual 1 (b) individual 2 (c) individual 3 (d) individual 4 (e) individual 5 Figure 3.1: 3D blood flow visualization in the thoracic aorta such as vortex and/or helix, randomly located inside the tubes. Each synthetic volume has 32 ×32 ×32 voxels, with origin at (0,0,0) and unit space between voxels. Some examples are shown in Figure 3.2. (a) synthetic tube 1 (b) synthetic tube 2 (c) synthetic tube 3 (d) synthetic tube 4 (e) synthetic tube 5 (f) synthetic tube 6 Figure 3.2: Six examples of synthetic tubes 3.2.2 The Method of Generating Curved Tubes In order to synthesize the curved tubes, we first generate a polynomial curve and then generate a tube by finding the distances to the curve within a predefined threshold. Finally we insert vortices and helices randomly into the tube and compose a group of 24 different tubes. More details can be found as below: 24
average image, as the reference for other images to align to, can be used in cases such as segmentation where the atlas is deformed to the target image, as well as the segmentation map. The simplest way to construct a template is to select an individual in the image dataset as the template, but it is strongly biased to the selected individual. Thereafter, two categories of template construction are used. One is subject-based, which is based on single individual with minimal deformation, and the other is population-averaged with minimal deformation target (MDT) to counteract the bias brought by the single MDT template. A summary of these schemes is given in the paper [39], which experiments and validates the performance of these schemes. The population-based atlas is better regarding the the overlap of eigenvalue-eigenvector pairs between tensors (OVL) and FA accuracy [36], and global similarity index (GSI) obtained by averaging region similarity index (RSI) across all regions [39]. Therefore, a population-based atlas is a better representation of the given dataset, which is also the method we have used in our research. In practice, a population-based template is obtained by first constructing many subject-based templates and then averaging over all subject-based templates. Assume we have N images, I1, ..., IN, in the database. Let Tij denote the deformation field that results from registration of source image Iito target image Ij. The deformed source image Iiafter warping to the space of Ijis represented as ˜ Iij =Tij(Ii). •subject-based First, we will introduce the basic subject-based method, that we use in our implementation. In subject-based template, an image Iiis selected as the initial reference. The reference image is warped to all the other images in the dataset to obtain the transformation matrix Tij. The minimal deformation target (MDT) template is derived from image Iiand defined as MDTi=Ti(Ii), with Ti=1 NPN j=1 Tij. The MDT template gets its name because it requires the least amount of deformation to all images in the dataset [18]. Since the registration algorithm preserves the topology, each MDTiwill be inevitably biased to the topology of the corresponding Ii. To reduce the influence of the initial reference image, you can select the image that leads to the optimal MDT template [18]. A more accurate method is to iteratively refine the MDT template by warping all images again to the MDT template created in the previous step [11]. Another method, called intensity-based MDT, states that besides deforming an individual image Iiby the mean transformation Tito obtain MDTi, the new template Ti(Ii) is obtained by transforming the intensity-average template Ii=1 NPN j=1 ˜ Iji to its MDT template [39]. Although the bias is reduced, some bias towards Iifrom which it is constructed can not be excluded. •population-based In our work, we use the population-based method to build the average tMIP. The basic idea of the the population-based method is that all the MDTiattained using the subject-based method described above are averaged, 1 NPN j=1 MDTi, in order to reduce the bias. This process is visually illustrated in Figure 4.2, modified based on the paper [36]. –In step A, transformations Tij are calculated between all images of 31
the group. –In step B, a MDTiis created for each image. –In step C, all images Iiare averaged resulting in the final template. Theoretically, we can not directly average all MDTitemplates, since they are in different shapes. We assume that all the individuals are representative of the same population under study, and the image quality of all images is similar, therefore, all MDTitemplates are very close to each other, except for some unresolved residual topological variations [39]. To this end, a population-based template has been constructed. In step B, we have obtained the transformation matrix Tifor each tMIP volumme, with Ti=1 NPN j=1 Tij. In addition, transformix in Elastix is also capable to compute the spatial Jacobian of the transformation. The determinant of the spatial Jacobian of the transformation matrix Ti identifies the amount of local compression or expansion. Values smaller than 1 indicate local compression, while values larger than 1 represent local expansion [17]. We will use both the transformation matrix and the Jacobian matrix in the subsequent reorientation process. Figure 4.2: Population-based atlas construction 4.2.3 Velocity Reorientation For scalar-valued images, the value of the voxels will keep unchanged after registration process. Except when the voxel in the new image maps to a location be- 32
tween voxels in the original image, interpolation is needed and the values will be calculated accordingly. Unlike scalar-valued data registration, handling vectorvalued data, such as velocity vector field of blood flow, should also consider its orientation. This effect must be accounted for in order to ensure the anatomical correctness and preserve the integrity of the transformed image. This is quite intuitive to understand, for example, the velocity in a vertical narrow vessel lumen is directed up and down when the person stands up, which is expected to be horizontal and the magnitude remains the same when the person lies on a flat plane. The overall process of velocity reorientation is described in Figure 4.3. First, the velocity vector volume should also be transformed the same way as its corresponding tMIP, by moving the vector values from the points in the original velocity volume (denoted as Vi) to the corresponding points in the tMIP template. The mapping from original points to the corresponding points in the tMIP template can be obtained from the transformation matrix Ti, which has been already calculated from the population-based method in the previous section. And then the vectors in the transformed Viare reoriented by doing the dot product with the Jacobian field of Ti. Figure 4.3: Velocity reorientation flow The complexity of reorientation is in accordance with the order of transformation complexity. The problem is straightforward during rigid transformations, including translation and rotation. The blood flow velocity volume is composed of 3D vectors, noted as v= (vx, vy, vz), which should be rotated similarly as the tMIP. This can be achieved by applying the same rigid rotation matrix to each velocity vector in the image via a rigid transform. Thus, if Ris the rotation matrix representing the image transformation, after rotation, vis replaced by v0,v0=Rv. This reorientation does not affect the magnitude of the velocity, and only orientation is changed. When the transformation applied to the image is rigid, it is straightforward to determine the required reorientation of the velocity. In general, we need to extend the method to cope with higher order transformations. We assume that the population under study have similar vessels and blood flows, therefore the non-rigid transformation can be regarded as not significant. Therefore, we can reorient the blood flow velocity vector volumes by elementwise dot product of the aligned vector volumes and the full spatial Jacobian field of the transformation matrix Ticalculated from the registration process of tMIPs. 33
4.3 Masking After the registration and reorientation step, we get an aligned dataset with the same dimensions per volume (128 ×128 ×52). The resolution is so high that it brings two challenges. First, the larger the resolution, the higher the computation cost will be. There are two steps among the whole process that may consume massive computation resources. The first one is during the process of converting real-valued vectors to quaternion representation. The other is when calculating PCA using the covariance matrix, since the row size and column size of the covariance matrix will be the same and large (both are 128 ×128 ×52). It will reach the upper limit of the system memory, no matter for RPCA or QPCA. Although we have found a solution to calculate PCA efficiently by using the gram matrix (explained in section 4.4.2), the vector-to-quaternion process still remains a challenge. Second, since we are only interested in the vessel regions, other parts are are not significant. It is better to get a cleaner vessel region, which will also enable more accurate PCA calculation and interpretation. Given the fact that the magnitude of velocity keeps decreasing from the center of the vessels towards the boundary of vessel lumen, and gets even smaller outside vessel region, we will apply a threshold to the average tMIP template. This is to remove the voxels which are lower than the threshold. Since all the voxels have been aligned in the first step, we can use the truncated dataset to do PCA calculation, and later recover the results (mean volume, andeigenvectors) to the original volume size for visualization. 4.4 Building a Statistical Vector Field Model (SVFM) 4.4.1 Representation of a Blood Flow Velocity Vector 4D flow MRI is a time-resolved PC-MRI technique with velocity encoding along all three flow directions. You can imagine any point (x, y, z) in your vessels within your body, where the blood keeps constantly flowing through. The velocity vxyz of the blood flow at this point can be expressed as a vector (vx,vy, vz). If vxyz does not change with time at this point, the blood flow is steady, or called stationary flow. On the contrary, it is called unsteady flow. A 4D MRI blood flow velocity volume (defined as ~v(~x, t) : (R3,R)→R3) is composed of T(time steps) 3D volumes, with each element a velocity vector vxyz = (vx, vy, vz). Each 4D volume can be divided into T3D sub-volumes (defined as ~v(~x) : R3→R3), each of which is an instant volume. Depending on subsequent analysis methods, we represent each 3D sub-volume in the real (R) domain and quaternion (H) domain, respectively. Assume we have a 4D flow MRI velocity dataset of N individuals, and the total number of voxels in the 3D space is M (i.e. M=XY Z, with X,Y and Z being the number of voxels in the dimension of x, y and z). In real (R) domain, each instant 3D sub-volume can be represented separately using three 1D vectors, i.e, vx,vy,vz∈RM, but the relationship among the three components are lost. It can also be represented using a long vector v∈R3M, by concatenating the three components (vx,vy,vz). Therefore, the dataset at each time step is 34
represented by the matrix V∈RN×3M, whose rows are the sub-volumes per individual. Although the inherent real relationship of the three components will be also lost, at least the linear relationship is reserved. Therefore, we will use the concatenated vector as the representation in RPCA. The velocity vector has a more compact form of representation in the quaternion (H) domain, shown as below: vH=vxi+vyj+vzk(4.1) And a 3D sub-volume of each individual and the dataset of all individuals at each time step can be represented by vH∈HMand VH∈HN×M, respectively. The velocity vector can also be presented in polarized notation, as below: vH=|vH|eξθ (4.2) with |vH|=pv2 x+v2 y+v2 z,ξ=vxi+vyj+vzk |vH|,θ=π/2. The angle between real and imaginary part of the quaternionic velocity vector equals π/2, hence the real part is null. 4.4.2 Real PCA Here, we use the concatenated long vector form. Now we have the 4D blood flow velocity volume V∈RN×3M, with each element denoted as vij, where i∈[1, N], j ∈[1,3M]. When N > 3M, the general steps to compute PCA are listed below. Here we use PCA calculation based on the covariance matrix directly, we call it the direct method or the covariance method, explained as below: 1 Compute the center of the points per dimension: vj=1 NΣN i=1vij, i ∈ [1, N], j ∈[1,3M] 2 Compute the centered points: vi=vi−v, i ∈[1, N] 3 Compute the covariance matrix Σ=VTV 4 Compute eigenvalues and eigenvectors of the covariance matrix: Σui= λiui, where ui∈R3Mare the orthogonal normalized eigenvectors and the eigenvalues are ordered λ1≥λ2≥... ≥λr≥0, r≤Min(N−1,3M). 5 Convert the flattened uito the vector from: ui= (vix,viy,viz) In medical image processing, it is common that the space dimension is far bigger than the size of the dataset (N <3M). We need to find an efficient method to compute the RPCA in this sparse space. First, we need to introduce the concept of gram matrix. Given a matrix Vcomposed of vectors <v1, ..., vN>as its rows, its gram matrix Gis defined as: G=VVT. We define the new efficient method the indirect method or the gram method, since this method is based on the gram matrix and then the eigenvectors of the covariance matrix is calculated by dot product of the original centered velocity data and the eigenvectors of gram matrix. The detailed procedure is listed as below. 1 Compute the center of the points per dimension: vj=1 NΣN i=1vij, i ∈ [1, N], j ∈[1,3M] 35
2 Compute the centered points: vi=vi−v, i ∈[1, N] 3 Compute the gram matrix G:G=VVT 4 Compute eigenvalues and eigenvectors of the gram matrix: Gφi=λiφi, where φi∈RNare the orthogonal normalized eigenvectors and the eigenvalues are ordered λ1≥λ2≥... ≥λr≥0, r≤Min(N, 3M−1). 5 Compute the eigen vectors by projecting them to the original space: ui= 1 √λiVTφi The two method should yield the same principal components and variances. However, this does not imply the all eigenvectors are identical. As is known, the eigenvectors are orthogonal in the space of real numbers, and the sign can be arbitrary (+, or -), but it does not matter. For example, in Figure 4.4, the direction of ith eigenvector can be right (positive) or left (negative), or that of component 2 can be up (positive) or down (negative). No matter which direction it is, component 1 and component 2 are still orthogonal to each other. The signs of the eigenvectors calculated from the above two methods could be the same or different. Namely, both +uiand −uirepresent the same eigenvector. ui −ui u2 −u2 Figure 4.4: The signs of eigenvectors in RPCA could be different in different methods, but they could represent the same eigenvectors. 4.4.3 Complex PCA CPCA is suitable for vector field data in 2D plane, and we do not directly use CPCA for 3D velocity vector data, but it is included in this section for two purposes. First, the implementation of QPCA will depend on the CPCA of the complex adjoint of the quaternion matrix. Therefore, QPCA share some similar properties as CPCA. Second, it will make it easier to understand some properties gradually from RPCA to CPCA, then to QPCA. CPCA is similar to RPCA. Here we will illustrate the CPCA process assuming the vector data is in 2D plane. The covariance and gram methods that calculate CPCA are similar to those explaine din real domain. The main differences between CPCA and RPCA are listed below: •The direction in 2D space (2D flow vector) is represented in a complex number. Since a complex number represents two real values, the dimension of the dataset will be reduced by half accordingly. 36
•All the transpose operations (symbol: T) in RPCA will be replaced by conjugate transpose (symbol: H). •The space of complex eigenvectors can be represented in a polar coordinate, and the complex domain is spatially invariant to rotation in 2D space. Similarly, when the size of samples is less than the dimensions of the dataset, we still efficiently construct the eigenvalues and eigenvectors of covariance matrix based on the gram matrix, which is introduced in RPCA. However, it is noteworthy that in the complex domain, an eigenvector can be expressed as uieθi, and θcould be any value within [0, 2π]. Figure 4.5 illustrates this using the ith eigenvector. That means the items in the complex eigenvector could rotate any angle (θ) along the unit circle, and the rotation angles should be the same for each item within each eigenvector. But the θvalues do not need to be the same among different eigenvectors. We can visually perceive this in the figure below: the two directions in the unit circle can represent the same eigenvector in the complex domain. And this will be further extended to a unit sphere in QPCA. u1e(θ1+θ)i θ u1eθ1 Figure 4.5: The angles of eigenvectors in CPCA could be different in different methods, but they could represent the same eigenvectors. 4.4.4 Quaternion PCA The process of QPCA is similar to that of RPCA and CPCA. In the quaternion domain, the original dataset is represented as VH∈HN×M, and its complex adjoint form is χV∈C2N×2M. χV=V1V2 −V2V1.(4.3) where VH=V1+V2j, V1and V2∈CN×M. As described in section 2.4.3, there is no direct QPCA theory, therefore QPCA is obtained from CPCA on its complex adjoint form χV. 37
The direct method is based on the complex adjoint matrix χV, described as below: 1 Compute the center of the points per dimension: vj=1 2NΣ2N i=1vij, i ∈ [1,2N], j ∈[1,2M] 2 Compute the centered points: vi=vi−v, i ∈[1,2N] 3 Compute the covariance matrix ΣH=χH VχV 4 Compute eigenvalues and eigenvectors of the covariance matrix: Σˆ uχV i= λiˆ uχV i, where ˆ uχV i∈C2Mare the orthogonal normalized eigenvectors and the eigenvalues are ordered λ1=λ2≥λ3=λ4≥...λr≥0, r≤Min(2N− 2,2M). We are interested in the situation that the number of sample N is far less than that of dimension M (N <M). We can still efficiently construct the eigenvalues and eigenvectors of covariance matrix using the gram matrix (indirect method), which is introduced in the RPCA and CPCA. Now, we need to extend the space of complex number (a unit circle) to the quaternion space (a unit sphere), which can be expressed in the polar form: uieξθ, with ξbeing a unit pure quaternion number instead of iin a complex number, and θcan be any value within [0, 2π]. Figure 4.6 illustrats this using the first eigenvector. Therefore, the quaternion values of the quaternion eigenvector could lie in any position on the unit sphere. Similar to the complex eigenvector, the rotation angles of all the values within each quaternion eigenvector should be the same and there is no such constraint among different eigenvectors. We can visually perceive this in Figure 4.6. The two directions in the unit sphere can represent the same eigenvector in the quaternion domain. uieξ(θ1+θ) θ uieξθ1 Figure 4.6: The angles of eigenvectors in QPCA could be different in different methods, but they could represent the same eigenvectors. The indirect method of QPCA is described as below: 1 Compute the center of the points per dimension: vj=1 2NΣ2N i=1vij, i ∈ [1,2N], j ∈[1,2M] 2 Compute the centered points: vi=vi−v, i ∈[1,2N] 38
3 Compute the gram matrix G:G=χVχH V 4 Compute eigenvalues and eigenvectors of the covariance matrix: Gφi= λiφi, where φi∈CNare the orthogonal normalizd eigenvectors and the eigenvalues are ordered λ1=λ2≥λ3=λ4≥... ≥λr≥0, r≤ Min(2N, 2M−2). 5 Compute the basis vectors of the affine spaces: ˆ uχV i=1 √λiχT Vφi. After calculating CPCA on χV, we get its eigenvalues (σ1, σ1, σ2, σ2, ..., σr, σr) and eigenvectors ˆ uχV i∈C2M: ˆ uχV ˆn=˙ uˆn −¨ uˆn(4.4) where σi∈R,˙ uˆnand ¨ uˆn∈CM. The ith eigenvalue λiof QPCA is given by: λi=σi(4.5) The ith eigenvector uiof QPCA is given by the following equation, with ˆn= 2i−1 ui=˙ uˆn+¨ uˆnj =ri+vixi+viyj+vizk(4.6) After the quaternion eigenvectors are obtained, a further step is needed to convert the quaternion numbers to vectors (vix,viy,viz). In the conversion process, we still use the three imaginary parts of the quaternion number to compose the velocity vector, and therefore the real part is discarded [22]. To be consistent with the representation of the real domain, we still define the eigenvector ui= (vix,viy,viz). 4.4.5 The Effect of Rotation Usually the volumes in 4D MRI dataset are not aligned due to the acquisition process, therefore alignment is usually not avoidable before computing PCA for the dataset. It could possibly bring errors accumulated during the non-rigid registration process. So you may ask: is that possible to skip over the alignment step to do PCA in the complex domain for 2D vector field data? The answer is yes, but conditionally. We still need to align the voxels, but the alignment of the co-domian (the value of the voxel) is not necessary. We would also like to find whether this answer also extends to the quaternion domain in 3D space since quaternion is a more general form of complex number and can represent 3D vector field data. Rotation in 2D space In 2D space, the standard rotation of θdegree, can be represented in the following matrix: 39
R(θ) = cosθ −sinθ sinθ cosθ .(4.7) In RPCA, we perform a same element-wise rotation on the simulated image dataset. Here, the rotation performs a geometric transform which transforms the vector (vx, vy) in the position (x, y) of a pixel element in an input volume into the vector (zx, zy) in the position (x, y) in an output volume by rotating it through a user-specified angle θ. For example, by rotating the image by θ degree, we get: zx zy=cosθ −sinθ sinθ cosθ vx vy(4.8) The whole volume at a time step rotated by θdegree, is represented as Z∈ RN×2M,Z=VΩ, where Ω∈R2M×2Mis a sparse matrix composed of blocks of rotation R∈R2×2along the diagonal in the following form: Ω= R0 0 ... 0 0R0... 0 ... 0... 0R0 0... 0 0 R .(4.9) After rotation, the covariance matrix ΣΩis not equal to Σbefore rotation. This can be easily proved as below: ΣΩ=ZTZ =ΩTVTVΩ 6=VTV=Σ (4.10) However, the gram matrix GΩis same as Gbefore rotation due to ΩΩT=I, where I∈R2M×2M. Thus, the eigenvalues after rotation remain unchanged as before rotation. And the eigenvectors of the rotated volume has the following relationship with those before rotation: uΩ i=uiΩ(4.11) In CPCA, the rotation matrix R(θ)∈R2×2can be represented using a single complex number R(θ) = cos θ+jsin θ. The whole dataset Vis also composed of complex numbers, and VC∈CN×M. After rotation by θdegree, the dataset can be represented as ZC∈CN×M,ZC=VCR. After rotation, the covariance matrix ΣΩ Cis equal to ΣCbefore rotation. This can be proven as below: ΣΩ C=ZH CZC =RHVH CVCR =RHRVH CVC =VH CVC=ΣC (4.12) Similarly, the gram matrix GΩ Cis also equal to that before rotation. 40
The first step is to get the transformation matrix which is mapping from each original tMIP to the average tMIP. Once the average tMIP and transformation matrices are obtained, the velocity vector volumes should also be aligned by applying the transformation matrix obtained in the previous step. Since the registration provided by Elastix is only applicable to scalar data, each vector volume should be first split into three separate volumes: Vx,Vyand Vz, and then recombined after transformation. After the vector volumes are aligned the same way as tMIP, they are reoriented accordingly. During reorientation process, the inverse of Jacobian matrix calculated from the registration process and the inverse of original transform matrix of the volume are multiplied by the vector volume in succession. (Note: the original transformation matrix is brought by the transform between the patient coordinates and the data coordinates. The original vector data is defined in patient coordinates by default, we need to define them in data coordinates). 5.0.3 SimpleITK ITK is an open-source, cross-platform system that provides an extensive suite of software tools for image processing. SimpleITK is a simplified layer built on top of ITK, intended to facilitate its use in rapid prototyping, interpreted languages, etc. SimpleITK can be simply installed in Python through pip or conda command, and it is mainly used as reading and writing an image in .mhd format in our implementation. 5.0.4 Numpy Numpy is a fundamental package for scientific computing in Python. The two main methods used in our project are numpy.linalg.svd and numpy-quaternion. Since SVD is a more general form of PCA, we use numpy.linalg.svd instead of sklearn.decomposition.PCA. Another reason for this choice is that sklearn.decomposition.PCA does not support complex number calculation, while numpy.linalg.svd does. However, after many experiments, we find the eigenvalues calculated using numpy.linalg.svd and Mathematica are the same, but the eigenvectors are different. To further examine which result is correct, we reconstruct the original dataset using the top few (this number is dependent on the number of valid eigenvalues λi, defined as λi>10−8) eigenvectors. The reconstruction volumes using numpy.linalg.svd are far away from the original volumes no matter how many components are used, while the reconstruction error can be close to zero using Mathematica when we increase the components to a certain number. Therefore, after we calculate the covariance matrix/gram matrix in Python, we do CPCA calculation in Mathematica, and then return the eigenvectors to Python for the following calculation. Another main package used is numpy-quaternion, which enables numpy to create a quaternion number and manipulate arrays of quaternions in Python. The usual algebraic operations, such as addition and multiplication are available. But multiplication of quaternion matrices is not supported. Therefore, we create a function to do such operation. 47
5.0.5 vtk 8.2 The Visualization Toolkit (VTK) is an open source software for 3D computer graphics, image processing and visualization. It has a collection of tools for 3D rendering and a suite of widgets for 3D interaction. The latest version of vtk can be simply installed in Python through pip or conda command. It is the basis of many popular visualization applications, such as Paraview. We use this package in Python for 3D rendering of the volumes with MIP, and visualizing the blood-flow velocity using streamlines and glyphs. 5.0.6 ParaView ParaView is an open-source multiple-platform application for interactive, scientific visualization. It provides a flexible and intuitive user interface, which is easy to add various filters and visualize in multiple layers. Due to its friendly GUI and short time to display a large dataset, we use Paraview to visualize the original dataset and the representations generated from eigenvectors of the real vessels. 5.0.7 qt 5.9 in Python and Qt Designer There are two commonly used GUI packages in Python, Tkinter and Qt, which are able to connect with vtk to insert the vtk renderings into a GUI. Tkinter is a light weight tool which is suitable for developing simple GUIs. However, it needs to be built from source using CMAKE to support linking with vtk, which is prone to error due to the parameter setting process. Therefore, we finally choose Qt, which is easily installed in Python using pip or conda command. Qt also provides a flexible user interface to design the GUI, and it can be automatically translated into scripts in Python or C++. 48
Chapter 6 Result In this section, the experiments and results are divided into three section: QPCA theory test, experiments of synthetic dataset and experiments of real dataset. 6.1 QPCA theory test In order to test whether QPCA works, we first apply the QPCA model to simulate a small dataset in Mathematica. Thanks to this step, we could identify the flaws of numpy.linalg.svd in calculating CPCA. From the paper [26], we know CPCA has different performances given different datasets. CPCA could outperform RPCA a lot for one dataset in terms of effieciency (the same number of components could represent more variance), and it could also perform similarly as RPCA for another dataset. The properties of the dataset that is more efficient using CPCA are not yet clearly figured out. In our experiments, we simulate three different datasets, by gradually increasing complexity and randomness. The definition of the three datasets and experiments are included in the Mathematica script (see annex 1. synthetic 3D PCA test.nb). All the three datasets compose of eight samples and each sample simulates a 4 ×4×4 3D space with 3-elements vector values. They can be represented as X∈R8×192 in the real domain and X∈H8×64 in the quaternion domain. The plot of accumulative variance explained in three scenarios is shown in Figure 6.1. The proportion of variance explained by each feature is calculated by taking the eigenvalue divided by the sum of all eigenvaules. The red line indicates accumulative proportion of variance explained by the top ncomponents in QPCA, and the blue line represents that in RPCA. (a) Dataset 1 (b) Dataset 2 (c) Dataset 3 Figure 6.1: Explained variance in RPCA and QPCA for simulated data The result of QPCA on simulated datasets from Mathematica shows that QPCA 49
outperforms RPCA in that the top few components explain more variance than RPCA. That is, Pk 1λH i Pr 1λH i≥Pk 1λi Pr 1λiwhere 1 < k < r, r is the rank of covariance matrix, λH iis the ith eigenvalue in quaternion domain and λiis the ith eigenvalue in real domain. This behavior is especially obvious for the first component. This is just as expected and consistent with our intuition as quaternion representation is more compact than real representation. And we assume QPCA share some properties of CPCA, based on the fact that QPCA can be indirectly calculated using CPCA on its complex adjoint matrix. Interestingly, if the three components per velocity vector are linear, the eigenvalues of RPCA is the same as QPCA. The more complicated the relationship among the three components, the better the performance of QPCA. 6.2 Experiments of Synthetic Dataset This section describes the experiments based on the synthetic tubes. As explained in chapter 3, the synthetic dataset is generated to evaluate the behavior of our algorithm with the knowledge of what to expect. We can control the number of samples in the dataset as well as the patterns (vortex and helix) and the locations of patterns. Therefore, we could easily compare the patterns contained in the eigenvectors and evaluate whether each eigenvetor calculated in RPCA and QPCA is good to represent the dataset. 6.2.1 Preprocessing Since synthetic tubes are already aligned with each other when they are created, the first and second steps of our solution, namely registration & reorientation and masking, are not needed for the synthetic dataset. While, in order to reduce the cost of PCA calculation, we still have to truncate the volumes and only keep the voxels with values not equal to 0, which means only the voxels in the tube region are used to generate the high dimension (HD) space. After this step, the number of valid voxels per volume is reduced to 531 from 32768 (32 ×32 × 32). In real domain, the vector field is concatenated into a long vector, therefore, the dataset V∈R24×1593. In quaternion domain, the vector can be directly represented using a quaternion number, that is, VH∈H24×531. 6.2.2 RPCA and QPCA In this section we present a comprehensive comparison of the performance of RPCA and QPCA. The experiments are separated into two parts. First, we evaluate the eigenvalues and reconstruction error of RPCA and QPCA using all the 24 synthetic tubes. For QPCA, we also change the number of samples and explore how the quaternion eigenvalues and eigenvectors change by comparing them with the real eigenvectors. 50
Explained Variance The top main eigenvalues calculated by RPCA and QPCA are nearly the same for the synthetic dataset. The proportion of variance explained by the first principal component is λ1/P24 i=1 λi, which is about 23%. The proportion of variance explained by the second principal component is λ2/P24 i=1 λi, about 19%. The top seven components explain 90% of variance of the dataset, and the top ten components explain 100% variance of the dataset. This shows that the volumes within the dataset have a high degree of correlation. This is easy to understand by visualizing the synthetic flows using streamlines, that the locations of vortices or helices in some synthetic tubes are overlapped with those in some other tubes. Figure 6.2: Explained variance in RPCA and QPCA for synthetic tubes Reconstruction Error We evaluate the performance of reconstructed volumes based on the reconstruction error, which is also used in many researches [26][10][19]. The reconstruction of a velocity volume vreconstructed given the mean velocity volume v, eigenvectors(components) Uand the original volume viis defined as: vreconstructed =v+UUH(vi)(6.1) Therefore, the reconstruction error is the distance between the reconstructed volume and the corresponding original volume: ereconstructed =kV−Vreconstructedk(6.2) where Vis the matrix of original synthetic vectors and Vreconstructed is the matrix of reconstructed vectors using the given number of components. It should be noticed that for the above formula of reconstruction error, the conjugate transpose operation (symbol: H) in quaternion domain corresponds to the transpose operation (symbol: T) in real domain. Figure 6.3 shows the reconstruction error of the 24 synthetic tubes for RPCA and QPCA. For the synthetic dataset, QPCA slightly outperforms RPCA, but the advantage is so small that we can not see the difference in Figure 6.3a. From Figure 6.3a, the reconstruction error is decreased to nearly 0 at the 14th components, so we know the valid number of components is 14, and others 51
(a) Reconstruction Error of the top 14 components (b) Reconstruction Error of all 24 components Figure 6.3: Reconstruction experiments of RPCA and QPCA can be regarded as not significant. And it is expected that the reconstruction error will continue to decrease infinitely close to 0 as the number of components increases. This is true for RPCA, but the reconstruction error in quaternion domain increases rapidly. In order to prove this is not coincidence, we changed the number of samples to 10, 12, 18, and did the experiment again. All of them present the same behavior, shown in Figure 6.4. It is not clear why this happens and further research is still needed. Are the quaternion eigenvectors correct? As introduced, the velocity volume is represented using only the three imaginary parts of a quaternion number, namely the real part is set to be zero. After QPCA, the real part of each quaternion number in the eigenvectors is not necessarily zero. The author [30] mentions that the real part of a quaternion eigenvector is somewhat related to the magnitude. From the polar form of quaternion numbers, v=|v|eξθ, the real part is equal to the product of |v| and cos θ. If we only take the three imaginary parts to compose a quaternion value within an eigenvector, the norm of the quaternion value is equal to |v|sin θ. From this perspective, the real part is indeed related to the magnitude. Through experimentation, we find an interesting coincidence that the three component (vx, vy, vz) are not present in the expected elements vxi+vyj+vzk. Some components from both RPCA and QPCA are ”opposite” to each other. Here, ”opposite” refers to the fact that |vx|in RPCA is close to the absolute value of jimaginary part in the eigenvectors of QPCA, similarly |vy|and |vz|in PRCA match with iimaginary part and real part in QPCA. In short, the quaternion number can be represented as vz+vyi+vxj+ck, where c can be zero or any real value. This result is not interpretable, since the quaternion eigenvector is constructed using the three imaginary parts, and the real part is not used. Furthermore, we suspect the values could have been exactly the same, if we do not introduce error due to the current low-precision calculation method. In order to know whether this is a coincidence due to the special property of the dataset, we change the number of samples from 6 to 23 (randomly chosen from the original dataset) and repeat the experiment. Table 6.1 shows the result. In the result column, ”same” is the inverse of ”opposite”, which means the absolute values of vx,vyand vzof some eigenvectors in RPCA match with the i,jand kimaginary parts of corresponding eigenvectors in QPCA. And for those that do not have an obvious relationship between RPCA and QPCA are 52
(a) Reconstruction Error of the top 8 components (b) Reconstruction Error of all 10 components (c) Reconstruction Error of the top 9 components (d) Reconstruction Error of all 12 components (e) Reconstruction Error of the top 11 components (f) Reconstruction Error of all 18 components Figure 6.4: Reconstruction experiments using 10, 12, 18 samples marked as ”not sure”. As can be seen from Figure 6.1, this problem exists in many cases. There seems some inherent law behind this phenomenon. Therefore, this is still an open problem that needs further research. 6.2.3 Interpretation For the 24 synthetic tubes, let us visualize the representations generated using the top four components in the GUI. Figure 6.5 shows the synthesized volumes using the first four components in RPCA. The volumes in the middle column is the mean volume vof the 24 synthetic tubes. Figure 6.5a and 6.5c are volumes generated using the first component u1, calculated by adding -10u1 and 10u1to the mean volume v. The patterns shown in the first component u1 is obvious. There are helices near the top end of the tube and a vortex at the end of the straight part. Similarly, some clear patterns can be visualized from other components. These patterns can be found in the original dataset of the 53
# Tubes result # Tubes result # Tubes result 6 same 12 same 18 not sure 7 same 13 same 19 not sure 8 opposite 14 opposite 20 not sure 9 opposite 15 opposite 21 not sure 10 opposite 16 same 22 same 11 opposite 17 same 23 opposite Table 6.1: Relationship of real and quaternion eigenvectors 24 synthesized tubes. (a) v−10u1(b) v(c) v+ 10u1 (d) v−10u2(e) v(f) v+ 10u2 (g) v−10u3(h) v(i) v+ 10u3 (j) v−10u4(k) v(l) v+ 10u4 Figure 6.5: Variation of mean volume of 24 synthetic tubes from RPCA The results of QPCA shown in 6.6 are disappointing. If the representations us- 54
ing the real eigenvectors are assumed to be correct and used as a standard, the representations using the quaternion eigenvectors are expected to be comparable or outperform the real ones in terms of the information/patterns explained by the main components. However, this is not the case for the 24 synthetic tubes. The first and third quaternion eigenvectors do not seem to provide any useful information, and the second and fourth are quite similar to the corresponding real representations. This visualization result is not surprising since the three components in the quaternion eigenvectors are not as expected. The quaternion eigenvectors could be possibly wrong. Well, we can not eliminate the implementation issue either. More research should be done regarding this problem. (a) v−10u1(b) v(c) v+ 10u1 (d) v−10u2(e) v(f) v+ 10u2 (g) v−10u3(h) v(i) v+ 10u3 (j) v−10u4(k) v(l) v+ 10u4 Figure 6.6: Variation of mean volume of 24 synthetic tubes from QPCA As is known from Table 6.1, the quaternion results are consistent with those in 55
real domain when the sample size is 6, 7, 12, etc. Therefore, we also select six samples from the 24 synthetic tubes, and did RPCA (Figure 6.7) and QPCA (Figure 6.8) again. The representations generated from the first, third and fourth real and quaternion eigenvectors are the same but in different directions. That is, the v−10u1from RPCA is the same as v+ 10u1from QPCA, and so on. But the second component from QPCA has abnormal performance, which is difficult to interpret. (a) v−10u1(b) v(c) v+ 10u1 (d) v−10u2(e) v(f) v+ 10u2 (g) v−10u3(h) v(i) v+ 10u3 (j) v−10u4(k) v(l) v+ 10u4 Figure 6.7: Variation of mean volume of 6 synthetic tubes from RPCA 56
(a) v−10u1(b) v(c) v+ 10u1 (d) v−10u2(e) v(f) v+ 10u2 (g) v−10u3(h) v(i) v+ 10u3 Figure 6.13: Variation of mean volume of 5 thoracic vessels from RPCA 63
(a) v−10u1(b) v(c) v+ 10u1 (d) v−10u2(e) v(f) v+ 10u2 (g) v−10u3(h) v(i) v+ 10u3 Figure 6.14: Variation of mean volume of 5 thoracic vessels from QPCA 64
Chapter 7 Conclusion CVD is the major cause of mortality that affects millions of people every year [34]. Early diagnosis is crucial for CVD patients to reduce the probability of emergency which is highly possibly leading to death [34]. New technologies, such as 4D flow MRI, has provided new tools to help physicians diagnose CVDs. Our research attempts to explore this new data to decode information. A medical atlas is commonly used as a reference for physicians to learn the anatomy or patterns inside human body. Specifically, we build a hemodynamic atlas of the velocity vector of blood flow based on 4D flow MRI. By searching for the best practice in creating atlases, we finally choose the PCA method, which has been applied successfully in many fields to reveal the main patterns of a population, such as eigenfaces and statistical shape models. Furthermore, in order to handle vector dataset, we find some applications with good performance using complex numbers for 2D vector and quaternion numbers for 3D vectors in computer vision and computer graphics tasks. Before these methods are applied to the real dataset, we reproduce the implementation of CPCA and QPCA using Mathematica, and illustrate that both CPCA and QPCA are more efficient in terms of the number of eigenvalues. But the efficiency is highly dependent on the properties of the dataset. Therefore, we apply both traditional RPCA and QPCA to our dataset to further explore whether QPCA method outputs different eigenvectors which could express more information compared to RPCA. In order to evaluate our algorithm with what to expect, synthetic tubes with less number of voxels, simulating the blood flows in the vessels, are generated. Although QPCA does not outperform RPCA in expressing the patterns of the synthetic dataset, they both represent the dataset well, and some interesting patterns are found. However, we also find the potential problems using quaternion representation by conducting many experiments with different number of samples, such as the unexpected large reconstruction error in QPCA. Finally, these methods are applied to the real world dataset. QPCA performs slightly better than RPCA in that the first few eigenvalues take a larger proportion than those of RPCA. The interpretation of the variations of the real dataset is difficult. One of the main issues is the limit memory to calculate PCA of covariance matrix, which is solved by generalizing the gram matrix method from real domain to complex domain and quaternion domain. Based on the performance of both synthetic dataset and real thoracic vessels, RPCA has a good representation of the dataset, while QPCA method seems not 65
stable nor mature in building the atlas of blood flow velocity vectors. QPCA has to be proven significantly better than RPCA, or QPCA should not be used because RPCA is conceptually simple and easy. More research of QPCA and more effort to interpret the components is needed before QPCA could be applied in this field. 7.1 Main Findings and Implications Our research can be divided into three phases: proof-of-principle implemented in Mathematica, experiments on synthetic data and experiments on real-world data implemented in Python. Here is a summary of main findings during these steps. In the following conclusions, when we mention CPCA (compared to RPCA), we mean the dataset is composed of 2D vector data. Similarly, QPCA (compared to RPCA), is for the dataset of 3D vector data. Comparison of RPCA, CPCA and QPCA •CPCA outperforms RPCA for 2D vector dataset in that complex representation is more condensed and it needs fewer components to achieve better results. The performance is different dependent on the properties of the dataset. •CPCA is rotation invariant(RPCA is not), which is a good property when the mapping relationship among different images is known and the dimensions of them are the same. Thus, the alignment process may be avoided. •QPCA for 3D vector dataset has similar performance as CPCA for 2D vector dataset. QPCA significantly outperforms RPCA when the relationship between the three components of a vector is very complicated and appears to be random. However, we haven’t found an accurate definition of the properties of the dataset which is more suitable to use QPCA. •QPCA is not rotation invariant. This conclusion is different from that of some published papers, such as [23]. Interpretation of variations •For both the synthetic and real datasets, the reconstruction error of QPCA is slightly smaller than RPCA using the same number of eigenvectors. And the reconstruction error of QPCA increases rapidly when the number of components is bigger than the valid number of eigenvalues. •For the synthetic dataset, the number of samples may influence the reconstruction of eigenvectors. When the number of samples is 6, 7, 12, 13, 16, 17 and 22, the three components of a velocity vector are as expected in the three imaginary parts (vxi+vyj+vzk). In other cases, the quaternion eigenvetcors are not as expected. The variations from both RPCA and QPCA could represent the locations of vortices and helices. And RPCA seems better than QPCA in that more real eigenvectors contain meaningful and interpretable information. 66
•For the real-world thoracic dataset, the variations of RPCA and QPCA mainly represent the change of velocity magnitude. No other obvious patterns (such as vortex or helix) are identified. 7.2 Future Work The present study has explored RPCA and QPCA methods in building an atlas of 4D flow MRI. RPCA for concatenated components of vector data can be regarded as a baseline. Although we have some interesting findings regarding QPCA, more research is needed before this method can be used in real world. •Consult doctors or physicians about the variations and visualization: whether the visualization could help them identify abnormal patterns of blood flow and improve their work efficiency. •Simulate more data with different properties and study what kind of data is best suitable using QPCA. Put more effort to interpret the relationship of the four components of quaternion, and how to restore the blood flow velocity from quaternion eigenvector accurately. •Collect more real data, especially from patients with different CVDs, to find the abnormal patterns for each kind of disease. •Explore possible kernel methods to realize the rotation invariance of QPCA, in order to skip the alignment step. Alternative methods could also be considered to help diagnose CVD, such as deep learning algorithms. As deep learning nowadays has taken leaps forward in many fields, it also makes possible the automatic and intelligent diagnosis with high accuracy comparable to human experts. With massive data and pervasive evidence, it can be used to make diagnosis of CVD. 67
Bibliography [1] Rita Borgo, Johannes Kehrer, David HS Chung, Eamonn Maguire, Robert S Laramee, Helwig Hauser, Matthew Ward, and Min Chen. Glyphbased visualization: Foundations, design guidelines, techniques and applications. In Eurographics (STARs), pages 39–63, 2013. [2] Nicolas Bourbaki. Elements of mathematics: Algebra. Springer, 2003. [3] Albert CS Chung, J Alison Noble, and Paul Summers. Vascular segmentation of phase contrast magnetic resonance angiograms based on statistical mixture modeling and local phase coherence. IEEE Transactions on Medical Imaging, 23(12):1490–1507, 2004. [4] Pierre Comon. Tensor decompositions. Mathematics in Signal Processing V, pages 1–24, 2002. [5] Tim Cootes, ER Baldock, and J Graham. An introduction to active shape models. Image processing and analysis, pages 223–248, 2000. [6] Timothy F Cootes, Chris J Taylor, et al. Statistical models of appearance for computer vision, 2004. [7] Timothy F Cootes and Christopher J Taylor. Combining point distribution models with shape models based on finite element analysis. Image and Vision Computing, 13(5):403–409, 1995. [8] Timothy F Cootes and Christopher J Taylor. Data driven refinement of active shape model search. In BMVC, pages 1–10, 1996. [9] Marleen de Bruijne, Bram van Ginneken, Max A Viergever, and Wiro J Niessen. Adapting active shape models for 3d segmentation of tubular structures in medical images. In Biennial International Conference on Information Processing in Medical Imaging, pages 136–147. Springer, 2003. [10] Chris Ding, Ding Zhou, Xiaofeng He, and Hongyuan Zha. R 1-pca: rotational invariant l 1-norm principal component analysis for robust subspace factorization. In Proceedings of the 23rd international conference on Machine learning, pages 281–288. ACM, 2006. [11] Alexandre Guimond, Jean Meunier, and Jean-Philippe Thirion. Automatic computation of average brain models. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 631–640. Springer, 1998. [12] William Rowan Hamilton. Lectures on Quaternions: Containing a Systematic Statement of a New Mathematical Method; of which the Principles Were Communicated in 1843 to the Royal Irish Academy; and which Has Since Formed the Subject of Successive Courses of Lectures, Delivered in 68
1848 and Sub Sequent Years, in the Halls of Trinity College, Dublin: Withnumerous Illustrative Diagrams, and with Some Geometrical and Physical Applications. University Press by MH, 1853. [13] Liping Huang and Wasin So. On left eigenvalues of a quaternionic matrix. Linear algebra and its applications, 323(1-3):105–116, 2001. [14] IL IDryden and KV Mardia. Statistical shape analysis, 1998. [15] Ian Jolliffe. Principal component analysis. Springer, 2011. [16] Is˘ai Lvovich Kantor, IL Kantor, and AS Solodovnikov. Hypercomplex numbers: an elementary introduction to algebras. Springer, 1989. [17] Stefan Klein, Marius Staring, Keelin Murphy, Max A Viergever, and Josien PW Pluim. Elastix: a toolbox for intensity-based medical image registration. IEEE transactions on medical imaging, 29(1):196–205, 2010. [18] Peter Kochunov, Jack L Lancaster, Paul Thompson, Roger Woods, John Mazziotta, Jean Hardies, and Peter Fox. Regional spatial normalization: toward an optimal target. Journal of computer assisted tomography, 25(5):805–816, 2001. [19] Nojun Kwak. Principal component analysis based on l1-norm maximization. IEEE transactions on pattern analysis and machine intelligence, 30(9):1672–1680, 2008. [20] Carsten Last and Simon Winkelbach. From Global to Local Statistical Shape Priors. Springer, 2017. [21] Nicolas Le Bihan and Guillaume Ginolhac. Subspace methods for 3d arrays. In Workshop on Physics in Signal and Image Processing (PSIP), pages 359–364, 2001. [22] Nicolas Le Bihan and J´erˆome Mars. Singular value decomposition of quaternion matrices: a new tool for vector-sensor signal processing. Signal processing, 84(7):1177–1199, 2004. [23] Nicolas Le Bihan and Stephen J Sangwine. Quaternion principal component analysis of color images. In Proceedings 2003 International Conference on Image Processing (Cat. No. 03CH37429), volume 1, pages I–809. IEEE, 2003. [24] Lincong Luo, Hao Feng, and Lijun Ding. Color image compression based on quaternion neural network principal component analysis. In 2010 International Conference on Multimedia Technology, pages 1–4. IEEE, 2010. [25] Rasmus Elsborg Madsen, Lars Kai Hansen, and Ole Winther. Singular value decomposition and principal component analysis. Neural Networks, 1:1–5, 2004. [26] Athanasios Papaioannou. Component analysis of complex-valued data for machine learning and computer vision tasks. 2017. [27] Zhenmin Peng, Robert S Laramee, O Deussen, DA Keim, and D Saupe. Vector glyphs for surfaces: A fast and simple glyph placement algorithm for adaptive resolution meshes. In VMV, pages 61–70, 2008. [28] Bernhard Preim and Charl P Botha. Visual computing for medicine: theory, algorithms, and applications. Newnes, 2013. 69
[29] Philip Schneider and David H Eberly. Geometric tools for computer graphics. Elsevier, 2002. [30] Lilong Shi and Brian Funt. Quaternion color texture segmentation. Computer Vision and image understanding, 107(1-2):88–96, 2007. [31] Wasin So, Robert C Thompson, and Fuzhen Zhang. The numerical range of normal matrices with quaternion entries. Linear and Multilinear Algebra, 37(1-3):175–195, 1994. [32] Jan Erik Solem, Markus Persson, and Anders Heyden. Velocity based segmentation in phase contrast mri images. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 459–466. Springer, 2004. [33] Zoran Stankovic, Bradley D Allen, Julio Garcia, Kelly B Jarvis, and Michael Markl. 4d flow imaging with mri. Cardiovascular diagnosis and therapy, 4(2):173, 2014. [34] Jack Stewart, Gavin Manmathan, and Peter Wilkinson. Primary prevention of cardiovascular disease: A review of contemporary guidance and literature. JRSM cardiovascular disease, 6:2048004016687211, 2017. [35] Alexandra Str¨ater, Armin Huber, Jan Rudolph, Maria Berndt, Michael Rasper, Ernst J Rummeny, and Jonathan Nadjiri. 4d-flow mri: Technique and applications. In R¨oFo-Fortschritte auf dem Gebiet der R¨ontgenstrahlen und der bildgebenden Verfahren, volume 190, pages 1025–1035. c Georg Thieme Verlag KG, 2018. [36] Wim Van Hecke, Alexander Leemans, Emiliano d’Agostino, Steve De Backer, Evert Vandervliet, Paul M Parizel, and Jan Sijbers. The evaluation of a population based diffusion tensor image atlas using a ground truth method. In Medical Imaging 2008: Image Processing, volume 6914, page 69140B. International Society for Optics and Photonics, 2008. [37] Roy van Pelt, Huy Nguyen, Bart ter Haar Romeny, and Anna Vilanova. Automated segmentation of blood-flow regions in large thoracic arteries using 3d-cine pc-mri measurements. International journal of computer assisted radiology and surgery, 7(2):217–224, 2012. [38] John Vince. Quaternions for computer graphics. Springer Science & Business Media, 2011. [39] Qian Wang, Dieter Seghers, Emiliano D’Agostino, Frederik Maes, Dirk Vandermeulen, Paul Suetens, and Alexander Hammers. Construction and validation of mean shape atlas templates for atlas-based brain image segmentation. In Biennial International Conference on Information Processing in Medical Imaging, pages 689–700. Springer, 2005. [40] Yongmei Wang and Lawrence H Staib. Boundary finding with prior shape and smoothness models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(7):738–743, 2000. [41] Louise A Wolf. Similarity of matrices in which the elements are real quaternions. Bulletin of the American Mathematical Society, 42(10):737–743, 1936. [42] Chi Yuan, Xiaoqing Yu, and Ziyue Luo. 3d point cloud matching based on principal component analysis and iterative closest point algorithm. In 70
2016 International Conference on Audio, Language and Image Processing (ICALIP), pages 404–408. IEEE, 2016. [43] Fuzhen Zhang. Quaternions and matrices of quaternions. Linear algebra and its applications, 251:21–57, 1997. 71
Appendix A Appendix A.1 GUI The GUI is composed of a rendering panel that visualizes the volumes and a parameter panel. The parameter panel of the GUI includes four parts, show in Figure A.1 and A.2: •Basic parameter panel: –Files: Click on the file menu to choose the files. These files, including the mean volume, the 1st component, the 2nd component, the 3rd component and the 4th component) should be uploaded in order, since the rendering will search the specified component in this order. –Opacity: Set the opacity of the rendering, which is visualized by maximum intensity projection (MIP) raycasting. –View: Choose whether to show or hide the outline and clippling plane. •Others parameter panel: –Filters: This parametr is to imitate Paraview, where filters are defined as pipeline modules or algorithms that have inputs and outputs. Two filters are supported, including streamline and glyph. And you can interactively choose the location of the source of the filters by moving the source in the rendering panel or input the coordinates in this panel. –Integration Type / Seeds: When you choose Stream Tracer as the filter, this parameter will appear. You can choose the integration direction of streamlines, Backward,Forward or Both. The source of stream tracer is chosen in Seed Type, where either Plane Source or High Resolution Line Source is selected. Once the seed type is selected, you can set the positional parameters of the source in the following two parameters. –Plane Parameters: Set the Origin,Point 1 and Point 2 of the plane source to decide the position of the plane. Input Resolution value to decide the number of streamlines. –High Resolution Line Source: Set the Point 1 and Point 2 of the line source to decide the position of the line. Input Resolution value 72