Laser technology has been used to create the first ever digital record of the iconic 15th century building, which was the centrepiece of the book and film, The Da Vinci Code, starring Tom Hanks.

The cutting edge scan allows experts to “virtually” take the building apart inside and out.

And it could help solve the mystery of whether there are any hidden chambers in the chapel, which according to legend contain prized relics such as the Holy Grail, the mummified head of Christ or the Ark of the Covenant, the container of the Ten Commandments.

David Mitchell, director of the technical conservation group at Historic Scotland, said the scans allowed heritage sites to be recorded in a way never been done before.

He said: “We are able to get to the centimetre accuracy on our buildings, so for example if there was ever a major fire at Edinburgh Castle we would then have the information to be able to rebuild it. We have just finished scanning Rosslyn Chapel and everyone is interested to know whether there are secret hidden parts.”