modified volreg to add transformation matrix