Medical Image Analysis Lecture Notes PDF
Document Details
Uploaded by SophisticatedEllipse
Indian Institute of Technology, Madras
Ganapathy krishnamurthi
Tags
Related
- Chapter 17:Image Post Processing and Analysis PDF
- RT5FIAPIA: Film-Screen Acquisition, Processing and Image Analysis PDF
- RT5FIAPIA: Film-Screen Acquisition, Processing and Image Analysis
- Basic Medical Image Processing and Analysis Lesson 5 (PDF)
- Image Processing Lecture 01 PDF
- Medical Imaging: Resumos 1º Teste PDF
Summary
These lecture notes cover medical image analysis, focusing on various imaging modalities like X-ray, MRI, and ultrasound. The document also details image processing techniques, including contrast enhancement, noise reduction, and registration, using MATLAB/Python. Topics include active contour models and neural networks applications.
Full Transcript
MEDICAL IMAGE ANALYSIS Prof. Ganapathy krishnamurthi Biotechnology and Bioengineering IIT Madras INDEX S.NO TOPICS PAGE.NO Week 1 1 Medical Image Analysis - Introduction 4 2...
MEDICAL IMAGE ANALYSIS Prof. Ganapathy krishnamurthi Biotechnology and Bioengineering IIT Madras INDEX S.NO TOPICS PAGE.NO Week 1 1 Medical Image Analysis - Introduction 4 2 X-ray imaging 5 3 MRI Physics 34 4 MAGNETIC RESONANCE IMAGE ACQUISITION 74 5 ULTRASOUND IMAGING 89 6 RADIONUCLIDE IMAGING 108 Week 2 7 Basic Image Processing Methods 113 8 Contrast Enhancement 117 9 Histogram Equalization 131 10 Edge Enhancement - Laplacian 138 11 Noise Reduction 145 12 Diffusion Filtering 157 13 Bayesian Image Restoration 167 Week 3 14 Registration Introduction 172 15 Framework 183 16 Image Coordinates 189 17 Transforms 195 18 Metrics 207 Week 4 19 NonRigid Registration 211 20 Demons part - 1 219 1 21 Demons part - 2 225 22 FFDBSplines 234 Week 5 23 Endoscopy - Where are we with AI ? 255 24 Computer vision & DL in the operating room 273 25 ML in intraoperative tissue identification 290 26 Basic Image Processing Techniques Using MATLAB 304 27 Image Registration Using Matlab 310 28 Basic Image Processing Techniques Using Python 353 Week 6 29 Calculus of Variations 372 30 Snakes - Active Contour Models 388 31 Snakes - Active Contour Models 406 Level sets,geodesic active contours,mumford - shah functional,chan - 32 vese 422 Week 7 Segmentation Models Demo [Snakes (Active Contours ) Chan-Vese 33 segmentation, Geodesic active Contour] 457 34 ACTIVE SHAPE MODELS 486 35 Snake tutorial 525 36 Level Set Method 535 37 Chan Vese Segmentation 543 Week 8 38 Neural Networks Introduction 544 39 Linear Regression 562 40 Gradient Descent Formulation 575 41 Linear Regression Demo 651 2 Week 9 42 Feed forward neural Networks 674 43 Example with XOR 681 Week 10 44 Introduction to CNNs 708 45 Max Pooling 713 46 Applications of Cnns 730 Week 11 47 CNN Training 743 48 Semantic Segmentation 762 49 Classification Demo in Pytorch 847 Week 12 50 Generative Models 866 51 GAN Final Demo 931 3 Medical Image Analysis Professor Ganapathy Krishnamurthi Department of Biomedical Engineering Design Indian Institute of Technology, Madras Lecture 1 INTRODUCTION Hello and welcome to the Medical Image Analysis course offered on the NPTEL platform I am Ganapathy faculty at IIT madras. And I will be an instructor for this course and I will be teaching you over the next 10 to 12 weeks about various new and old techniques in the field of medical image analysis. These especially I will also be covering the latest machine learning techniques data intensive machine learning techniques used in the clinic. I will also be accompanied by two clinicians who will share their perspective on how these methods translate to the clinic. They will also talk about slightly less discussed aspects in medical image analysis especially in the applications in endoscopy, laparoscopic surgery as well as image (())(1:01) surgery. This course will have a lot of coverage on the theoretical aspects of the techniques we will have a lot of demonstrations we will be mostly using the matlab platform for demonstrations as well as some coding. I hope that this course will offer you as a platform to learn more about the applications of medical image analysis in the clinic as you know either for your profession or for your academic career. Thank you. 4 Medical Image Analysis Professor Ganapathy Krishnamurthi Department of Biomedical Engineering/Design Indian Institute of Technology, Madras Lecture 2 MRI Physics (Refer Slide Time: 0:14) Hello, and welcome back. So, in this class we are going to look at magnetic resonance imaging, specifically the physics of MRI. And in the next video, we will look at some of the image acquisition techniques as well as the hardware required for magnetic resonance imaging systems. (Refer Slide Time: 0:35) 5 So, here is the outline, we are going to look at a brief introduction to the origin of magnetization. In the sample, will understand how the individual spins, so called spins are interact with the external static electric field, will understand terminologies related to transverse and longitudinal magnetization. And then, we will look at the origin of the MR signal, that one that is used for actually putting together the images that you see from an MR scanner. (Refer Slide Time: 1:09) So microscopic magnetization. So, every nuclei has both charge and the so called spin angular momentum. The spin angular momentum is actually intrinsic property of the nuclei. And it has no counterpart in classical physics in the sense that the idea of spin originates from quantum mechanics, but we will not go into the details of how it came about, just understand that in addition to charge, the nuclear also have this spin property. And this is the property that leads, gives rise to the magnetism. So, each nuclei, basically once with the atomic, atomic number or mass number, they process is something called the spin angular momentum, we denote that by ϕ The spin angular momentum gives rise to magnetic properties, that is the one that uses to interact to the external magnetic fields. The microscopic magnetic field has a magnetic moment associated with it, that primarily comes from the spin. And that is that moment vector we denote by µ = γϕ this γ is known as the gyromagnetic ratio, and it can be measured for different types of nuclei. So, the gyromagnetic ratio has units of radians per 6 second per Tesla, sometimes you also will also see this notation, which is nothing but γ‾ which γ is 2π Now, I am kind of going to abuse notation and use gamma and gamma bar interchangeably. But wherever required, I will try to mention that and you can put the appropriate symbol. Again, this class is just to understand some at a qualitative level, how MR images are produced, and also understand the mechanisms of contrast. So that is where we are actually headed. (Refer Slide Time: 2:59) So, the macroscopic magnetization comes from all these individual spins. So, if you can think of a system of spins, so basically, if you look at our body, we have lot of water in our body, body is mostly water, so there is a lot of hydrogen atoms and they are mostly protons, so they are the overwhelming contribution to the spin. So, in the absence of any external magnetic field, all these spins are randomly oriented. So, you can think of these spins like a compass needle. Something like this, that are oriented in random directions. And so, these randomly oriented spins cancel each other out, leading to a net bulk magnetization or macroscopic magnetization. But in the presence of a static magnetic field, let us say along z axis, so, without loss of generality, we can always assume that if we apply a static magnetic field, it will be that the direction of that magnetic field is the z axis. So, the magnetization vector is actually a vector. So is the magnetic field is also a vector. 7 And in that case, what happens when there is a static applied magnetic field, there is a preferred orientation of spins, along the direction of the applied field. And this leads to a net magnetization, which we can write in this form, which is basically the sum of individual nuclear magnetic moments, in a sample, think of this as a vector sum. Rather discussion, treating off as a vector sum. Now, there is actually an expression for this. So if you leave the sample a particular sample, in a static magnetic 𝐵0 field, long enough, that for a certain period of time because it takes time for all the individual magnetic spins to orient along the direction. Or, in this case, actually, from the quantum mechanics point of view, the spins generally aligned either along, or opposite to the direction, that is a possibility, but we will not analyse that way. We will get to that analysis later. For right now, we say it is just that we have an expression for the 𝑀0 What is more important here is that the 𝑀0 depends on the strength of the applied static magnetic field which is 𝐵0 it also depends on this P D. P D is nothing but the proton density. In this case the proton we are talking about is the hydrogen atom proton. So, basically what does the which we now know how an idea of what the kind of signal that is produced which, the signal produced depends on actually, we will see later that the signal produced depends on 𝑀0, which in turn depends on this applied magnetic field as well as the density of protons. So, this magnetization is what is induced by the presence of a static magnetic field. And here, considering a sample let us say in this case, the human body or a piece of tissue. (Refer Slide Time: 5:48) 8 But, this magnetization it turns out, is just not static, it is actually a function of time. And it is also need not be homogeneous also. In the sense it is needs out, so the spatially dependent. As at least in NMR experiments that is what will happen, so this 𝑀0or M, I will call it, will be a function of space as well as time. Now, we will define one other quantity just for the sake of analysis. See, there is a bulk angular momentum, that we can define, remember that we have of every individual, nuclei, we said there is something called a spin angular momentum. So, we can also say for the sample itself, there is a bulk angular momentum J, and it is related to the magnetization of the sample to this expression. But again, once again, this γ is the gyromagnetic ratio. So, in this case, now, we are like just to clarify, we are always talking about a sample. When I say sample, it is basically piece of tissue or a human body in a static magnetic field. Now, before we analyse, where the signal comes from? Just have to keep in mind there are three factors we will eventually find out, there are three factors which contribute to the contrast in an MR image, the appearance of an MR image is influenced by these three factors. One is called T 1 these are relaxation times, T1, T2, and the proton density. In addition to this, how these contrast vary? Whether the T1 contrast is higher? T 2 contrast is higher? Or P D is higher is determined by so called pulse sequence. And, we will see what that is also in later slides, the pulse sequence determines which one of these contrasts is kind of contributing more to the image. (Refer Slide Time: 7:25) 9 Al right. So, what happens when you apply a static magnetic field, so, now, we know that there is a spin angular momentum for individual nuclei, and there is also this bulk angular momentum J. And so, what happens is that the that grid there is a torque induced, and the torque, torque induced on which is depend, which depends on the static magnetic field. So, now if you have studied some high school physics, or 12th standard physics you have seen that if there is a current carrying loop, and you put that in a magnetic field, it experiences a torque it is very similar to that. The rate of change of the angular momentum which is the torque, which is dJ by dt, this is the torque that you are usually talking about is basically the cross product of the magnetization and the applied static magnetic field. This comes from, you must have seen the same plus 1, or plus 2 physics where you see basic electromagnetism from there we can write this expression towards M cross B, dJ by dt is M cross B. Now the why and, why do we need this because this actually gives you like the equations of motion so to speak of the individual of the magnetization vector itself. Now, so, the J we know that is a is the angle momentum vector associated with the magnetization M. So, M is gamma J. So, you can always substitute them, and also we know that B(t) can always be aligned with the positive z direction. So, we will always say B(t) by B 0. So, right now this B 0 is the static magnetic field there is no this particular B 0 as it is applied in a MR scanner, is actually quite homogeneous and it does not vary with time. The B 0 field as it is called, which is typically the directional language we applied to be z axis, so that, that does not change. So, then we can always say B(t) is B 0. And we also substitute instead of gamma, instead of J we will substitute M. So, why do we do this because see, we want what we want to do in when we do MR imaging is we want to map this M. And this M in terms depends we saw it, B 0 we also saw it depends on PD. And the other two factors. The other two factor that can be controlled that can be brought into brought to bear on the contrast is also the T 1 and T 2 relaxation types. So, all of this are expressed through this M, this is what we are trying to measure. And this we want to measure as a function of space and time. And this that is why we want to write this equation, this dJ by dt in terms of the magnetization. 10 (Refer Slide Time: 9:51) Now, if we solve this, that differential equation, this differential equation, if you solve for the magnetization remember we can always put M equal to gamma J, and substitute here. And when we solve this equation, we see this we get the following solution. So, we will not go into the detail, so how we would solve etcetera, it is a straight forward ODE, so you can solve it. So, we can see that there are three components. So M is a vector remember, which is a vector, magnetization, induced magnetization is a vector. So, this has three, it will have three covenants M x, M y, and M z. And we see that they evolve according to, if you see that M x and M y, there is a sinusoidal dependence with respect to time. And the frequency we will see as the frequency depends this gamma B 0, we will see is that is something called the Larmor frequency. I will mentioned that in a subsequent slides. So, from this equation, you can see that this the M x and M y components or in this case periodic. So, which means that there is a procession happening in the x y. So, we will, I will illustrate this in the later slides. 11 (Refer Slide Time: 11:00) So, let us look at this. So this, based on this equation, we saw that this omega 0 is γ B 0 is called the Larmor frequency. And has units of radians per second. And of course, we can always rewrite this as nu 0 is gamma B 0 divided 2 π, and we can rewrite the equations we saw in the previous slides in this form. So, what is this motion this is similar to that of a top or a gyroscope in a gravitational field, and this case the axis of the top is the direction of M. Basically the direction of the magnetization is same as the x on the top, and z axes is a direction of that which is direction of the acceleration due to gravity, in this case is the direction of the static magnetic field. So, this this these two equations refer to means that there is a precession around z, which is the same as the direction of the B 0 field around the z axis. So, there is a precession of this magnetization in the x around the direction of the applied static electric field. Yes, applied static magnetic field sorry, I said I have to fill this out mistake. So, this is just basically this these two equations denote a precession around that direction. Because you remember if you look at this M x and M y are they kind of periodic for this case sinusoidal motion. 12 (Refer Slide Time: 12:26) So, once again what is this Larmor frequency we saw is actually it dependent on the gyromagnetic ratio times B 0, B 0 is the applied static magnetic field. Now, there are three sources of the static magnetic field fluctuations. One is there is inhomogeneities itself with hardware itself, you know exactly, have B 0 everywhere and especially, so, there are going to be some fluctuations is there. There is there are two other properties, intrinsic properties of the sample which is a magnetic susceptibility and something called chemical shift. These two affect the value of B 0 locally. Since we know B 0 is a function of, let us say this is a function of r runtime, we do not we will exclude time of r. Now, we expect this to be B 0 everywhere, but there will be some delta B because of these two properties. And actually, this is exploited for imaging. Because you will see later that because this B 0 varies, consequently this omega naught will have to be slightly different, and that is what is used for obtaining contrast. So, the groups of nuclei in a spin system that are the same Larmor frequency are called isochromats. So, the hydrogen nuclei in water will form an isochromat, while those in for fat will form another isochromat. Because it might have a different slightly different Larmor frequency because B 0 is slightly modified because of the chemical surrounding. Sorry, I use the wiper instead of right here B 0. 13 (Refer Slide Time: 14:07) Next, so we will also now look at some nomenclature. Transverse and longitudinal magnetization. Where do this come from? So, the M as we saw has two components, we as we can think of them as having two components. One is longitudinal component, which is along the direction of the static magnetic field, remember, the direction is static magnetic field we said will be typically along B 0. That is there, that is basically B 0 direction is also taken as the z axis, but typically, that is how it is. And M x and M y, which is we saw there is a equation of motion for M x and M y. And there is actually sinusoidal dependence. And that component in plane component as we call it, is we call it M xy. M xy is written in complex form like this Mx, jM y this actually simplify lot of the analysis. That is why they write it. And then there is a direction which is basically the initial direction which is tan inverse M y by M y. So, this is basically this particular angle as you can look at it that way. So this alpha, I have indicated here, typically there is a, you would assume that there is some tilt away from the axis, and then it is processing around it. So even with just a static magnetization, magnetic field applied in along the z axis, the spins, the individual spins, align preferentially along the direction of the static magnetic field. And they also spears, precess around the direction of the static magnetic field, there is an arbitrary face associated with it. 14 (Refer Slide Time: 15:37) Now, this is what I was trying to show, implying from the previous slide, so you can think of individual nuclei, or, the protons in this case, these are think of these are hydrogen atom protons, because they are the most abundant in the body, and they have the spin property, and the spin is basically, think of it as contributing. And in fact, that is what gives rise to the magnetic properties of the material. So, you can think of it as like some compass pointing over a particular direction. That is what is indicated here, and it can end the direction which it points in the direction of the magnetization induced you can think of it that way. And when there is no magnetic no static magnetic field, all these are randomly aligned, leading to a net magnetization of 0. Now, in the presence of a static magnetic field, you would have the all of them preferentially aligned along the direction. So, the net alignment is along the direction. And which is what is shown here, in this figure, you see that most of them are pointing upwards, and, therefore, if we take a component along the direction of B 0 field, there is always a component along the directional of B 0 field. And you will also see that the you can you can say that, since they are pointing in arbitrary directions, the transverse component might cancel and become 0. So, generally there is only a component pointing along the direction, and there is a precession. So which means that if you think of this as a net magnetization, and this precesses around the direction of the magnetic field. So that is the general setup for an MR experiment, or MR imaging experiment. So, you have a sample is basically human patient, or, for that matter, any other tissue sample or biological sample, it is placed in a static magnetic field pointing along the z axis. And consequently, all the magnetic spins, or the nuclear magnetic spins are aligned 15 preferentially along the direction on the static magnetic field, and there is a precession also, and this is the initial setup. So then, how do we how do we make the measurement? Where does the measurement come from? So that is what we want to do? (Refer Slide Time: 17:47) So, this is the picture. So, this is a precession that we talked that I was talking about. So there is a B 0 field along the z axis, these are the individual let us say, magnetic spins, which are in general precessing around the direction of the magnetic field. Now, if you think about it, then you can, you can of course, do a vector sum, have like one arrow processing, so there will be a component along z, and there is a in plane component which is the xy plane component, which is like this, if you think one component which will also be precessing in a particular direction. So, there is an xy component. The B the z direction there is an M z comp, there is a sorry, there is a M z component, which is along this direction, and there is a M x y component here. So, this M, this magnetization which is rapidly rotating with a frequency mu 0 proportional to nu 0 sorry, in the plane, and if you put like a coil of wire here appropriate coils of wire here, it will induce a current in this. 16 (Refer Slide Time: 18:54) And that is current is your the NMR signal, what is the origin of that NMR signal? That is that is what we are looking for. So, the xy component as we saw when we go back to the previous slide, so, a component that we saw M x and M y have a sinusoidal dependence, and we can write it in this form. Where this mu 0 comes, this mu 0 is the Larmor frequency that we saw. This means that in the plane as I indicated earlier, the M xy component is rotating rapidly. Now, in the in their assistance, there is a rotating magnetization, if we place a coil of wire outside the sample, then this rotating magnetization can be measured. And this is exactly what is used in an NMR signal. It was to use, this is the origin of the NMR signal. So, this magnetization let me go back here signal. So the signal frequencies in MR. This mu 0 turns out very the radio frequency range, megahertz, radio frequency range. And so, then the radio waves are generated by the coils. And in fact, there is one more step that we will get to where we actually need to generate a radio wave, order to measure another radio frequency. So, there are there is how do we how do we know, how do we associate a signal we are measuring to this quantity here. That is the important part. So, we saw that, we have a net magnetization, because of the static magnetic field, there is a x, it is precessing around the direction the static magnetic field, there is a component in plane, one in plane in the sense. There is a you can split that magnetization into two components, where it is a vector one component along direction of the magnetic field, another one perpendicular to it, the one perpendicular to it is what we can measure. And that can be measured by because it is actually rapidly changing as a function of time, we can place a coil of wire, and it will induce a current in it, and that current can be measured. Now, we want to now associate how and 17 relate this signal that we are measuring that current induced or voltage induced EMF as it is called, and the magnetization. And that, that relationship will then help us to map the magnetization across the volume. So whether we will not get into the details, but what we can do is we can actually deliver an expression for a rapidly rotating magnetization cutting across a coil. So, there is a coil of wire, something like this multiple coils, and then there is a M field. M, magnetization which is rapidly every time it rotates, it cuts across the coil of wires, this will generate a signal in the wire. Now, which this will involve integrating across the area of the coil. So, you will be measuring a net magnetization. And you will have to integrate across the area of the coil. Now, this is a problem. So just give you a qualitative reasoning. See, measuring net magnetization is pointless. Because what we want is, we want spatial localization. That is what an image is right. Remember, for CT images, we were able to localize density differences. When you reconstruct, the signal is proportional to the density, this mu is a function of energy, the linear attenuation coefficient that we reconstructed is actually a function of the energy as well as the density of the object, or the atomic number. So similarly, the net if you do this particular analysis, when we keep a coil of wire, and if you do the analysis, like you, you integrate across the area of the of the coil, that is typically what you would do. Because you want to, you know to calculate the flux, you would end up doing that. But that does not help because you will be only able to measure one quantity, which is the net magnetization, what do you want is magnetization as a function of r time, where r is in the sample, that is as a human body. On every position, we want to be able to localize. So, there is something called the principle of reciprocity, which lets you rewrite that integral in terms of a volume integral of M. So, the rate of the change of the flux, which is the derivative of the flux across the coil, that can be rewritten as a volumetric integral of the magnetization. And that that is called the principles of principle of reciprocity. Once again, this is just for qualitative understanding, you do not have to get into the details, I will just show you the expression that is involved. And in the end, what is more important is, yes it understand what the MR signal that one is measuring, what is it proportional to? What influences that signal, that is what we are heading towards qualitatively understand that part. 18 (Refer Slide Time: 23:27) So, if you look at this, for the M xy is proportional to this, this is a signal we have we saw that, we solved that ODE for the magnetization or the angular momentum, then you get expressions for M x and M y which are sinusoidal dependence. So, you can put them together as M xy in complex form, and the induced voltage in the coil of wire can be written in this form, where M is the magnetization. So, this is a vector dot product. So, both of them take the vector. And B r is the, this is the magnetic field produced by the receive coil, the coil that you are using to measure. It is called the receive coil, and this is the magnetic field produced by the receive coil at a position, r the same position r due to a unit current. Once again, we will not go into the details of this derivation, I will just to give you an idea of how we are going to proceed with the analysis. So, it turns out then after you act, we can actually make some simplifying assumptions. And in the end, if you look at the magnitude of the voltage induced, magnitude of the signal introduced, it is proportional to this nu 0, which is the, it return is the Larmor frequency. This is what you call the voxel volume, in this case an infinitesimal volume. Think of this as a volume over which the magnetic field is constant, static magnetic field is constant or M is constant. M 0, which is the induced magnetization the magnitude, and sine alpha. sine alpha is the tilt from the axis. Remember, we have this we showed this picture, this is the z axis, and this is the induced magnetization, and it is at an angle alpha. So, this is, this can be maximise. So, it depends on all of this. So, if you have a very high M 0 the signal is very high, if nu 0 is high, signal is very high, alpha is high, alpha maximum alpha is pi over 2. So, if alpha is pi over 2, which 19 means that you have you are actually your entire, you flip the magnetization is actually in the plane, this direction then your signal is very high. So, the next step is you want to get a good signal, what is done is to tip this magnetization which is now precessing around the direction of the static magnetic field, tip it into the plane which is perpendicular to magnetic, the plane perpendicular to the direction of the static magnetic field. So, that is the, that is how you would actually induce the MR signal that you typically get in all these imaging experiments. (Refer Slide Time: 25:59) So, there is one other concept you will come across, I will just briefly touch upon it, it is called the rotating frame of reference. So, if you look the, the if you tip let us say the magnetic, M xy component is in the plane. It is precessing at a frequency nu 0, this is a very high frequency, radio frequency range. On the other hand, you can actually let the coordinate system rotate at this frequency, if you get the coordinate system rotate to this frequency, then your magnetization is basically, it is not it is not moving. Or you can it is not rotating or anything, it is just some vector with this magnitude. Stationary vector with the magnitude and a phase angle, that is all it reduces to. So, this is the idea. So, this actually simplifies analysis quite a bit. So that is why we will use a rotating frames of reference, when you are working on analysing MR signals. So, in order to generate like a good MR signal, we have to tip this magnetization vector, we saw M into the plane, we saw that. It is proportional to sine alpha, alpha is pi by 2 is maximum. So, you make it nine. So, you flip it into the, tip that magnetization to the plane, you get very good 20 signal. How do you tip this magnetization? This is where this nuclear magnetic resonance aspect comes in. (Refer Slide Time: 27:26) So, the way the tipping is done is by applying an RF signal, so the energy for tipping the magnetization into the plane is provided by a RF signal. So, there is another coil, which generates a magnetic field, it is called the B 1 field. I have not mentioned it here, and this B 1 field, incidentally also is oscillating at the Larmor frequency. Why do we need that if you think about it, let us say you apply the B 1 field at an arbitrary frequency. But it is B 1 field is always perpendicular to the B 0 field. B 0 is along the z axis, B 1 let us say will be along the x, this is the B 1 field. Now, what happened we saw, we saw the M cross B, the torque is M cross B. So, when you apply this B 1, this will also produce a torque, however, the B 0 field is always much stronger, this B 1 field is much, much lesser than B 0 field. So, it will not be able to influence that magnetization that much, because the B 0 field will eventually also have a torque on it, it becomes an issue. So, the way to do that is by doing something in resonance, which is basically applying this rapidly oscillating B 0 field which oscillates at the same frequency nu 0, the idea is if the B 1 field also oscillates, then it will rapidly what our push the magnetization into the plane. So that is where the resonance aspect come. The resonance, these called resonance imaging because they applied B 1 field which are applied at right angles to the B 0 field we will put a torque on it, which enforce the magnetization into the plane. But our it will not be enough. Because the B 0 field is always 21 stronger. So, then you have to do it at a certain frequency nu 0, this oscillating field has to be at frequency nu 0 in order for it to tip. And the tip angle is generally given by this expression 0 to. It depends on how much time you apply. So, B 1 is not permanent, like the B 0 field, you applied for a specific period of time, that period of time determines how much away by what angle, you tip the magnetization and is given by this integral expression. See, again, this gamma will be there as a prefix. (Refer Slide Time: 29:39) Alright, so what the essentially happening is, if you look at it in the rotating frame of reference, this is your net magnetization, let us say initially, it is along z, just for the sake of argument. For illustration, it is along z. And again, I use x prime y prime z prime, it does not matter there. It just I just mean x, y, z. So it is along z, and then you apply this B 1 field, remember. Let us say I have applied it along B 1, then it will tip the magnetization into the plane which is into this plane. On the other hand, or it depending on the duration. If you want to tip into the plane. You have to applied for a proportional period of time. But if you look at the laboratory frame of reference, what you are doing is, you are it is actually spiralling, the M is actually spiralling into the plane. The magnetization is spiralling on the plane. If you look at in a rotating frame of reference, then it is actually it is just tipping into the plate. Now, from the laboratory frame of reference, you can understand this, it is spiralling because the applied B 1 field also has the same frequency as the precession frequency of the M, it is just like when your swing you are somebody on a swing, you have to time your push properly so, that next time they go or they go back and forth they get a higher displacement, very similar to that. 22 (Refer Slide Time: 31:01) So, now, so, this is where the actual emitting signals start to arise, correct. So, once you have tipped it into the plane what. So, once the magnetization is tipped, you would think, once you magnetization tipped, you will turn off the B 1 field, B 1 field is set to 0. So, ideally if you leave it that way it should precess there forever correct. Because initially you had applied a static magnetic field, and they were precessing along around the direction of the magnetic field. Now, if you tip it then you should have a signal, there for, it does not happen unfortunately, because there are physical laws, and processes at play. So, these physical processes dampen that motion, that precession in the plane. And so, eventually the in plane the one that the magnetization you tipped in plane, will decay. So, there are two processes that lead to that decay. So, one of them is called the transverse relaxation, or spin-spin relaxation. And this causes signal to decay and because of the perturbations in the magnetic field caused by the spins themselves, so, neighbouring spins will modify the B 0 field in at a particular spin location. So, then this that leading to inhomogeneities. And the way you think of it is defacing is, if you think of a bunch of spins precising around in plane, and each of those spins will cause some, majority somewhere else. And that means the magnetic field there is either reduced, or increased and subsequently the spins at that location will get to either a higher frequency, or a lower frequency leading to defacing, only if they are all precessing in phase do you get, you get a strong signal, otherwise the signal goes to 0. Now, the process now once you tipped, it starts going to 0, but 23 still you can get a induced signal. And, that signal is called free induction decay. So, the magnetization is tipped into the plane, and it is rapidly precessing this leads to a current, or voltage that can be measured into a coil. And, that voltage starts to, that signal started to goes to 0 rapidly because the transverse component will decay, because of the so-called transverse relaxation process or spin-spin relaxation. (Refer Slide Time: 33:15) So, this is what I have shown here in this particular illustration. So, you have a bunch of spins, precessing around the direction of static magnetic field, you apply this 90 degree RF pulse, which is basically your B 1 field, and it you stip the spin, you tip the magnetization into the plane, but why as soon as it is tipped, it will start to deface. The individual spins will start to all precess with different frequencies, in getting different directions. And, over time, they will, there will be so many all of them will get acquired independent precision frequencies and faces leading to 0 magnetization. This, however this you will see this can be measured as a signal, this process can be measured a signal, which is rapidly decay to 0. And that is called the FID, free induction decay. Mention that, this process is actually characterize by that time constant, T 2. This is where the T 2 contrast comes from. 24 (Refer Slide Time: 34:14) The second before we go any further, I just want to, the other form of relaxation is the longitudinal relaxation, which is basically the reappearance of the longitudinal magnetization. You have the M z component, we have tipped it, to then after immediately after tipping M z, that will go to the 0, but then over time it is totally start to reappear. So, but then that process again this is may not be, count very obvious at this time or not very intuitive, the rate at which M x y goes to 0, and the rate at which M z reappear are different. So, they have different time constants. So, that one is T 2, this time constant is given by T 1. And, for different types of tissues, the T 1, and T 2 have different ranges. So, T 1 is always higher, T 1 ranges from 250 to 2500 milliseconds, while T 2 ranges from 25 to 250. So, just to remember for the sake of understanding, T 2 is the is the time constant which determines how fast your transverse magnetization which you have tipped into the plane. The how fast that goes to 0, because this is the time constant for the processes that drive that component a 0. However, that does not mean that you recover the a magnetization along the z axis of the along the direction of static magnetic field instantaneously, that takes a slightly longer time. And that time constant is T 1. So, this T 1, and T 2, are those time constant they depend on the properties of the isochromats, Where are they made a sense? what kind of tissue or imaging, what kind of atom, or nuclei you are imaging. So, in this case in the body test, hydrogen, proton, that is a nuclei or imaging, but then the its chemical environment will determine the T 1, and T 2. 25 (Refer Slide Time: 36:04) So, for all this together, remember, we wrote this equation, this kind of M cross B, equal to dJ by dt is something we wrote for just a magnetization in a static magnetic field. Now, if we take into account, there is actually a bracket I left out here, so this is a bracket. Now, if you take into account all these factors that we talked about, and we talk of, and we also include B 0 and B 1. So then we can write down the equations of motion, these are called the Bloch equations in this fashion. So, these are two differential equations, that did show how M x and M y evolve in the presence of once, in the presence these equations in the presence of B 0 and B 1. And this is after B 1 is removed, how does it behave that this determine after B 1 is removed. That is when we start the imaging process. And that is these equations then determine your source of contrast, what, how, what do a signal depends on etcetera. So, these are used to actually figure out different types of imaging tricks, they are called sequences in magnetic resonance imaging. 26 (Refer Slide Time: 37:15) Alright, so the first sequence that we are going to talk about, again, this just for the sake of understanding what is, what exactly is happening, this is called a sequence, an imaging sequence. Which basically, what we are trying to do is manipulate this magnetization, M. One way, we saw how to manipulate this, we tipped it into the plane, that is when we have the coils there that measure the induced signal. And, we use that signal to infer M, magnetization as a as a function of position. And this is what we want to do. And, so one of the ways of doing that is this spin echo, just we will look at the actual 3D imaging sequence in the next video, but this is just for the understanding of how the spin echoes are done. Spin echoes, we saw that you apply this 90-degree RF pulse, B 1 field, B 1 field, in this they are all along x axis. I think maybe, I should done the x differently. But anyway, just for the sake of argument, we will just do it this way. If you are you apply the B 1 field perpendicular to the direction of the magnetic field along one of these axes, and then it will tips let us say you do a 90 degree pulse, I call the 90 degree pulse, it will tip the RF pulse, which is the B 1 field will tip the magnetization into the plane. However, you can always call it as alpha pulse, the alpha is any angle that you want to tip it, so the 90-degree pulse will tip it in magnetization into the plane, the red arrow is the magnetization, it will rapidly deface, but then now what you do is you apply a 180-degree pulse, so this 180-degree pulse, what it will do is it will flip the magnetization. It will flip the magnetization into this way. It is a 180-degree flip from where it is. So, what happens is they are still precessing in the same direction. So, they will once again come together here, and that resets to another signal. And, then followed by a decay. 27 So, this one will be a decaying signal, because you tipped it immediately. And then it starts to deface that gives raise to this signal. And, what you do is you wait up to that time called T over 2, it is called time to echo. And, after that, and when you apply 180-degree pulse. So, 90-degree pulse just to understand 90-degree pulse will flip the magnetization by 90 degrees, 180 degrees plus, will flip the magnetization by 180-degrees. In this case, when you flip by 180-degrees, you actually go right over there, you flip around, you can flip along the around the y axis here, according to this picture, but then you are still precessing in the same direction, you are all precessing in different directions. So, then you will come together once again to form another that gives rise to another signal. So that is what is shown here. So, you go once you get this other signal, it is rising, because you come together and then you will decay again. So, this is the spin echo. And the 180-degree pulse is applied at time T, from T by 2 from the time you apply the 90-degree pulse, and then you will measure the echo at time T E, so time to echo. This is one parameter that people manipulate all the time, time to echo, when you measure the signal T E will determine your contrast. We will see that in the later slides. To determine the contrast that is one more time which is called TR. Let us call repetition time. So, for instance, in all of these experiments, it is not like you just do this once and then let us say you are done. No, you will have to do these sequences in order several times the time between each time, and time between each of these very crudely speaking a time between each of these 90 degrees pulses. Every time you have to apply 90-degree pulse to flip the magnetization in plain. So, which and that time between two successive these 90-degree pulses, you can call it time to repetition. So, this T E and T R determine contrast, so, we will see that how that happens. So, there are different forms of contrast. We saw that earlier. Also, I mentioned it, T 1, T 2 and PD. We will see how that is. 28 (Refer Slide Time: 41:19) So, the basic contrast mechanisms. The type and ordering of excitations and relative timing, that leads to different type of tissue contrast. And, this is what is specified using a pulse sequence. So, this pulse sequence determines what kind of contrast you are getting, the time interval like I said between two successive alpha pulses is the time to repetition, we saw what is the time to echo the last slide. See only the transverse magnetization provides the measurable signal. So larger the transverse component, higher the signal. And, if you want to see contrast in different types of tissue, the measured signal must be different in these tissues. That is how we do, the magnetization that you measure in these different tissue types should be different, because we saw that the signal magnitude of B remembers that expression last few slides ago, it depends on M 0. So, whether M 0 was different then you get good contrast they are the same you do not get contrast. So, the contrast is provided by three main properties we saw proton density. Proton density understandable, because as these are more protons, you get a bigger M 0. Because each of those protons contributes to their net magnetization, and there is a T 1 and T 2 weighted time. We saw what T 1 was, T 1 was the rate at which you recover the longitudinal magnetization, and that is a tissue dependent property, it depends on the chemical, the biochemical constitution of the particular tissue, and T 2 also same thing, it is a chemical property. Because you are looking at how fast does the spins defacing a plane. And that depends on the kind of inhomogeneities introduced by other spins in there. And that depends, again, once again on the chemical composition of the tissue at hand. So, both of these are tissue 29 dependent, these properties, and we can capture these properties by playing with T R and T E. There is other property is T E also we measure. (Refer Slide Time: 43:26) So, proton density weighted imaging, and this is accomplished by long T R, or an either no echo or short T. Why do we do that? See, if there are if you wait long enough, so long T R is between two successive pulse sequences, that is at time T R. So, before you apply the second pulse, you wait for the longitudinal magnetization to recover completely. Now, different tissue will have different T 1 times, which means that the amount of magnetization that is recovered for different tissues will be, let us say there are two different types of tissue. I will do green and blue and green, blue and red. This one is T this, let us say this is 100 milliseconds, or 1000 milliseconds, this is 2000 milliseconds. This is T 1. Let us say it is T 2 is this is 20 milliseconds. This is milliseconds and this is 40. Or in this case, 5 milliseconds. So the idea is, if we wait long enough, we do not wait long enough. Let us say we start the second experiment second pulse, alpha pulse at immediately admits the first alpha pulse at time 0 second alpha pulse let us say we apply at 1000 milliseconds. Then what happens is that in this tissue, the longitudinal magnetization has not recovered, correct. Longitudinal magnetization has not recovered here, but it has recovered there. So consequently, the M 0 that we measure will be higher from this tissue compared to that. Similarly for the T 2 time, T 2 determines how fast it goes to 0. So, if you measure soon if you if you are time to echo is very short, is one let us say it is only five milliseconds. You will, you will not be able to capture this one, this signal because this is what dissipated by 30 that time. Let us say your measuring time take was 5 milliseconds. Then, all of this the contribution from this tissue would have dissipated by 5 milliseconds. So, I will only get the 20-millisecond component. So, the idea is we do not want that to happen, we want it to strictly depend on the density of the protons in each of them. So, what you do you wait long enough, let us say you wait for 5000 milliseconds, which means that the longitudinal magnetization would have recovered in both of these tissue sets. And then once you flip, you measure immediately, which means that you do not, this both, this T 2 time will also will not influence your measurement. So that is how you get a proton estimated image. So, like I said, T 2 weighted contrast difference in T 2 relaxation times must be apparent. So, which means that T must be selected to be T 2 value of the image of the tissue being imaged. And we should have large T R to reduce T 1 effects. So, we need a large T R so that the T 1 factor is not shown. So, all the magnetization in all the tissue will recover, large T R. But if you want, if you want to have a, no just want to get T 2, then you just measure at some add the tissue, for instance should be approximately selected to be T 2 of that tissue being imaged. So, you can either choose that say you want at T 2. See if you wait too long, all of them will go to 0. If you wait too long to measure, all of this will deface, let us say 5 and millisecond, and 20 milliseconds, if we wait 40 milliseconds, just the spins of both of them would have gone to 0. So, you will not get a, so you will not be able would have gone to almost close to 0 or very low, you will not be able to make the difference. So, you want to measure this tissue, means you take the time to echo as 5 milliseconds and measure that. T 1 weighted contrast same thing. Where do you make sure T R must be set approximately close to T 1. So, in this case, if want to measure this tissue, you set it to, you set T R to 1000, which means that only that tissue would have recovered, so we will get a high signal from there. So that is the idea behind how you get different types of contrast. So, you have to think about a bit. So, understand that T 1 is the time constant for the recovery of longitudinal magnetization. T 2 is the time constant for the dissipation of the transverse magnetization. Remember that the transverse magnetization is what used raised the signal, and the transverse magnetization is actually from the longitudinal magnetization because that is what you tip into the plane. So, the larger your longitudinal magnetization, the higher your transverse after the application of the RF pulse. 31 So that is all for this class. So the understanding here, just to summarize, the idea is you have all these proton nuclei, protons in your body from the hydrogen atom nucleus, they all have a spin angular momentum property, which can interact with the static magnetic field, very high value static magnetic field, and which leads to a net magnetization, this magnetization precesses around the direction of the static magnetic field with a certain characteristic frequency called the Larmor frequency, which is mu 0, or nu 0. Then upon the application of another rapidly oscillating magnetic field, when it say rapidly oscillating I mean, it is the same frequency as the Larmor frequency that you are trying to of the material you are trying to measure. So, the upon application of that these, the precessing magnetization is tipped into the plane, we call that the transverse magnetization. And now, once again, it is still precessing at the Larmor frequency giving rise to a signal in a coil of wire. And there are these three important factors that determine the strength of the signal, which are basically the T 1 relaxation time, T 2 relaxation time and proton density, by appropriately tuning your time to repetition, which is the time between two successive alpha pulses. And the time to echo, time to echo is the time from the application of the alpha pulse to the measurement of the signal in your coil of wire. By changing those times, you can make sure that either the proton density is what contributes mostly to the image contrast, or it is only the T 2 times, the difference in T 2 relaxation times is what contributes to the contrast or the difference in T 1 relaxation times. Once again, before we conclude I would make the point that these are relative. So, when you say T 1 relaxation time, you are not we will not be able to absolutely measure 1000 milliseconds from the voxel values. So, if something has a for instance just as an example if some part of the tissue has a higher relaxation time, maybe depending on the T R it will appear dark, the lower relaxation time T 1 relaxation time might appear bright. Similarly for T E, if you depending on how soon you do these measurements, the lower T E might appear darker, higher T E might appear brighter. So, this is why, and of course proton density once again is also relative the higher, you can only see relative contrast. In the sense, something is darker means you are either more or less protons than the other regions. So, this but then if you look this kind of gives you the flexibility to do multiple different contrast mechanisms. That is why MR is one of the we can highly researched imaging modality because the modes of contrasts are huge. I only talked about two or three different 32 three different these are the most commonly done. But there are other contrast mechanisms also that can be done, and that is a lot of interesting research going on to that area. Thank you. That is all for this class. 33 Medical Image Analysis Associate Professor Ganapathy Krishnamurthi Department of Biomedical Engineering/Design Indian Institute of Technology Madras Lecture 03 Magnetic Resonance Image Acquisition (Refer Slide Time: 0:15) Hello and welcome back. So, in this class, we are going to talk about magnetic resonance image acquisition hardware and so-called Pulse sequences, just to give you an understanding of how images are acquired. We will also understand some of the contrast mechanisms better. (Refer Slide Time: 0:34) 34 So, this is the overview of the class, we will look at some of the hardware that goes into MR imaging systems. I call it instrumentation but we will only be looking at it superficially, in a sense, just seeing what the components are. So, we will look at the main component, the magnet, the gradient coils, the radiofrequency coils, and the electronics, it contains, of course, we will not go deep down into electronics but just saying that these are some of the parts of the scanner and the imaging console. (Refer Slide Time: 1:08) So, as far as the magnet is concerned, it is the main component and this is what is required. It is also the most expensive among the components. So, it is typically a superconducting magnet, a cylindrical superconducting magnet, and a cross-section is shown in this figure if 35 you see the cross-section of the magnet and it is, it basically has a superconducting wire, which in this case is niobium-titanium wire immerse liquid helium which is held at 4 Kelvin, but that particular wire is superconducting at 9 Kelvin. The helium itself is inside a cryostat composed of a vacuum and liquid nitrogen. So, these magnets are required, you do not have to keep filling liquid helium often but liquid nitrogen refilling is required. The field strings vary from about 0.5 T to 3 T. There are of course, 9 T magnets also available, some of the higher field magnets are used in small animal imaging, for and such, biomedical imaging, and also as research magnets. So, the interesting part here is that once it is basically the wire is wound around a cylindrical core. So, it is just say energize once, so as soon as the critical temperature is reached energize it once, which means that you inject current into it. And the current keeps on going because it is superconducting there is not much loss due to resistance, of course, over time, all of it will dissipate. So, this leads to the magnetic field being a statistical magnetic field being set up. So a static magnetic field will point along the axis of the core of the magnet, and it is typically like I said, between 0.5 to 3 T, modern clinical magnets are either 1.5 T, or 3 T. So, I am not sure where these numbers come from, but I guess these are what is possible, given the constraints of size etc. So, like I said, when it says 9 T magnets also exist. So, one problem that you will also run study about is when you get into MRI, is that maintaining the uniformity of the field is a challenge, which means that across the cross section at every point, we have to make sure that it is 3 T and so on, and that is, that is hard to do, so there are some constraints like that. So that is basically a superconducting wire wound around a cylindrical core. And once the critical temperature is reached using the liquid helium, you inject it with the current and that current keeps going giving rise to a magnetic field, that is the static magnetic field that you use for imaging. There are now systems economical systems where people are trying to use permanent magnets and there are the portable systems etc., where they are trying to use permanent magnets or maybe you do not need such large magnets because if you are just imaging peripheral organs you do not need such large magnets, so which brings down the cost of the system. So, a lot of research is going on in that area. 36 (Refer Slide Time: 4:17) So, the gradient coil, so, we will see a little bit more about this later on. So, these gradient coils are also the basically current carrying wires, these wires give rise these current carrying wires give rise to magnetic fields. They fit inside the bore of the magnet, so there are three coils, each one of them orthogonal producing magnetic field gradients orthogonal to each other. The gradient coils do not change the direction of the magnetic field, they just add an x and y and z dependency on a magnetic field strength. And the magnetic field which I am talking about here, the static magnetic field and still points along the z axis, the x and y dependency are produced by saddle coils and z gradient is done using two opposing coils wound around the circumference. I have some pictures I think I will show. So, what do you mean by it does not change the direction of the magnetic field? So, we saw the, let me see if I can draw somewhere here very small. So, here this is our cross section of the core. So, the direction of the magnetic field is here. So, now we want let us say the 3 T magnets, so it will be, we would expect that let us take these random points here, we would expect the magnetic field to be 3 T everywhere. So, typically, that is true as long as we are talking about a nominal field of view. However, normally when I say a gradient coil, what it does is the direction of the magnetic field is still the same, it is along the axis, z axis, but the value here will be different, the value which means the magnitude of the magnetic field, if you can call it that, it just creates 37 gradients in this. If this is the value of the b field everywhere, it just creates a gradient around each of these directions, for instance, in this case, it is along x which I have drawn here. So, the gradient just changes the value, but not the direction of the field. The field is still along z along with static magnetic field still points along the z-axis. So, and it will not produce these gradients you need current carrying coils of different shapes configurations in order to produce these gradients. That is what I said earlier there is, for instance, x and y dependencies are produced by saddle coils, and z is done using two opposing coils found around the circumference of the cylindrical core. 38 (Refer Slide Time: 6:36) So, here is some examples right of the gradient coil. So, for instance, this is a gradient coil, which we talked about, this is two sets of wires bound in opposite directions, these are the saddle coils if we talked about kind of writing the x and y gradients. So, depending on how we make these coils the gradient is produced along each of those directions. The gradient amplitude again is limited by the current in the coil, it is very high currents, and it is very high 100 to 200 amperes. And just to give you an idea of the order of magnitudes, the maximum gradient amplitude is 0 to 6 Gauss/cm or in this case 10 to 60 mT/m. So, I distinguish off our magnetic field. The static magnetic field is about 3 T, 1, 2, 3, T is what we talked about and this is the gradient amplitude. The switching times this is important because when we look at Pulse sequences, later on, we will assume that these are instantaneous so this is not true, there is something called a slew rate. So, it kind of takes time for the gradient to turn on to reach the maximum value. And because of this constant switching of currents turning on and off of current there are again Eddy currents induced in the metallic components of the magnet housing and distorting the gradient field. So, there is again shielding for this etc. So, once again, here we go deeply into hardware, these are the hardware challenges in designing a magnet for a system for imaging. So, you can imagine that we have the cylindrical core, and you already have a superconducting wire, which is of course inside a vacuum on board say there is a vacuum so, 39 it does not touch anything, but, but still introducing these current carrying wires will lead to some distortion the magnetic field, and these current carrying coils are in a wound around in specific shapes, once we saw saddle coils and these are circular coils etc., and they will also produce some distorting field, how do you handle all that, that is challenging in some of the hardware design for MRI. (Refer Slide Time: 8:45) So, there are some limitations due to the gradient coil, the self-inductance of the coil, again, that is what prevents rapid switching of the gradients, and coils can be made smaller, but we made the coil smaller to reduce the field of use at a reduced rate. So, there is another actual hazard in this case to the patient because this rapid switching of the presence of currents etc. can lead to an Eddy current in the patient. And so, there is some limit beyond which we switch speed beyond which there is some nerve damage and so that is the limitation, that you also have hardware limitation, in this case biological limitation on the hardware. So, once again these are other sets of challenges that go with designing MR Hardware. 40 (Refer Slide Time: 9:42) The radiofrequency coils as we have seen is basically this is these coils is where it produces that B1 field, as we call it the B1 field they produce the B1 field, and this coil induces the spin precession and this coil actually also measures the current induced by the spins. So, we want to measure the echo spin. Of course, we will teach you later this is also done by the sort of coils that do both the excitation of the spins as well as the measurement. So, basically, its axis is both transmit as well as receiver coils, there are all kinds of coils, volume coils which surround the patient surface coil you just put on top of the patient, we are basically in close proximity to the patient. And again, designing these coils, how to get the correct RF field, RF out and shape the B field magnetic etc. this is again a field of study research in itself with a lot of groups of people working on this. Once again, this is one of the hardware challenges in designing an MR scanner. 41 (Refer Slide Time: 10:44) So, the radiofrequency coils again come with different configurations. I have listed some of them here. So, if you are into RF transmission etc. you should read up more about this and how to design these coils, what each one of them produces, and how to acquire electronics for these things. So, just to understand these frequencies, these RF coils once again can surround the patient or can be just in close proximity to the patient and they can be used for both transmitting and receiving RF. The transmitted Rf is what causes the spin precession and there the induced currents are measured by the received coils. So, again, there are surface and volume piles as I said earlier. And the other thing to also keep in mind is that the transmission and reception require very different current amplitudes in the coil, because the emitted current is kind of very small, we are talking about a the spins in our body causing a current and those currents are typically much smaller than the B1 field related currents. So, you have to worry about that also. 42 (Refer Slide Time: 12:04) So, there is typically a scanning console like all other diagnostic devices. So, like for reference, a CT also has one. So, the console helps you interface with the MR hardware, it helps to select the imaging planes, set ECG gating, respiratory gating, etc. So, also connected to the reconstruction engine so that the acquired data is then used by the reconstruction, just maybe it is a processor, embedded system, or maybe just another workstation, which can reconstruct maybe 10 to 50 images per second. So, MR is a real time imaging system, it just, it might, it can be an imaginary real time imagining system, it does take some time to set up but you can do very fast frames. For instance, one application of MR imaging is cardiac CT, MRIs, specialized hardware for it, you can actually image the entire volume of the heart in one cardiac cycle. So, several volumes can be acquired in one cardiac cycle. So that kind of speed is available, of course, it comes with this as a separate protocol that has been installed in your scanner. But again, once again, this reconstruction is real time and can do 10 to 50 images or maybe more these days. 43 (Refer Slide Time: 13:20) So, let us go back to how we actually acquire data. So, we saw the principles of MR signals, how they are produced, and magnetic resonance, and what does it mean? Or nuclear magnetic resonance in this case, or what, how do we understand it? How do we model it etc? But then, we are now going to look at in the context of imaging, how images are acquired using magnetic resonance, and nuclear magnetic resonance phenomena and that has to lead to something called Pulse sequences. So, in the next maybe half hour, a few hours or so, I do not know even less will try to understand how this is implemented in an MR scanner. So, how are the image planes? How are the imaging, 3D, volumes of the patient, etc. So, what are the fundamental steps of the following, we have what is called a slight slice selection gradient, there is a frequency encoding gradient, I think this is also a read out gradient. I think this again, one more terminology. Once again, if you are not familiar with the terminology, it is fine. If you want to ever get into this research, you should know but otherwise, it is just followed along. There is a phase encoding gradient and followed by image reconstruction, this is the four steps. So, what does each of these do and how are they used? That is what we are going to see. I will also present some so-called pulse sequence diagrams to understand the image acquisition process. 44 (Refer Slide Time: 15:07) Why do we need this high selection gradient? What is it used for? So now we know that as far as the MR system is concerned, we have a fixed set B0 field, so the Larmor precession frequency is, is proportional to be B0 so it is the same throughout the sample. So, when we apply the RF pulse it tilts that it kind of tilts the static magnetization into the plane, and that the precession spins in the plane induces an EMF, but all of them are, the precession frequencies for all of them is proportional to B0 And it does not really help because we will just get one FID. We saw that too we will get one FID if you can measure that, but that does not tell you where the signal is coming from, what is the spin density for instance, in a particular x, y, z, location? So, how do we go about doing this? So, the first step is to isolate the cross section by applying gradient fields, this is what we want to do, this is where the gradient coil is coming. So, we know what the RF coil does, this is where the gradient, the gradient coils help to localize x, y and z positions, we will see how it is done. 45 (Refer Slide Time: 16:25) So, we apply this so-called slice selection gradient, we just basically the gradient along the z-axis. So once again, remember, the direction of the magnetic field is still along z, just at its magnitude varies by the slice selection gradient. So, what happens is, once you apply a gradient at this rate, so many T/meter or mT/meter, times z the precession frequency, this is a precession frequency becomes a function offset, you can see that here. So, by applying a slice selection gradient in this case, that is why it is 0, 0, Gz, the x and y gradients are off, first we applied the z gradient, so it makes the Larmor pressure frequency in the volume a function of z, when we say a function of z here, this is exactly that function. So, in this case, you can see where we encoded the frequency as a function of position. So, now once we have this, at the same time, we apply the RF excitation process. Now, since the RF excitation is at a specific frequency, there is a bandwidth we will see on the next slide, there is a bandwidth associated with the RF pulse, so it will only excite tissue in a thin section. And, what is that thin section? That thin section would correspond to all the points who’s z position is the specific field dependent Larmor frequency. So, in this case, your RF pulse has a certain center frequency and bandwidth. And whichever z position corresponds to that, center frequency and bandwidth, because now we know ν is a function of z, only those pins will be flipped into the plane. So, that is the idea behind the introduction. So, this means that we are now only looking at a certain cross section of tissue. (Refer Slide Time: 18:23) 46 So, if we look at it better. So, if we look at this as a mockup of the patient lying on a bed, this red line is the z-axis. So, if we look at this mockup illustration, the x-axis just indicates the direction z along the length of the patient you are looking along, so this is just a side view; think of it like the side view, which is the precession frequency. This is actually a function of z, which is what this implies. The red line that you see there shows the strength of the gradient, which means that as it moves along z on either side, my precession frequency slightly changes because of the presence of the gradient. If you go back and look at this expression, it is ν(z) = γ( 50 + 𝐺𝑍𝑍). 47 So, at this point, the gradient is 0, let us say and as you move to the right and the left, see the precession frequency keeps increasing. So, which is what is shown in this picture? So, the red line indicates the strength of the gradient; if it is a shallow slope, it is a very weak gradient; if it is a sharp slope, that is a strong grain, which is shown here. Now, what does it do? Because it is shallow, going a small delta, this is the delta precession frequency, leading to a vast slice. Because the amplitude of the gradient is small, a very thick slice of tissue will have spins with pretty much the same precession frequency, which is what that formula also tells you. So, but if you make an extreme gradient, which is what is shown here, then if you go from in a small this is the bandwidth, if you can call it in your RF pulse, that leads to a very thin as much thin as slice, for the same bandwidth, δνwe get a thinner slice because the gradient is much sharper, which means that if you go a very small delta z there is a big change in the precession frequency. But that is what the gradient does because if 𝐺𝑍 it is very large, let us say, a very large number, then if you move a very small distance along z, your precession frequency changes very fast that is what that is that gradient does. So which means that if you have a very small bandwidth in your radio frequency signal, that will select only a very small or thin slice of tissue. On the other hand, if your gradient is very small, even if you go for your precession frequency to change considerably, you have to go a very longer distance, which means a thicker slice of tissue. So, for the same bandwidth in your RF signal, you will get a thicker slice on a thinner slice, depending on the strength of your gradient, so that is what is shown by this illustration. So, this way there are two things you can do, you can select your slice thickness, so you localize your spins, and you also help to select your slice thickness. So, this is the idea behind the slice selection gradient. So, slice selection gradient and the RF pulse are kind of turned on simultaneously, we will see that in the diagram. (Refer Slide Time: 22:18) 48 So this is a typical diagram that you will see in a lot of textbooks as well as papers etc. So, the constant jet gradient is applied, so that is what this is the time axis, the blue lines are the time axis. So, a constant z gradient is applied. Okay. And there is this, do not worry about this right now we'll talk about it later, when you get the chance at Laborde detail, this is called the refocusing gradient. So, I will just maybe tell you right now. So, the idea is, so, once you apply these at for a specific period of time because the slice thickness is finite, and we have a finite slice thickness, there is the difference in the precession frequencies, because they are within the edges of the slice, as you go from one end of the slice to the other, there is a difference in the gradient because of the gradient and consequently, there is a difference in the pressure frequency. So, at the end of application of this gradient, there will be a defocusing of the or defacing of these spins, so that is that is because of the difference in the magnetization or the magnetic field felt by the spins in the left side and the right side of the from the going from left side of the slice to the right side of the slice, if there is a gradient z gradient, which means that they will have slightly different frequencies which leads to the defacing. So, to replace them, we just have to apply another negative gradient of the same amplitude but for half the time, they have brought them back into phase, so that is what this is for. So, this is just to explain the diagram in slightly better detail. So, this is when you turn on the z gradient once again, this is slightly idealistic because the z gradient cannot come on instantaneously, that is a certain time before it sets, and it comes on and it is this the time 49 period to which it is actually kept on. And the time t equals 0 actually starts here, which coincides with the peak of your RF pulse. And, and then of course you have this negative gradient for refocusing gradient refacing gradient and followed by which there is the FID that is when you turn on the ADC, but if FID is actually very difficult to measure, you typically measure something called the echo, we will talk about that later, but this is the slice selection process, where you select the slice do a slice selections along with the RF pulse, you turn on the z gradient, again, the z gradient is determined by how thick which position and how you want image and how thick a slice you want image. So, the FID signal that you obtain now, after the refocusing or a colored refacing, will correspond to the summation or integration of the signals from all the spins in this slab of tissue. So, if you go back, so whatever signal you are getting will be from here, again or from here, depending on a gradient strength, because only those will correspond to the Larmor pressure frequency, which the RF pulse will flip into the plane. So, this is the slice selection gradient. So, even now this is just one slice, we just do not know, we still cannot figure out x, y, yet, we will just localized the signal to a particular z location or range of z location is because that is where you always talk about slice with in medical imaging, even the context of CT as well MRI, MRI because the tissue the image you are looking at even though it is flat it comes from actually a slab of tissue not just infinitely thin plane that is a bad approximation. So, the slab of tissue is what we have localized, we still have to do x and y localization. 50 (Refer Slide Time: 26:17) So, we will look at a couple of derivations just to understand what is going on. So, we saw that the precession frequency is a function of your 50 + 𝐺𝑍𝑍 that shows your precession frequency is now encoded by your z position at this point. So, now, if you consider two positions, 𝑍1 and 𝑍2like we saw in that picture will go back up and just show you what 𝑍1 and 𝑍2 are. So, we can call this we can call this 𝑍1 This point corresponds to why I call these 𝑍1 and 𝑍2 because they actually correspond to here. So, this we call 𝑍1 and 𝑍2. So, these are the again 51 similarly, here you can call this 𝑍1 and 𝑍2. So, this will be some delta z this is your slice thickness. ν1−γ 50 So, now, we can actually show So, for instance, for 𝑍1 we can write 𝑍1 = γ𝐺𝑍 similarly for ν2−γ 50 it to 𝑍2 We can write 𝑍2 = γ𝐺𝑍 and we can then figure out after some algebra, we can just ∆ν write your slice thickness as a ∆𝑍 = γ𝐺𝑍 So, this is the expression that the slice thickness tells you how we can determine slice thickness by figuring out this ∆ν as well as by figuring out 𝐺𝑍 you can set the slice thickness. The slice position which is basically the average can ν‾−ν0 also be written in this form, which is given by this 𝑍‾ = γ𝐺𝑍 So, this is again the slice position, so all of these two are the important expressions. So, that is one set of equations. So, another aspect is basically the RF waveform. So, what kind of RF waveform do you want? So, based on this derivation, we can say we desire a frequency signal, this frequency ν−ν‾ content is given 𝑆(γ) = 𝐴. 𝑟 R𝑐 a( ∆ν ) Where A is amplitude and 𝑟 R𝑐 a is a function. So, which means that the signals, what do we want because we just need a rectangular pulse along the frequency axis corresponding to that particular frequency ν‾ of a certain width ∆ν So, that and the signal itself you do the Fourier transform we can do that signal can be W2πγ‾ a defined to be 𝑆( a) = 𝐴∆ν `𝑖𝑛(∆ν a) R So, this is basically what we are looking at and in this case we this is a sinc function so, we can plot it and this what we get is if you look at it the envelope of the sinc function is what I will plot. So, which is something this is a among time axis something like this, it is a sinc function and of course, if you want the appropriate localization along the frequency axis you will have something the ideal thing to do. So, this is a longer frequency axis, this is along the time axis. So, these are the expressions which help you determine what should your RF pulse look like ideally and based on that what is your z position as well as your slice thickness. So, this is the overall model behind the slice selection gradient. So, now we can move on and we can talk about how do we localize along the x and y direction or basically how do you do in plain localization. 52 (Refer Slide Time: 31:41) So, this is called frequency encoding, or I think sometimes it is also going to read-out frequency encoding direction is also sometimes known as the read-out direction. So, as we saw, the signal received is basically the integration or summation of signals from the excited slice. So, as we see it saw that the signal received is now restricted that is basically the spins that are flipped into the plane by the particular angle, depending on how long you have the RF pulse on is only from a certain slab of tissue, however, we do not still have localization basically no x, y information or in plane localization is present. So, how do we spatially encode MR signals, and the way to specially encode the one fun process is referred to as the frequency encoding. In this case, there is a gradient, additional gradient which is turned on during the FID and the direction in which that gradient is turned on is referred to as the readout direction. And it is typically orthogonal to the slice selection gradient. And typically, the readout direction is the x axis, the z axis being along the length of the patient. And that is the axis along which we apply the slice selection gradient. 53 (Refer Slide Time: 33:09) So, what is the signal model for this, we will just do that quickly, before we go any further. So, this is the signal in the plane, the transverse magnetization after being after an alpha excitation that is after the films have been flipped by angle alpha. So, the + − W(2πν0 a−ϕ) − a/ G2 𝑀𝑥 f( a) = 𝑀𝑥 f(0 ) R R whereas symbols have their usual meaning and this is + − 𝑀𝑥 f and this other term just after is basically just before 𝑀𝑥 f(0 ) = 𝑀𝑍(0 ) `𝑖𝑛α So, we have this spins in the excited slice and we want to model the spatial distribution of the proton density T 1 and T 2 and we assume that the slice is fairly thin so that there is no variation of course it is not entirely true there is z variation, but we assume that it is fairly thin but there will be some spatial variation of the transverse magnetization immediately after the excitation. And the received signal then we can model as a signal that we get you to that M x y and that relationship is typically written in this form. − W2πν0 a ∞ ∞ + − a/ G2 𝑆( a) = R ∫ ∫ 𝐴𝑀𝑥 f(𝑥 + 𝑂 ) R Q𝑥 Q f −∞ −∞ the origin of the signal that we are all working with, so the signal that is acquired that is that is received by the coils is actually the function of the magnetization that is been flipped into the plane, but since there is a variation because of the variable there is some variability in the magnetic field etc., there is a variation in 𝑀𝑥 f. 54 So that is why we have to integrate 𝑀𝑥 f and that A is some amplitude if all the other constants have been absorbed in A. Now, this is the general signal model that we will be working with. Now, we can once again we can make it further simpler by using this + − a/ G2(𝑥 f) expression S(𝑥, f) = 𝐴𝑀(𝑥, f, \ ) R So, then your signal becomes − W2πν0 a ∞ ∞ 𝑆( a) = R ∫ ∫ S(𝑥, f) Q𝑥 Q f −∞ −∞ − W2πν0 a So, basically the received signal if you de-modulate it because the R a very highly oscillatory rate ν0 is a very high frequency oscillation, but you demodulate it. So, if you demodulate this signal, it is basically just this integral, just the integral or the spins or spin density or T2 relaxation times etc. in that particular slice. So, then we still need something to make sure that we can localize x and y. So, the way to do that would be to apply a gradient along the x axis. So, what happens if you apply a gradient along the x axis? So, gradient along the x axis would correspond to your frequency, Larmor position being changed the following way ν(𝑥) = γ( 50 + 𝐺𝑥𝑥) plus 𝐺𝑥 is the strength of the gradient along x. So, of course, you can always compare it with if we when we did the slice selection gradient when we apply another gradient, we applied the 𝐺𝑍 changing it appropriately. Now, once we remove that 𝐺𝑍, so everything reverts back to 0. So, then now if you apply the x gradient again, γ( 50 + 𝐺𝑥𝑥) Now, once we have this, then we have to modify the expression we have written. I write here appropriately, because it is no longer γν0 a. ν0 has been modified because of the presence of the x gradient. Now when we do that, then all we have to do is let me just write this one expression so that we understand where you are going from. So, the signal we are talking about, then becomes 55 ∞ ∞ − W2π(ν0+γ𝐺𝑥𝑥) a − a/ G2 + 𝑆( a) = 𝐴 ∫ ∫ µ𝑥 f(𝑥, f, 𝑂 ) R R Q𝑥 Q f. So, the part that is changed is when −∞ −∞ − W2π(ν0+γ𝐺𝑥𝑥) a you can still take out the R. So, then what you will get is that signal that you ∞ ∞ − W2πγ𝐺𝑥𝑥 a measure is basically this. 𝑆( a) = ∫ ∫ S(𝑥, f) R Q𝑥 Q f −∞ −∞ So, this is the important concept in MR imaging this particular equation. So, you can now identify, so we have or we have what you have done whenever you identify the position with the frequency. So, we can interpret this expression as a Fourier transform with one of the frequencies in the case frequency corresponding to y direction being set to 0. So, how do we do that, so, you can set c = 0 and we can also set b = γ𝐺𝑥 a So, then if we plug it back in there, and you can see that this the expression we have is the form of a Fourier transform, where instead of gamma γ𝐺𝑥 a, we just put U and V you set to 0. ∞ ∞ − W2π( b𝑥+ c f) so, if you write this as some function 𝑆( a) = ∫ ∫ S(𝑥, f) R Q𝑥 Q f.So, this is −∞ −∞ basically in the form of a Fourier transform, or in this case, it is a Fourier transform where we are trying to integrate over your spatial variables. So, we have the spatial frequency corresponding to U and V being defined by here. So, this is the way we encode positions using the gradients. So, this is one of the fundamental equations for this, the fundamental equation for understanding MRI, where we interpret the signal as the Fourier or the Fourier transform of the quantity you are trying to measure. So, this f(x,y) encompasses everything, it tells you about the magnetization as a function of x, y, it also tells you about the relaxation, the spin properties T1 and T2 times, so, in this case T2 as a function of x and y, this is already encapsulated in f(x, y). And the application of the gradient along x captures makes it in the form of Fourier transform. And tip and one of the in the terminology that in an MRI study is called k space. So, you will call b = X𝑥 and c = X f, so that this is referred to as k space, so you would have to measure all of k space so in order to figure out the Fourier transform, and then you do the inverted, so that is where that is why that is the acquisition strategy in MRI. So, this is the first step towards casting it in the form of a Fourier transform. 56 And the way to actually measure would be to scan the so called k space by taking on a range of frequencies and how do you adjust that by changing your gradient, so that is one way of doing it is to change the gradient or the most effective way of doing it is changing the gradient, by changing the gradient you will capture a variety of k x and k y and therefore, that will give rise to your Fourier transform that is k space acquisition and using that you can reconstruct your image, that is interpretation of our image acquisition in a MR signal in an MR system. (Refer Slide Time: 44:51) So how does it work in the for-frequency encoding? So, as you saw the FID is still the integral of all the spins within the slice, but the Larmor frequency is with what we tried to do is to modify it according to position within the slice namely along x. So, because we apply the gradient along x. Now, this leads to a FID signal that has position encoding, we saw then this signal can be interpreted as the Fourier transform of the spin density. In this case, it is M and of course, it also is a function of t 2. The frequency variable we identified as b = γ𝐺𝑋 a in this particular acquisition mode with one gradient it corresponds to v=0. So, this is the upper sequence diagram RF turned on the gradient along z also turned on for slice selection, the refocusing gradient for the application of G x it is turned on, in this along the time axis it is always on during which we actually do the ADC, this leads to our image being which is the scanning k space, but you see that the this here it only corresponds to a certain V equal to 0, so we are stepping along u, but v is still 0. 57 So, ADC of course samples these signals in time, U is given b = γ𝐺𝑋 a. So, that tells you gives you the whole range of u’s and of course you have to change v in order for us to sample the entire k space. So, how do we change V. That is another question we will answer in next slide. 58 (Refer Slide Time: 46:41) So, the MR signal model we have already seen just to recap I will write this down as you saw the application of the gradient leads to the following signal. ∞ ∞ − W2πγ𝐺𝑥𝑥 a 𝑆( a) = ∫ ∫ S(𝑥, f) R Q𝑥 Q f −∞ −∞ then you made the identification that b = γ𝐺𝑋 a and c = 0. Now, how do we do this scanning, now, we saw V equal to 0 then how do we change I have changed this. So, the way to do that is also to apply another gradient along x, it was along y. So, then your signal model ∞ ∞ − W2πγ(𝐺𝑥𝑥+𝐺 f f) a would be 𝑆( a) = ∫ ∫ S(𝑥, f) R Q𝑥 Q f −∞ −∞ And so from here we identified the Fourier domain frequencies as b = γ𝐺𝑋 a and c = γ𝐺 f a. And so, what is the Fourier trajectory that we are sampling here? The trajectory we are −1 𝐺 sampling here is obviously, we are going in this direction θ = a N𝑛 ( 𝐺 f ) or if you want to 𝑋 plot it, so, if you are looking at the k space diagram, so to speak, so, U, V by changing G x and G y in appropriate steps, you are basically sampling along a certain direction like this that is a theta. So, by sampling radially by strain changing the strength of G x and G y you will end up scanning along arbitrary directions and then once you scan the entire U, V, this is called polar 59 scanning. So, once you scan the entire U, V space of course, you can do interpolation on the Cartesian grid and do the reconstruction. This is the polar scanning protocol. 60 (Refer Slide Time: 49:30) So, here just to summarize again, scanning the Fourier space requires the repetition of pulse sequences. Like we saw because one we only have V equals 0, so we have to scan for different values of U, V in order for us to get to the appropriate positions in k space. So, this is accomplished by an additional gradient along y direction is called a G y gradient and the application of gradient along x direction with zero gradient along y made the radial direction x. And of course, the directions can be changed, in this case, we apply both the x and y gradient simultaneously. And the pulse sequence has to be repeated with different gradients to cover the different caspase trajectories. So, if you want different angles, then you change the strength gradient, 61 you get a different angle, and then you sample along that direction, so that is the idea behind the polar scan kind of pulse sequences. What is shown here, everything else remains the same, the x and y gradients are turned on simultaneously and of course you do the ADC acquisition as a function of time. So, this once again, and of course, we keep changing the strength of G x and G y to get different angles, so that is what we saw. So, the theta the angle at which you scan is given by the strength of G x and G y. So, by changing G y by G x you can get different angles and then of course, you sample along that direction, so that gives you the case-based trajectory. So, this is for a polar scan again, once again, this is probably not this is just for the concept, there are different ways of traversing, traversing k space. 62 (Refer Slide Time: 51:39) The other way is the phase encoding. So, here polar scan is one technique to traverse k space in 2D. I do not think that is a very common thing to do, but that is I think one of the earliest things that was done. But phase encoding is what is done more commonly. So, the frequency encoding is used for readout along U, the U direction in the k space. And the phase encoding is for readout along the V direction. So, the way it works is we do a slice selective RF pulse, followed by a refocusing gradient, you saw that the usual, this is the one we are talking about. This is the RF pulse slice selection, this is usually standard you will see this everywhere. And then you apply the Y gradient with strength G y for a certain duration achieving phase encoding. Readout direction 63 is then applied while acquiring data. Then the pulse sequences, again, repeated with different strengths to cover the entire k space trajectory. (Refer Slide Time: 52:51) Now, we might wonder, so first, we will look at this diagram first. So, what we do is we have the usual RF pulse applied along with their slice selection gradient, refocusing pulse, FID and usually the diagrams that come after I have just put it so that in time it looks great, nice. So, you apply the phase encoding g