The program had been passing the moving image to the registration object as the input of the moving image writer. I changed it to pass the output of the moving image reader instead.