Interactive MRI Simulator
This web application provides a simplified, interactive simulation of the core principles behind Magnetic
Resonance Imaging (MRI). It is designed to be an educational tool to help visualize the complex physics in
an intuitive way.
How to Use
The application is split into two main parts: the simulation on the left and the resulting image on the
right. The goal is to see how your actions in the simulation panel directly affect the generated MRI image.
- Proton Spin Simulation (Left): This canvas shows a group of proton spins (the small
arrows). In their natural state, they are randomly aligned.
- Use the B₀ Field Strength slider to apply a strong external magnetic field.
Notice how the protons align with the field and begin to "precess" or wobble around the field's
axis. A stronger field (higher Tesla, T) results in a faster precession.
- The RF Pulse Intensity slider sets the "flip angle" of the Radio-Frequency
pulse. A 90° pulse will tip the spins fully into the transverse plane.
- Click Apply RF Pulse to excite the protons. You will see them tip over and spin
in unison (in-phase). This synchronized spinning generates the detectable MR signal.
- After the pulse, the spins will gradually de-phase (spread out) and return to their original
alignment. This is known as T2 and T1 relaxation.
- Resulting MRI Image (Right): This canvas displays a slice of a synthetic "brain". The
brightness of each pixel (voxel) is determined by the strength of the MR signal.
- The image is darkest when there is no signal. When you apply an RF pulse, the image becomes
bright, representing the strong signal from the in-phase spins.
- As the spins de-phase in the simulation, the signal decays, and the image fades. The contrast
you see is a result of different "tissues" (represented by our synthetic data) relaxing at
different rates.
- Use the Brain Slice slider to view different cross-sections of the synthetic
data.
- Controls:
- Play Demo: Click this to watch an automated sequence of actions that showcases
the different features.
- Sound Toggle: Turn on sound to "hear" the simulation. The pitch is tied to the
precession frequency (B₀ strength), and the volume is tied to the MR signal strength. It is
loudest just after an RF pulse.
Future Directions
This is a foundational simulation. Future enhancements could include:
- More complex pulse sequences like Spin Echo or Gradient Echo to demonstrate how different MRI contrasts
(T1-weighted, T2-weighted, PD-weighted) are generated.
- Implementing spatial encoding using gradients (the 'I' in MRI) to show how the 2D image is spatially
resolved.
- More sophisticated tissue models with distinct T1 and T2 relaxation times for greater realism in image
contrast.
- Allowing users to "draw" their own tissue phantom to scan.
Discussion: B₀ Field Strength Slider
The B₀ field strength slider currently ranges from 0.5 Tesla to 3.0 Tesla, which reflects the range of most
clinical MRI machines. This range is realistic and keeps the simulation simple and approachable for
beginners. However, there are trade-offs to consider:
- Keeping the Current Range: This ensures the simulation remains focused on educational
clarity and avoids overwhelming users with unnecessary complexity. It also aligns well with the
performance and accuracy of the current animation and sound feedback.
- Expanding the Range: Increasing the slider to include higher field strengths (e.g., up
to 10 Tesla) could make the simulation more dynamic and engaging, showcasing faster precession and
stronger signals. However, it might require additional adjustments to the animation and sound logic to
maintain accuracy and performance.
For now, the slider remains as is, balancing simplicity and educational value. Future updates could explore
an "Advanced Mode" to unlock higher field strengths for users interested in research-grade MRI systems.