[SOUND] Okay, so now we'll move on to Lecture 2, Registration. Registration is a very, very important part of neuroimage analysis which is why we'll dedicate many lectures to it. Right now we'll just cover the basics. So what exactly is registration? There is the formal definition which you have in front of you. The way I like to think about it is well you have multiple images, maybe of the same brain, maybe of the same brain at different visits, or maybe of different people's brains. One thing that you would like to do maybe take a difference between these images or do some sort of analysis. The basic question is, what does a location in the brain mean? It means something for an image. It may mean something completely different to another image, especially from a data perspective because what we have, we have three dimensional arrays. Nothing in those arrays tells us specifically of where in the space is that particular location. So, the basic thing that we have to do is to take multiple images and make sure that we have a way of either combining information across images. Or shift images in a certain way that provides us with alignment between these images such that voxels match with each other. Locations match with each other which can help with interpretation and can help with analysis. Of course these registrations are never perfect, but they are a good step in the right direction. We should know what to do, how to do registration. And we should also know how to understand when registration may fail, when it works better, and also when to look into it and see how and why it failed. One of the basic way of doing registration is co-registration. Co-registration, the C-O in front of registration means that is the same subject, that's what it typically refers to. For example, one could register a FLAIR to a T1 weighted volume or register a baseline to a follow-up study. So co-registration means, typically means that we refer to the same subject, either within the same visit but with different modalities or across visit with the same or different modalities. Another type of registration is registration to a template. Registration to a template is widely using in imaging. And it requires actually a template, for example, the MNI T1 weighted template, or the eve template that you have in the template folder of the data that we provided. It is actually useful to think about all the different types of registration. And we put here on one slide the various types of registration and what they refer to. The first thing that we think about is complexity, how complex is registration? You make a transformation of an image to another image. But there are basically an infinite number of transformations that can be made from an image to another image. The complexity of this transformation refers to the number of degrees of freedom or how much would we be forming, how many directions that image to fit into another image. And there are the probably the most popular approach is the rigid approach, and we'll talk in more details about it. It's a 6 number degrees of freedom transformation. The affine transformation has 12 degrees of freedom. Then there are nonlinear transformation which sometimes use either a rigid or affine transformation steps to provide more complex registration approaches. There is another way to look at the nomenclature of transformation. One way that we talked about is co-registration within the same person. However, even co-registration has many different subtypes. For example, it could be cross-sectional between modalities. It could longitudinal within modality, for example, T1 weighted to T1 weighted visit one, visit two. And longitudinal between modalities, for example, flare visit one versus T1 visit two. Registration to a template as I was saying earlier is a very, very popular approach to doing registration. And a template is necessary, and there are many different types of templates out there. Probably the most popular one is the MNI template that you have in the folder. But as we will progress through theme three and theme four, you'll also see the Eve Atlas that we have in the data folder. And you'll see how we are using the Eve Atlas to provide more information. For example, the MNI template does not have a lot of labels information about biological regions in the brain. There is another type of registration, which is one subject to another. This could be used for example in studies where people's brains have certain types of pathologies. So then registering to a template may not be the best idea because a template may be based on an average of healthy subjects. Whereas if you want to register in your particular study, you may want to have a brain image that doesn't necessarily match with a healthy subject, but matches more with the population. So this is another way of doing registration. Let's have a closer look at what is the linear registration. There are two types of linear registration, one is rigid and one is affine. Let's have a look at the rigid. This is the simplest type of registration possible. What exactly is it? We have in the formula that you see in front of you it's the transformation T, index rigid of v. v is a location, is a voxel in three dimensional space, and it's essentially a rotation matrix R that multiplies this v plus a translation. So in other words, you take the image, you rotate it and translate, that's it. That is a rigid transformation. You see the exact definition of the rotation matrix there. It's a fancy way of looking at it, but that's what it does. It simply rotates the image in three different directions, but it doesn't change anything else. It leaves the images as is and then translates this with a translation vector. Why are there 6 degrees of freedom? Well, because there are three angles to rotate, and the vector t which is a translation vector also has three different numbers. It could be translating the x, y, and z direction. The affine registration is a slight change from the rigid registration. So the only change is, if you look at the formula now we have a transformation T indexed affine of v. Has exactly the same form, is a matrix A. Before we had a matrix R multiplying the location of v plus a translation vector. So the translation of X stays the same. It just moves the image around. However, the affine transformation matrix A has 9 entries. So, it's not a rotation matrix. It's actually a matrix where all the entries can be different, and there is no restriction on these entries, which is why the affine transformation has 9 degrees of freedom. 9 of them come from the affine transformation matrix A because it's a 3 x 3 matrix. And there is also the translation vector t which has 3 entries. So, 9 degrees of freedom from the affine matrix A and 3 degrees of freedom from the translation vector t, total 12 degrees of freedom. These two linear transformations are actually the work horses of registration in imaging. And then more complex nonlinear transformation, nonlinear registration are used and can be used, though there will be difference. And one has to be very specific about what exactly time nonlinear registration was used in a particular type of application. So, nonlinear registration can be used, for example, one is interested in transforming an image into another image and providing information about the target image in a way that one allows local deformations. For example, we can work with a collaborator who has a brain image supposed like the one on the left side on this slide that contains a brain cancer lesion. The template, which is on the right, could be used to transform the left image into the right image. However, it is a very general thing to say, well if there is brain cancer legion in a particular area, it's probable that, that led to local deformations in the brain, that are not necessarily addressed by an affine transformation, which is a global transformation on the image. So, this is a case where one could be interested in applying more nonlinear transformations to fit better with the observed brain. Let's go back to co-registration. Co-registration works better and requires fewer degrees of freedom. The reason for that is because it's the same brain, and we don't have to make huge transformation from one brain to another to simply register the image. Here are a few examples that do not require registration to a template, where co-registration is just fine. For example, if you are interested in identifying location-specific longitudinal changes, we have a brain, and we have a second visit for the same person. We are interested in simply tracking what changes in that particular brain. That doesn't require for us to go to a template of a completely different person. We just have to look within that particular image. Segmentation, if we're interested in obtaining white matter or gray matter or an area that corresponds to pathology, we don't necessarily have to register to another template. Though it can be done, and there are procedures that do that. But it's not typically necessary to first transform to a template and then do segmentation. Analysis of intensities over time or within a particular image also doesn't require registration to a template. And there are many, many other examples where registration to a template is not necessary. And we try to avoid it whenever we can. Though there are situations where we don't want to avoid registration to a template, and we may want to use the template registration. So what does registration to a template do? Well, first of all, it assumes that the brains can reasonably be morphed onto the template space. This is a big assumption, and it's an assumption that is often debated. And sometimes it's reasonable. Sometimes it is not reasonable because brains are very complex structures, and transforming them into a template is not necessarily the most intuitive thing to do. However, registration to a template is something that we do intrinsically. We think about it because we look at a brain image and then we think about, well, what part of that brain, or what part of that image is actually connected to known labels in the image? It's something that we learned from biology 101. We saw the various parts of the brain. This is what they do. And we would like to transfer that information from a general template, a general map, to our particular image, to our particular individual. Here are a few examples that do require reference templates. If we would like to present population level results, for example, a distribution of lesions in a population, then we have to either register to a template or to register to one of the images in the study that we have. Providing information of the type, ICH covered more than 30% of the thalamus in more than 50% of the patients. It can only be done by first looking whether ICH, in this case, intracerebral hemorrhage, covers thalamus in one particular person. Well we don't have the information in the original image so we transfer that information to a template. We look within the template, the thalamus was covered by ICH. And then count how many subjects had an ICH that covered the thalamus. Segmentation using a multi-atlas label fusion, we are not covering multi-atlas label fusion in this. But it's an interesting technique that takes a subject, has multiple atlases, all of them labeled. Registers the image to each one of these separate templates gets the biological information, acknowledges that all of them would be noisy. Then maps back the information to the original template and simply averages that information. It's a very powerful technique. It seems to be very, very useful, but it will not be covered in these lectures.