Writer should follow convention: zyx order

Currently, the writer used xyz order for coordinate axes. Should be zyx according to conventions.