Looking inside medicine – computer scientists in the body

Medical scanner image from Bethesda naval medical center, Maryland via Pixabay

Computer scientists are helping doctors, surgeons, biologists and psychologists get inside the body and mind, and improving the way that medical care will be provided now and in the future. It’s a fascinating story of biology, maths and computing and it all starts with an X.

What a picture!

X-rays were the first practical method of examining the inside of a living body. The process involves firing high energy X-rays through the body with a photographic plate at the other side. Dense bits of the body like bones absorb radiation. That leads to a lighter area on the developed photographic negative. In effect a shadow is cast through you onto the photograph, giving a view inside. A problem with this is that, as with any camera, it’s hard to get the photograph exposure right. Worse you have to find the space to store hundreds and thousands of sheets of film. Worse still, suppose your doctor in Manchester needs the X-ray taken of you when you are wanting to play football so you are in Frankfurt. The film has to be sent by post. Enter computer scientists to make things easier.

Portable pixel pictures

New digital X-ray systems are being developed. These use X-ray detectors not film and produce digital images rather than the standard photographic images. The advantage here is that those images can be processed using clever algorithms to correct for problems in exposure, or even to pick up particular shapes in the image. The diagnosis can be helped by the artificial intelligence in the computer, which can spot unusual patterns in the image and alert the doctor. Better still since these digital X-rays are computer based. They can be easily stored and transmitted throughout the world to places where they are needed.

A slice of life

X-rays, even digital X-rays, can only give you flat images of the body innards. Like a shadow they squash all the depth details. Your insides are three-dimensional (3D) though, so it would be useful to be able to slice through your body and get a view inside. This is possible using a computer based method called tomography, from the Greek tomos (slice) and graphia (describing). It still uses X-rays but in a Computed Tomography (CT) scan the X-ray source and the detector rotate round the body taking lots of images at different angles. It’s like casting different shadows as the sun moves round you. So imagine you’re using tomography on a cylinder, and your X-ray source is a torch. Move the torch round the cylinder and look at the shadow cast on a piece of paper moving at the opposite side to the torch. Each ‘shadow’ picture would look the same because a cylinder is circularly symmetric. Now imagine a more interesting shape. Each of the shadow pictures would depend on where you were at the time in relation to the shape. With some clever maths, a reconstruction algorithm and a computer you can go from the shadow pictures back to the shape. These shapes are the organs and innards of your body, and they can be recorded in their full 3D glory. There are now systems that spiral the X-ray source round the body making it quicker. You can even do tomography at very high speed allowing slices through the beating heart to be calculated. Interestingly the maths behind this technology, called the “Radon transform” after Czech mathematician Johann Radon (1887-1956), was developed purely as an abstract mathematical theory. No one at the time could see any use for it!

Check in at the Digital Hospital

Life-saving healthcare and medical imaging is going digital. Using video conferencing, mobile scanners and even remote operated robotic surgery the field of tele-medicine allows expert medical care to be provided any time, any place. Today’s progress towards the digital hospital combines different ways of taking information about the state of your body, such as digital X-rays, or tomographic images, readings from digital thermometers or digital blood pressure readers. We can combine all this information with your personal information into one big file, so there is no need for multiple paper copies to get out of date or lost. The hospital information system keeps track of all your data, and also importantly who has access to it.

Tomorrow’s world and you

According to Alan McBride, a computer scientist who is working on these state of the art medical systems:

“This technology is a major step forward in health care where the UK is leading the way. The government’s grand scheme will allow images taken in Newcastle to be shown on your GP’s desk in London, together with the hospital report, which will automatically be emailed to their inbox. Computer science is playing the major role in all this, creating new ways to aid clinical practice, with plenty of scope in the future for talented computer scientists to get involved.”

The computer scientists who make this happen will not only be technical specialists but also experts in understanding human behaviour. We will only get the benefits such a grand scheme promises if the conflicting needs and concerns of all those involved are taken into account: patients, nurses, doctors, managers and politicians…that will take major people-skills.

Paul Curzon, Queen Mary University of London


Related Magazine …

Much ado about nothing

A blurred image of a hospital ward
Image by Tyli Jura from Pixabay

The nurse types in a dose of 100.1 mg [milligrams] of a powerful drug and presses start. It duly injects 1001 mg into the patient without telling the nurse that it didn’t do what it was told. You wouldn’t want to be that patient!

Designing a medical device is difficult. It’s not creating the physical machine that causes problems so much as writing the software that controls everything that that machine does. The software is complex and it has to be right. But what do we mean by “right”? The most obvious thing is that when a nurse sets it to do something, that is exactly what it does.

Getting it right is subtler than that though. It must also be easy to use and not mislead the nurse: the human-computer interface has to be right too. It is the software that allows you to interact with a gadget – what buttons you press to get things done and what feedback you are given. There are some basic principles to follow when designing interfaces. One is that the person using it should always be clearly told what it is doing.

Manufacturers need ways to check their devices meet these principles: to know that they got it right.

It’s not just the manufacturers, though. Regulators have the job of checking that machines that might harm people are ‘right’ before they allow them to be sold. That’s really difficult given the software could be millions of lines long. Worse they only have a short time to give an answer.

Million to one chances are guaranteed to happen.

Problems may only happen once in a million times a device is used. They are virtually impossible to find by having someone try possibilities to see what happens, the traditional way software is checked. Of course, if a million devices are bought, then a million to one chance will happen to someone, somewhere almost immediately!

Paolo Masci at Queen Mary University of London, has come up with a way to help and in doing so found a curious problem. He’s been working with the US regulator for medical devices – the FDA – and developed a way to use maths to find problems. It involves creating a mathematical description of what critical parts of the interface program do. Properties, like the user always knowing what is going on, can then be checked using maths. Paolo tried it out on the code for entering numbers of a real medical device and found some subtle problems. He showed that if you typed in certain numbers, the machine actually treated them as a number ten times bigger. Type in a dose of 100.1 and the machine really did set the dose to be 1001. It ignored the decimal point because on such a large dose it assumed small fractions are irrelevant. However another part of the code allows you to continue typing digits. Worse still the device ignores that decimal point silently. It doesn’t make any attempt to help a nurse notice the change. A busy nurse would need to be extremely vigilant to see the tiny decimal point was missing given the lack of warning.

A useful thing about Paolo’s approach is that it gives you the button presses that lead to the problem. With that you can check other devices very quickly. He found that medical devices from three other manufacturers had exactly the same problem. Different teams had all programmed in the same problem. None had thought that if their code ignored a decimal point, it ought to warn the nurse about it rather than create a number ten times bigger. It turns out that different programmers are likely to think the same way and so make the same mistakes (see ‘Double or Nothing‘).

Now the problem is known, nurses can be warned to be extra careful and the manufacturers can update the software. Better still they and the regulators now have an easy way to check their programmers haven’t made the same mistake in future devices. In future, whether vigilant or not, a nurse won’t be able to get it wrong.

Paul Curzon, Queen Mary University of London

More on …


Related Magazine …


Subscribe to be notified whenever we publish a new post to the CS4FN blog.


This blog is funded by EPSRC on research agreement EP/W033615/1.

QMUL CS4FN EPSRC logos