When NYPD Officer Peter Liang goes on trial on manslaughter charges Tuesday, many will ask whether he is a criminal or a victim of a racially cockeyed New York City. The answer may depend on race.

Liang, who is of Chinese descent, was patrolling a dark stairwell in a housing complex in East New York with his weapon drawn in November 2014 – a potentially dangerous but accepted practice in the NYPD when patrolling high-crime housing projects -- when his gun apparently went off. The shot ricocheted and killed Akai Gurley, an unarmed African American man.

The racial aspect of Liang’s case can best be viewed through the prism of the apparent chokehold death of Eric Garner in 2014. After a Staten Island grand jury declined to indict Officer Daniel Pantaleo, many New Yorkers saw the case as another example of racial bias and the lack of police accountability.

Many Asian-Americans see Liang’s indictment as racial discrimination, too. “A lot of these cases, they never indict the cop. A white cop was not indicted for killing Eric Garner,” said Eddie Chiu, whose fraternal Lin Sing Association has raised $33,000 for Liang’s defense. “People feel it [Liang’s indictment] is unfair to Peter and to the Chinese.”

Indeed, in 2004, Richard Neri, a white cop, was patroling the rooftop of another Brooklyn housing project with his gun drawn — a potentially dangerous practice accepted by the NYPD while patroling high-crime housing projects. Neri fatally shot Timothy Stansbury, a black teenager. A grand jury declined to indict Neri, concluding the shooting was accidental.

Liang and his partner were patroling the Pink Houses. As Liang opened the stairwell door, his gun went off, the bullet striking a wall before striking Gurley in the heart.

Kenneth Thompson, Brooklyn’s first African-American district attorney, got a grand jury to indict Liang. At the officer’s arraignment, Thompson said he didn’t believe Liang intended to kill Gurley. “What the evidence showed . . . is that this police officer put his finger on the trigger and fired that gun into a darkened stairwell when there was no threat.”

Complicating the racial outlook, the judge presiding over the Liang case will be Denny Chun, a Korean-American. He’s in an unenviable position — under tremendous pressure from all sides.