Image statistics may not be written to the text file when using the Print To File option from the Image Command Tool. This is observed when running the Compute Statistics and Print To File options together in a batch process with the Image Command Tool. The Compute Statistics and Print to File commands may be executed out of order where the Print to File command for an image is executed before the Compute Statistics command is completed for the same image.
Compute Statistics and Print To File options used together
Statistics present in text file.
Statistics not present in text file.
The solution is to queue the batch commands sequentially, running Compute Statistics first for all of the images and then run Print to File for the images.