We study the relationship between the local density of states (LDOS) and the conductance variation $Delta G$ in scanning-gate-microscopy experiments on mesoscopic structures as a charged tip scans above the sample surface. We present an analytical model showing that in the linear-response regime the conductance shift $Delta G$ is proportional to the Hilbert transform of the LDOS and hence a generalized Kramers-Kronig relation holds between LDOS and $Delta G$. We analyze the physical conditions for the validity of this relationship both for one-dimensional and two-dimensional systems when several channels contribute to the transport. We focus on realistic Aharonov-Bohm rings including a random distribution of impurities and analyze the LDOS-$Delta G$ correspondence by means of exact numerical simulations, when localized states or semi-classical orbits characterize the wavefunction of the system.