Modelling the spectral energy distribution of galaxies. IV. Correcting apparent disk scalelengths and central surface brightnesses for the effect of dust at optical and near-infrared wavelengths