I need to open a series of images coming from different sources and normalize them to have a similar min-max range. The easy way to do this in a macro is to use run("Enhance Contrast".. and then run("Apply LUT").
The problem is that I get an error message "the display range must first be updated" if the image already has a min-max range stretching from 0..255. See the below test macro. Here, "Apply LUT" fails for the Line Graph image.
Also, it does not fail for AuPbSn. The min..max range was originally 0..255, and auto contrast changes that to 0..252.
So it seems that Apply LUT fails if the range is 0..255 (meaning no change).
Can this restriction be changed, so that the macro does not break? The "Apply LUT" method could simply return with no changes if no changes are needed, instead of giving an error message. Or the error message could be given only when using the GUI, but not in a macro.