A method for computing synchrotron and inverse-Compton emission from hydrodynamic simulations of supernova remnants