Implementation of the method described in this paper: http://dx.doi.org/10.1117/12.2004001