On the dimension function of orthonormal wavelets