In spectral-domain optical coherence tomography (SD-OCT), data samples are collected nonuniformly in the wavenumber domain, requiring a measurement re-sampling process before a conventional fast Fourier transform can be applied to reconstruct an image. This re-sampling necessitates extra computation and often introduces errors in the data. Instead, we develop an inverse imaging approach to reconstruct an SD-OCT image. We make use of total variation (TV) as a constraint to preserve the image edges, and estimate the two-dimensional cross-section of a sample directly from the SD-OCT measurements rather than processing for each A-line. Experimental results indicate that compared with the conventional method, our technique gives a smaller noise residual. The potential of using the TV constraint to suppress sensitivity falloff in SD-OCT is also demonstrated with experiment data.