A correction algorithm for detector nonuniformity in computed tomography