Magnetic resonance imaging (MRI) is a safe technique that produces pictures of the heart without using damaging X-rays. Professor Jennifer Keegan and Dr Peter Gatehouse at the Royal Brompton Hospital have developed a fast MRI technique that can be used to produce detailed images showing how the heart moves as it beats. The technique directly measures the velocity of the heart muscle and this can potentially be processed to give deformation or strain information which has been shown to be very useful for early detection of heart disease and for guiding treatment. But while the new technique collects the images very quickly, it takes a long time to extract the velocity information from them using their in-house, proof-of-concept software (~1 hour for each 2D slice of the heart), making it unsuitable for its use in busy clinical practice. 

Our contribution

The Research Computing Service's RSE team were involved in the project as part as a translational grant from the British Heart Foundation in order to develop software to extend the use of this technique from the research environment to the clinical one. This translation required fast, automatic and validated analysis, visualisation and reporting tools.

Specific requirements for the new software implemented by the RSE team included an intuitive graphical user interface (GUI) designed in response to the clinicians' objectives and feedback from user testing during development. The software had to be efficient, performing analysis more quickly and reproducibly by automating the most inefficient tasks currently required of users. And finally, it had to be suitable for commercialisation, re-using only third-party libraries that were compatible with a licensing model appropriate for the resulting application. Robustness and maintainability of the product were ensured by including a test suite to assert its reliability and correctness, and adherence to software engineering best practices were followed with usage of version control, continuous integration and strict coding standards.


The outcome of the first stage of the project has resulted in StrainMap, a program capable of mimicking the functionality of the original proof-of-concept software but in a fraction of the time (<15 min for each 2D slice). StrainMap is also superior in terms of operator reproducibility. The GUI was designed using Tkinter, a robust GUI framework built-in into Python, and a strict separation between interface and business logic was enforced to facilitate testing and parallel development. StrainMap is also modular, allowing its expansion on later stages of the project with further functionality 


Professor Jennifer Keegan, Principal physicist, Professor of Practice (Cardiovascular Magnetic Resonance) and StrainMap PI:

"In the first stage of this project, the Research Computing Service has transformed our slow and cumbersome proof-of-concept MATLAB code into a fast and user-friendly package suitable for use in the clinical research environment. The RSE team are highly professional and reliable and have been very quick to understand the requirements of the project. Monthly face-to-face meetings and written reports, together with rapid response to feedback, have kept this phase (which was on a tight deadline) on track. They have been (and will continue to be) essential to our project and I have no hesitation in highly recommending their services to others."