The non-uniform Discrete Fourier Transform algorithm has shown great utility for reconstructing images from non-uniformly spaced Fourier samples in several imaging modalities. Due to the non-uniform spacing, some correction for the variable density of the samples must be made. Common methods for generating density compensation values are either sub-optimal or only consider a finite set of points in the optimization. This manuscript presents an algorithm for generating density compensation values from a set of Fourier samples that takes into account the point spread function over an entire rectangular region in the image domain. We show that the reconstructed images using the density compensation values of this method are of superior quality when compared to other standard methods. Results are shown with a numerical phantom and with magnetic resonance images of the abdomen and the knee.