3D energy deposition measurements with the GEMPix detector in a water phantom for hadron therapy