Reconstructing the density operator by using generalized field quadratures