A dynamic attenuator for computed tomography