Right now, as you're reading this, lightning-fast instructions are racing through the fibres of your brain.

Regulating your breathing. Keeping your core temperature stable. Comprehending the words on the page.

There are thousands of these fibres, each one working with its neighbours to pass signals along the chain.

But how do we image these fibres to try to make sense of this jumble? The answer — if you're a researcher — is with lots of colours.

Put your brain inside a special type of MRI machine and add a number of mathematical models, and what comes out are "brainbows" — fantastic rainbow images tracing the nerve fibre pathways through the brain.

The modelling technique is called tractography, and although it looks beautiful, the images themselves can also be incredibly important to doctors.

"We use it to plan surgery," explains Joseph Yuan-Mou Yang, a neurosurgery research fellow at the Royal Children's Hospital in Melbourne.

"This imaging technique mimics the actual nerve fibre pathways in the brain. It allows you to visualise where these nerve pathways are supposed to be."

An MRI image shows showing tracts in a brain. ( Supplied: Katja Heuer and Roberto Toro/Wellcome Collection )

The process starts with a diffusion MRI — a type of magnetic resonance imaging where researchers track water molecules as they travel throughout the brain.

Water molecules can only "diffuse" or move through some areas of the brain and can't diffuse as easily through the membranes, or walls, of the cell. This effectively directs the diffusion of water through the thin nerve fibre — or axon — pathways in the brain.

But these pathways don't just contain water. They also carry information to other areas of the brain and body.

When the water diffusion is mapped, these pathways suddenly appear.

But diffusion MRI itself doesn't produce the image you see above. The MRI spits out dozens of images, all of which are pixelated and don't give much information individually.

Six pixelated MRI images as they appear before processing. ( Supplied: Thijs Dhollander/Florey Institute of Neuroscience and Mental Health )

"Diffusion MRI images themselves, they look ugly and they're not very easy to understand," explains Thijs Dhollander, a scientist at the Florey Institute of Neuroscience and Mental Health, who researches new tractography methods.

"So we put them together in a model."

Those mathematical models are the basis of the brainbows.

Adding colours to the black and white MRI scans helps researchers work out which direction the pathways or "cables" are going in.

"With most of these images we use three colours: red, green, and blue, and they indicate the orientations of the cables compared to your head," says Dr Dhollander.

In most images, he explains, red means the water in the brain diffuses horizontally between your ears, green diffuses between your nose to the back of your head, and blue diffuses vertically.

"Plus, you can mix them as well."

You may have seen a different kind of "brainbow" before. In 2007, a team from Harvard University genetically engineered rat brains to glow. In contrast, tractography is all computer models and imaging.

Whole brain tractography showing a sagittal slice. ( Supplied: Thijs Dhollander/Florey Institute of Neuroscience and Mental Health )

"In a living human brain, this is the only technique to have any visualisation of what this nerve fibre track looks like," Dr Yang says.

"You use these images doing surgery because when you're cutting or resecting, you want to know where you are in relation to these pathways ... you want to look at where these pathways are so you don't cut into it."

While diffusion MRI and tractography has been used in hospitals around the world since the late 90s, researchers are continuing to make the images more accurate, and find ways to provide more information with less data.

Despite this work, most of these updates haven't yet been translated into clinics, Dr Dhollander explains.

The image below shows the brain of a 15-year-old boy with epileptic seizures and language difficulties, who underwent surgery at the Royal Children's hospital.

The team, led by Wirginia Maixner, used the images to avoid the important areas of the brain — such as language processing.

To do this, the team used regular MRI images to "see" the tumour, and then overlaid the tractography images.

These combined images highlighted where the tumour and the important nerve fibres are, making it much easier for the surgeons to cut around them and avoid lasting damage.

"We were able to successfully remove the entire brain tumour without causing any new, permanent damage to his language function following the surgery," Dr Yang explains.

"He has also remained seizure-free."

A combined MRI image showing a 15-year-old boy's brain with a lesion causing epilepsy. ( Supplied: Joseph Yang/Department of Neurosurgery, RCH/Developmental Imaging and Neuroscience Research groups/Murdoch Children's Research Institute at the Melbourne Children's MRI and PET centre )

Another researcher using these methods in her work is Michele Veldsman, a cognitive neuroscientist at the University of Oxford.

She studies how the brain changes as we get older, and how our lifestyles can impact the structure.

"As we age, areas of white matter damage become obvious on MRI scans. These damaged regions ... have been linked to cognitive decline when we age and are more common in people with medical or lifestyle factors that effects their blood flow, like those with high blood pressure or smokers," Dr Veldsman says.

"My work shows that there are also changes to white matter that are not visible to the human eye in MRI, that can only be detected with advanced statistical modelling techniques."

But Dr Veldsman explains that even the most up-to-date tractography isn't perfect.

"Diffusion tractography is an incredible advance in neuroscience, because it is the only way we can estimate the highly complex wiring of the living human brain," she says.

"However, it is not very well appreciated that ultimately, we are building mathematical models and estimating this wiring based on the diffusion of water as captured by MRI. Many things can affect our estimations, such as the quality of the MRI scan and the sort of mathematical model we use."