A former boxer has been sentenced to nine years behind bars for using a samurai sword to slice open the head of a WA Police officer, in what a judge described as "an attempted murder of a most serious kind".

Milos Radovic, 47, attacked Senior Constable Andrew Swift outside the home of Radovic's ex-wife and three children in the southern Perth suburb of Rockingham in July 2017.

Senior Constable Swift and another officer had been called to the scene after a report of a disturbance involving Radovic, who was the subject of a violence restraining order taken out by his wife.

Senior Constable Swift was injured in the attack in July 2017 but his scars have since healed. ( Supplied: WA Police Union )

The court heard Radovic approached Senior Constable Swift with the sword above his head, and when he was told to stop, he instead rushed towards the officer.

Senior Constable Swift discharged his taser, but it was ineffective in stopping the attack.

The court heard Radovic then brought the sword down in "a chopping motion — akin to someone chopping logs".

The pair were left wrestling on the ground before Radovic was subdued.

Radovic said he had the sword because he wanted to speak to men who he thought had guns. ( Facebook: Milos Radovic )

Officer 'bravely' put himself in way

In sentencing, Supreme Court Judge Bruno Fiannaca said Senior Constable Swift suffered a fractured skull and was fortunate it did not cause a brain injury.

He said Radovic had "intended to kill a police officer who was risking his life to protect others", and the officer had "bravely" put himself in his way.

Constable Andrew Swift was treated in hospital after being struck with the sword. ( Supplied: WA Police )

Justice Fiannaca told the court Radovic had a history of violent offences and his past record showed "disrespect and defiance towards police".

He sentenced Radovic to nine years in jail for the attempted murder, and four years for going armed to cause fear, with the sentences to be served concurrently.

The judge also ordered the samurai sword be destroyed.

Radovic will be eligible for parole after serving seven years in jail.

He has also been given a lifetime violence restraining order in a bid to prevent contact with Senior Constable Swift.

Police union to press for appeal

The WA Police Union president Harry Arnott said he was disappointed with the jail term, especially given it was not the first time Radovic had assaulted a police officer.

"We are disappointed for Andrew and his family," Mr Arnott said.

"Mr Radovic spends seven years in prison.

"Andrew and his family carry the scars of this event, emotional and physical, for the rest of their lives."

WA Police Union president Harry Arnott said seven years in jail was not sufficient, given the on-going trauma the family faces. ( ABC News: Alisha O'Flaherty )

Mr Arnott said the union would be lobbying the Director of Public Prosecutions to appeal against the sentence.

Speaking after Radovic was convicted in October last year, Senior Constable Swift said he had just been doing "what I was supposed to do" when he was attacked.

"I don't feel anything towards him personally, it's just an unfortunate series of events," he said.

The samurai sword on the ground at the scene of the incident in Rockingham. ( Supplied: Supreme Court of WA )

"Hopefully he just stays away for a long time, both me and his family can get on with life."

Senior Constable Swift said while his physical scars had healed relatively rapidly, he was still recovering.

"The internal healing process is still going on emotionally … the emotional scars are still there," he said.