setpix takes in input an image or a cube, and an ASCII file describing pixel positions and values. It will replace the pixels in the file by the ones given in the description.
setpix man page