A Characterization of Dimension Functions of Wavelets