Emma Thompson is visiting one of the UK’s most famous court complexes in preparation to play the role of a High Court judge in a new film.

The actress is set to star in the film version of Ian McEwan’s 2014 novel The Children Act.

She was at the Royal Courts of Justice in London – where High Court judges are based – on Tuesday carrying out research.

Emma Thompson is researching a film role (Matt Crossick/PA)

“I don’t think I can say too much,” she said, while waiting to make her way into the main entrance on the complex. “I’m playing the role of the judge in the film. I’m just here doing a bit of research.”

The Children Act is a story about a High Court judge who specialises in family cases and is asked to decide whether a 17-year-old Jehovah’s Witness should have medical treatment against his wishes.

A synopsis of the novel on the website www.ianmcewan.com describes the plot: “Fiona Maye is a leading High Court judge, presiding over cases in the family court.

“She is renowned for her fierce intelligence, exactitude and sensitivity. But her professional success belies private sorrow and domestic strife. There is the lingering regret of her childlessness, and now, her marriage of 30 years is in crisis.

Ian McEwan’s book The Children Act is being adapted into a film (Joel Ryan/AP)

“At the same time, she is called on to try an urgent case: for religious reasons, a beautiful 17-year-old boy, Adam, is refusing the medical treatment that could save his life, and his devout parents share his wishes. Time is running out. Should the secular court overrule sincerely held faith?

“In the course of reaching a decision Fiona visits Adam in hospital – an encounter which stirs long-buried feelings in her and powerful new emotions in the boy. Her judgment has momentous consequences for them both.”

A year ago a real High Court judge who specialises in family cases mentioned the novel in a footnote to a ruling on a case about whether a child should have medical treatment against his parents’ wishes.

Emma was keeping quiet about the details of the role (Michael Sohn/AP)

Mr Justice Mostyn said in October 2015 that the novel was “excellent” – but suggested that it had the wrong title, saying that legal proceedings relating to the 17-year-old boy would not have been launched under the 1989 Children Act.

He said an issue relating to whether someone aged 17 should have medical treatment forced on them would have come to court via a different legal avenue.

“In my opinion, a question of whether a medical procedure should be forced on a 16 or 17-year-old should be sought solely under the High Court’s inherent jurisdiction, and not under the Children Act,” said Mr Justice Mostyn.

“It is for this reason I think that Ian McEwan’s excellent novel The Children Act (Jonathan Cape 2014), which is about a 17-year-old Jehovah’s Witness refusing a blood transfusion, is in fact incorrectly titled.”