​This decision is a real no-brainer.

​The state’s highest court ruled Wednesday that the city does not have to put brains removed for autopsies back into the bodies of the dead before returning the​ cadavers to families​ for burial​.

The ruling stems from a macabre case sparked when classmates of a Staten Island teen killed in a 2005 car accident noticed a brain labeled with their friend’s name in a jar on a school trip to the morgue two months after he died.

The brain was indeed that of the tragic classmate, Jesse Shipley.

Word got back to his parents that the Staten Island medical examiner hadn’t turned over all of their son’s body, and a Catholic priest told the family that Jesse’s burial wasn’t proper without his brain.

It wasn’t until October 2005 that all of the remains were returned, and by that point Jesse could no longer be given a proper Catholic burial, said a family lawyer, Anthony Galante.

Family members sued and a jury awarded them $1 million — which in 2010 was reduced to $600,000 — and a ruling was issued requiring the city to notify next of kin when brains or other organs are removed for autopsies.

But the Court of Appeals, in a 5-2 decision, reversed the ruling, saying “there is nothing in our common law jurisprudence that mandated that the medical examiner do anything more than produce the decedent’s body for a proper disposition.”

The decision also vacates the award, leaving the family with nothing but bitter memories after a decade-long wait.

“I think it was a serious miscarriage of justice,” said the victim’s father, Andre Shipley. “They asked us to accept a lower amount, which we did. We didn’t even get the interest they were withholding. Nothing. They had us bury our son with nothing in his head. It seams like they don’t even have a heart.”

While acknowledging that the circumstances were “tragic and unfortunate,” the court further ruled that there is “ambiguity” concerning the term “remains of the body.”

Catholic League President Bill Donohue said the Shipley family’s priest was exercising good judgment when he told them their son’s body needed to be intact.

“We believe that the resurrection entails a belief in burials — burials of whole human beings whenever possible, not body parts,” Donohue said.

City officials had complained that the notification system forced the ME’s Office to “set up an incredible apparatus” to maintain the organs.

The city’s MEs removed nearly 3,500 brains for autopsies in the past three years, the office revealed in response to a Post Freedom of Information Law request.

An ME’s Office spokeswoman refused to say how many brains had been ­returned to families.

Before the 2010 ruling, next-of-kin often unwittingly buried loved ones minus some organs.

“We are pleased the Court recognized that the medical examiner fulfilled its obligations under the law,” said a city Law Department spokesman.