Judge Harvey said he recognised the difficulties Cooper would have in serving her sentence in a men's prison and that she would not be able to be diagnosed.
"This court has no power over Corrections policy but, in my view, it's an appalling policy but it is one I'm powerless to do anything about."
However, he did give her a 15 per cent discount in recognition of those difficulties.
Judge Harvey made a note for the Parole Board about Cooper's release.
"In my view, it's absolutely crucial upon release everything needs to be done to get counselling and treatment. If you don't, there is a chance you will remain a danger to society."
Cooper was represented by lawyer and member of the group TransAdvocates, Kelly Ellis, who had previously asked the the judge for a reduced sentence to allow her transgender client to serve her time at home rather than in a men's prison, where she would be at great risk of abuse.
Ms Ellis said the fact Judge Harvey had recognised the Corrections Department's refusal to initiate treatment for transgender prisoner was a step forward.
"This is a person who is in need of much assistance and it is not happening. There's not much it seems I can do about it or the court can do about it," Ms Ellis said.
"I think realistically the law evolves slowly but it's been great to advance a case like this in front of such a receptive judge, who gave us a very good hearing."
A police summary said Cooper had been drinking with others at a Whangarei home on January 17 this year when an argument erupted between her and a man.
Cooper punched the man in the face, causing him to fall off a chair, and then threw various things at him, including cups.
When the man got to his feet, Cooper hit him over the head with an unopened bottle of sparkling wine as the man tried to punch Cooper.