|
|
||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Online Only |
1 From the Danish Research Center for Magnetic Resonance, Copenhagen University Hospital Hvidovre, Dept 340, Kettegård Allé 30, DK-2650 Hvidovre, Denmark. Presented as an education exhibit at the 2006 RSNA Annual Meeting. Received July 17, 2007; revision requested August 9; revision received and accepted August 10. Address correspondence to the author (email: larsh{at}drcmr.dk).
| Abstract |
|---|
|
|
|---|
Movies available at http://radiographics.rsnajnls.org/cgi/content/full/e27/DC1.
| Introduction |
|---|
|
|
|---|
For students of MR imaging, the understanding of spin dynamics is often perceived as being on a steep part of the learning curve. The MR imaging teacher is, however, left with rather limited means of communicating this aspect of the topic. Use of blackboards or slides is useful, but the dynamic aspects are difficult and time-consuming to illustrate with static pictures. Often the result is confusing with regard to the long sequences of gradient and RF pulses used in MR imaging. The basics are typically illustrated with handwaving and use of sticks to represent magnetic fields and magnetizations. Teachers face an anatomic limit because dephasing and refocusing of spins are aspects difficult to illustrate with just two arms. Even the important basic concept of MR itself is dauntingly hard to illustrate with hand motions. This could be a reason it is often left unexplained or wrongly described as a quantum effect (ie, as a nonclassical phenomenon). Teaching more complex issues such as phase rolls and stimulated echoes to nontechnical students is a challenge that few can overcome without casualties.
Considerable simulation and presentation resources are available on the Web (eg, animated GIF [2] or MPEG formatted (3) files that illustrate concepts such as precession or spin echoes). The need for additional animations has been pointed out and examples have been presented (4,5). Prerecorded animations are of significant value but deprive presentations of spontaneity and leave the teacher unprepared to answer all the "what if" questions. Furthermore, the preparation of new animations is time-consuming and requires software tools. Multimedia players such as Flash and Shockwave (Adobe Systems, San Jose, Calif) offer interactivity that can enhance the learning experience (6,7). The e-MRI site described in reference 7 is a valuable resource for students as well as teachers. However, the available e-learning tools for MR imaging are fairly limited, as they show only specific facets chosen by the programmer. They do not, for example, offer the teacher or student the possibility of exploring pulse sequences beyond those preprogrammed, and thereby an important motivating factor is missed.
The need for flexibility is instead met by simulators such as those previously described that calculate simulated images (8–10). If sufficiently fast, such programs can be useful in a teaching context, but they do not illustrate the basics of MR imaging, rather the result. Reference 10 describes SIMRI, a versatile Bloch equation solver that also contains a module called SpinPlayer (not part of the current SIMRI 2.0 release available on the Internet), which can illustrate spin dynamics during a preprogrammed sequence. Hence, it has some of the elements needed for teaching basic MR imaging, but the real-time aspects are apparently limited. It could be useful for creating educational animations. The same applies to Matlab software (MathWorks, Natick, Mass), available on the Internet, for solving the Bloch equations (11). This educational tool is not targeted at nontechnical students but is suitable for exercises for students capable of programming.
The purpose of this article is to present a unique, simple, and powerful interactive tool to help teach basic and advanced MR imaging. More specifically, graphical freeware that illustrates spin dynamics is provided for common PC platforms. The software allows the user to manipulate and monitor the magnetization of a number of isochromates (ensembles of spins experiencing the same field) in the laboratory and in rotating frames. The magnetic and RF field strengths are adjustable in the software. Gradient and RF events can be played out and the resulting MR signals monitored. Downloading and installation procedures are described in reference 12.
The software is designed for real-time use during lectures and has been tested extensively in this context. It can also be used to record movies for lectures or home pages on the Web. With adequate introduction, it can be used for student assignments that allow, for example, solutions to be presented to the class or saved as movies.
The technical Methods section describes the design of the software and the equations that it simulates. Reading of this section is not necessary for using or understanding the developed program. The Results section presents example animations that illustrate the visualization capabilities of the software. Finally, the user experience is discussed.
| Methods |
|---|
|
|
|---|
![]()
For specific applications, the Bloch equations are sometimes used in extended forms (eg, including effects of diffusion [13]). These forms are not significant for typical MR applications and are not considered here. In contrast, spatial and temporal field variations are important for basically all MR applications, and the representation of multiple spin isochromates is a significant feature of teaching software.
Design goals of the software were defined as follows:
The scientific programming language Interactive Data Language (IDL; ITT Visual Information Systems, Boulder, Colo) was chosen for the implementation for several reasons. It is a high-level language used in many imaging laboratories; it is supported on multiple platforms, including Windows, Linux, and Macintosh; it supports two-dimensional and three-dimensional (3D) graphics without the need for extra software libraries; and it has a "direct graphics" mode that is sufficiently fast for real-time visualizations and supports the export of GIF animations. For the present application, it is important that a "virtual machine" version of IDL be provided for free by the vendor. This allows users to run the developed software without a costly license. Compared to stand-alone software with the necessary libraries linked statically, the chosen strategy requires more disk space (~200 MB for a virtual machine installed with standard settings). Also, the software developer is required to have an IDL license.
| Views and Program Interaction |
|---|
|
|
|---|
In two smaller two-dimensional coordinate systems that are also part of the user interface, "sliding window" representations of the time evolution of relevant parameters are provided (a 5-second history with "present" at the right side of the graph). One graph is chosen to show a transverse component of the magnetization (proportional to the voltage that would be induced in a surface coil) and a transverse component of the RF field. If the two curves oscillate with the same frequency, the resonance condition is fulfilled. Another graph shows the magnitude of the transverse magnetization, which is proportional to the MR signal amplitude.
The opening view after program initiation is a single precessing dipole. The three graphs are updated approximately 20 times per second, so the user gets an immediate impression of the dynamic character of the displays. The user can proceed in several ways:
The Scene menu is responsible for much of the flexibility of the program, as a wide range of initial conditions can be chosen:
Simplicity was a main design criterion for the user interface. Field and relaxation properties of the isochromates therefore cannot be varied independently by use of the sliders. There is, for example, just one B0 slider and one T2 slider, although the isochromates can experience different environments. B0 is chosen as a field offset, so changing it will adjust the overall precession frequency and leave field differences unchanged. In contrast, the T2 slider sets the transverse relaxation rate of all isochromates to the same value. This choice was made to keep the interface simple while allowing important concepts to be demonstrated in an intuitive way.
The effects of B0 on the equilibrium magnetization and on signal amplitude are not modeled by the software. They could be included, but it would be confusing and would interfere with the use of B0 and RF frequency transformations for shifting to and from the rotating frame of reference. These field effects, which are not included in the Bloch equations either, are omitted because they are better explained independently. The shown magnetizations and signals can be thought of as being scaled by their field-dependent counterparts.
No units are given for the parameters entering the simulation. This choice was made for several reasons. First, it would be difficult to guarantee that a relaxation time given in seconds would actually be in seconds for slow hardware. Second, whereas it makes sense to give the relaxation times in seconds and the RF frequency in hertz, it would be awkward to specify the magnetic fields in, for example, nanotesla, as that would introduce a nonintuitive scaling between magnetic fields and RF frequencies (only fields of such low amplitude give precession frequencies suitable for visualizations). Instead equal settings of the field and frequency slider bars are chosen to reflect resonance, which corresponds to choosing a gyromagnetic ratio of 1. The intuitive choice of letting relaxation times correspond approximately to seconds is made silently though not guaranteed in general (not true on slow hardware). The frequencies do not have units approximating hertz, however, as they would then have awkwardly low numerical values in most simulations. Instead, scalings are chosen so that most relevant values are near unity. As the actual frequencies are about eight orders of magnitude different anyway, this choice of units is made for maximum convenience. As the effects of changing the fields are directly visible, the units are somewhat irrelevant and were left out to avoid confusion about their meaning.
In addition to the three help pages "General info," "Buttons and windows," and "Challenges" triggered by the "Help" button, hints about usage are presented as text one-liners updated on button or slider activation. Button and slider events are also reflected in the main window, as their activation triggers the brief appearance of a message about the event. This helps an audience follow the actions chosen via the interface, and it facilitates understanding of recorded animations.
| Implementation Details |
|---|
|
|
|---|
Use of hardware-supported accelerated graphics is not well supported by the IDL software, and it would impose unnecessary graphics card requirements. Hence, the "direct vector graphics mode" of IDL was chosen for the implementation, as this allows fast and limited screen updates. It supports binary "exclusive-or" drawing, meaning that when new graphics are added to an existing display, the binary operator is used to merge the two. This provides a simple and fast method for letting one graphical object move another without the latter being permanently distorted. To add an object and later restore the original scene, the object simply has to be drawn twice in each position. This method is excellent for vector graphics. Flickering displays are avoided by showing only complete images on screen. Hence, drawing is done in a hidden "pixmap" that, when ready, is copied to the visual display between screen updates.
The component-wise differential Bloch equations were solved by using a fast first-order Runge-Kutta method (14) with time steps much smaller than the characteristic time scales. For field values that are relevant to visualization, this method is sufficiently precise to ensure that deviations from exact behavior are insignificant.
Program execution is chosen to be event driven, with events generated by button presses, menu selections, slider activations, and timers. The timer events are used to trigger updates of the field and magnetization parameters and corresponding screen updates. This has the advantage of making program timing as independent as possible of the hardware used. It also saves other processes running on the computer from being starved. One timing event typically triggers the next, so even on a very slow machine the event queue will not overflow.
The "Anaglyph" button changes the viewing mode so that all lines in the 3D window are double-drawn in red and green as seen from slightly different viewpoints. If the display is viewed with appropriate 3D glasses with red and green eye-pieces, the depth perception is enhanced, as Mx and My appear to protrude from the display.
Use of the Anaglyph mode is by no means necessary but enhances the perception of the "Gradient" and "Structure" views in particular. Additional presses of the "Anaglyph" button adapt the red-green separation for different viewer-to-display distances.
When the "Record" button is activated, a subset of the subsequent views displayed in the 3D window are saved in in a file named "movie.gif" in animated GIF format.
When the button is pressed again (now renamed "Stop Recording"), the recording stops. An upper limit of frames is set to avoid accidental exhaustion of disk resources. A series of animations were made in this way to demonstrate the use of the program. The animations were converted to MPEG format, and commentary soundtracks were added by using the free FFmpeg software that runs on most platforms (15).
| Results |
|---|
|
|
|---|
|
| Discussion |
|---|
|
|
|---|
Although animations such as those presented can be used in lectures, interactive use of the program is strongly recommended. In addition to adding spontaneity, interactive use provides additional views of signal and field evolutions.
Combined with traditional presentation means, various versions of the program have been used extensively for MR imaging education over the 5-year development period. Mixed audiences of graduate medical students, radiologists, physicists, computer scientists, and radiographers have been included. The courses have been consistently well-attended, with a low dropout rate, even though they have not been credit bearing. The use of interactive simulations in the lectures is believed to be a main factor in explaining this, as the simulations have often received praise from students and never criticism (at least outspoken). Over the same period, the software has matured so that it now appears in a form appropriate for use by a wider audience of teachers and students. Preliminary experience with voluntary student homework requiring use of the simulator has been positive, as the students who have tried the exercises have demonstrated a good understanding of the topics covered. They have typically done additional experiments beyond those suggested, which is perceived as a positive outcome. The experience with simulator-based exercises is limited so far, however, as course evaluations are not yet available.
In conlcusion, a unique and valuable teaching tool has been developed. It is distributed at no cost for typical computer architectures and operating systems (12). The simulator is deceptively simple and easy to use but provides insight into the complex physics of MR imaging.
| Footnotes |
|---|
Abbreviations: RF = radiofrequency, 3D = three-dimensional
Summary Statement: The author has developed a freely available graphical simulator based on the Bloch equations to aid in the teaching of MR topics ranging from precession and relaxation to advanced concepts such as stimulated echoes, spin tagging, and k-space-methods.
| References |
|---|
|
|
|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HOME | HELP | FEEDBACK | SUBSCRIPTIONS | ARCHIVE | SEARCH |
| RADIOGRAPHICS | RADIOLOGY | RSNA JOURNALS ONLINE |