Heavy metals like nickel and zinc are usually the last thing that plants want to grow next to in high concentrations.

But a specialised group, known as hyperaccumulators, have evolved to take up the normally toxic metals into their stems, leaves and even seeds.

Researchers have been studying Pycnandra acuminata in particular - a tree that grows on the island of New Caledonia in the south Pacific.

They think it may use the nickel to defend against insects.

Its latex has an unusual blue-green colour as it contains up to 25% nickel.

"Pycnandra acuminata is a large (up to 20m tall) rare rainforest tree, restricted to remaining patches of rainforest in New Caledonia," says Dr Antony van der Ent, a researcher at the University of Queensland who has been studying the tree.

"As a test-subject it is challenging because it grows very slowly, and it takes decades to get it to produce flowers and seeds. It is threatened by deforestation as a result of mining activities and bush fires," he told the BBC.

The tree's unusual affinity for nickel first came to light in the 1970s, and research into other hyperaccumulator plants has increased since then.

Looking inside
So how do you tell what's going on inside these plants?

Pycnandra and other hyperaccumulators have been analysed at the DESY synchrotron in Hamburg, using an X-ray technique.

"If you use a conventional microscope you can see structures, but you can't actually tell what it's made out of," explains Dr Kathryn Spiers, who has also been studying Pycnandra.

Dr Spiers used a technique that allows a sample to be imaged and rotated very quickly before it is destroyed by the X-ray beam.

"At the synchrotron the light source is very bright and our detector is very fast, so that means you can [scan it] before you've killed your sample. You see the [samples]; you've literally got a hole burnt across them."

Researchers can then piece together a full image of the plant sample, with its different element components visible.

Future uses
Researchers are still working out exactly why these particular plants have evolved in this way to cope in such harsh soils. But it's likely not down to human interference with the environment.

"The evolution of hyperaccumulation has evolved many times over in very different families, and likely has taken millions of years. These plants are found on naturally metal-enriched soils," says Dr van der Ent.

However, some scientists are hopeful that hyperaccumulators could be used to "clean" soil where there has been a build-up of toxic material due to human activity.

Other potential applications include phytomining - growing hyperaccumulator plants on nutrient-poor but metal-rich soils to extract the elements they take up.