The victim of the Leytonstone Tube attack has been commended for his "philosophical view" after an Islamic State-inspired knifeman tried to behead him.

Somali-born Muhiddin Mire, 30, targeted strangers at random in the ticket hall at Leytonstone Underground station in east London on December 5 last year.

He attacked 56-year-old musician Lyle Zimmerman as they travelled on the same train from Stratford to Leytonstone, where the knifeman lived alone in Sansom Road.

Mr Zimmerman said he was "fortunate" to have received prompt first aid treatment at the scene from a passing junior doctor.

In a statement read during Mire's sentencing hearing at the Old Bailey in London, he said he was "quite lucky" to have survived.

"I have been left with a scar on my neck which I am aware of only because it pulls when I use my voice but is otherwise superficial and healing well," he said.

Mr Zimmerman suffered from "flashing lights" in his vision for months after the attack.

"I am somewhat more cautious about interacting with strangers since the attack - overall I have not been significantly traumatised by the attack psychologically," he added.

Prosecutor Jonathan Rees QC praised him for his "philosophical view" of his injuries.

He also commended a number of passers-by who intervened in the attack.

"There were a number of individuals who behaved with conspicuous bravery," he said.

"The group of course included Mr Zimmerman himself and Andrius Sabaliauskas, David Pethers, Dr Smith, a junior doctor who provided first aid at the scene, and Daniel Bielinski who took out a camera to film what was happening, plainly with a view to make sure everyone was properly held to account.

"They have been contacted; none took up the option to come to court, but plainly that doesn't detract from how they behaved on the day."

Mire appeared in the dock for the hearing wearing a blue tracksuit and flanked by several dock officers.

The judge's sentencing remarks will be video-recorded as a pilot case exploring the potential for public broadcasting of court hearings.

The footage was being shot to test out the use of cameras in Crown Court proceedings and will not be broadcast publicly, but the pilot scheme could pave the way for future live coverage of Crown Court cases.

Mire has a history of mental illness and his psychosis involved the belief that he was being persecuted for his religion and stalked by MI5 and MI6.

He had images of Fusilier Lee Rigby and British Islamic State (IS) executioner Jihadi John on his Samsung phone, along with material linked to IS.

One onlooker shouted at him during the attack: "You ain't no Muslim, bruv", after Mire declared he was going to "spill blood" for his "Syrian brothers".

Judge Nicholas Hilliard QC, Recorder of London, said he might not pass sentence on Wednesday because he has to consider Mire's mental health problems.

"There are obviously a whole range of options as far as the offence of attempted murder is concerned," he added.

"That includes the possibility of an indeterminate custodial sentence at one end and the possibility of a hospital order at the other."

The court will hear evidence about Mire's mental state from a number of psychiatric experts.