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 …

The Dark History of Algorithms

An Arabic pattern on a crescent moon
Image by Mohammad Shahriyar from Pixabay

Zin Derfoufi, a Computer Science student at Queen Mary, delves into some of the dark secrets of algorithms past.

Algorithms are used throughout modern life for the benefit of mankind whether as instructions in special programs to help disabled people, computer instructions in the cars we drive or the specific steps in any calculation. The technologies that they are employed in have helped save lives and also make our world more comfortable to live it. However, beneath all this lies a deep, dark, secret history of algorithms plagued with schemes, lies and deceit.

Algorithms have played a critical role in some of History’s worst and most brutal plots even causing the downfall and rise of nations and monarchs. Ever since humans have been sent on secret missions, plotted to overthrow rulers or tried to keep the secrets of a civilisation unknown, nations and civilisations have been using encrypted messages and so have used algorithms. Such messages aim to carry sensitive information recorded in such a way that it can only make sense to the sender and recipient whilst appearing to be gibberish to anyone else. There are a whole variety of encryption methods that can be used and many people have created new ones for their own use: a risky business unless you are very good at it.

One example is the ‘Caesar Cipher’ which is named after Julius Caesar who used it to send secret messages to his generals. The algorithm was one where each letter was replaced by the third letter down in the alphabet so A became D, B became E, etc. Of course, it means that the recipient must know of the algorithm (sequence to use) to regenerate the original letters of the text otherwise it would be useless. That is why a simple algorithm of “Move on 3 places in the alphabet” was used. It is an algorithm that is easy for the general to remember. With a plain English text there are around 400,000,000,000,000,000,000,000,000 different distinct arrangements of letters that could have been used! With that many possibilities it sounds secure. As you can imagine, this would cause any ambitious codebreaker many sleepless nights and even make them go bonkers!!! It became so futile to try and break the code that people began to think such messages were divine!

But then something significant happened. In the 9th Century a Muslim, Arabic Scholar changed the face of cryptography forever. His name was Abu Yusuf Ya’qub ibn Ishaq Al-Kindi -better known to the West as Alkindous. Born in Kufa (Iraq) he went to study in the famous Dar al-Hikmah (house of wisdom) found in Baghdad- the centre for learning in its time which produced the likes of Al-Khwarzimi, the father of algebra – from whose name the word algorithm originates; the three Bana Musa Brothers; and many more scholars who have shaped the fields of engineering, mathematics, physics, medicine, astrology, philosophy and every other major field of learning in some shape or form.

Al-Kindi introduced the technique of code breaking that was later to be known as ‘frequency analysis’ in his book entitled: ‘A Manuscript on Deciphering Cryptographic Messages’. He said in his book:

“One way to solve an encrypted message, if we know its language, is to find a different plaintext of the same language long enough to fill one sheet or so, and then we count the occurrences of each letter. We call the most frequently occurring letter the ‘first’, the next most occurring one the ‘second’, the following most occurring the ‘third’, and so on, until we account for all the different letters in the plaintext sample.

“Then we look at the cipher text we want to solve and we also classify its symbols. We find the most occurring symbol and change it to the form of the ‘first’ letter of the plaintext sample, the next most common symbol is changed to the form of the ‘second’ letter, and so on, until we account for all symbols of the cryptogram we want to solve”.

So basically to decrypt a message all we have to do is find out how frequent each letter is in each (both in the sample and in the encrypted message – the original language) and match the two. Obviously common sense and a degree of judgement has to be used where letters have a similar degree of frequency. Although it was a lengthy process it certainly was the most efficient of its time and, most importantly, the most effective.

Since decryption became possible, many plots were foiled changing the course of history. An example of this was how Mary Queen of Scots, a Catholic, plotted along with loyal Catholics to overthrow her cousin Queen Elizabeth I, a Protestant, and establish a Catholic country. The details of the plots carried through encrypted messages were intercepted and decoded and on Saturday 15 October 1586 Mary was on trial for treason. Her life had depended on whether one of her letters could be decrypted or not. In the end, she was found guilty and publicly beheaded for high treason. Walsingham, Elizabeth’s spymaster, knew of Al-Kindi’s approach.

A more recent example of cryptography, cryptanalysis and espionage was its use throughout World War I to decipher messages intercepted from enemies. The British managed to decipher a message sent by Arthur Zimmermann, the then German Foreign Minister, to the Mexicans calling for an alliance between them and the Japanese to make sure America stayed out of the war, attacking them if they did interfere. Once the British showed this to the Americans, President Woodrow Wilson took his nation to war. Just imagine what the world may have been like if America hadn’t joined.

Today encryption is a major part of our lives in the form of Internet security and banking. Learn the art and science of encryption and decryption and who knows, maybe some day you might succeed in devising a new uncrackable cipher or crack an existing banking one! Either way would be a path to riches! So if you thought that algorithms were a bore … it just got a whole lot more interesting.

Zin Derfoufi, Queen Mary University of London

More on…

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