Quasi-one-dimensional bosons in three-dimensional traps: From strong-coupling to weak-coupling regime