Distortion correction: [ERROR] Module threw exception java.lang.NullPointerException


I am using “Distortion correction plugin” in ImageJ. At times it works fine but other times it gives an error (attached).

The plugin requires user initially to select source folder and target folder for saving processed images. After one run the plugin defaults to the same target folder and keeps using it until ImageJ is restarted.

I am using this plugin as a part of a macro and the target folder is a variable and is used afterwards. Apparently if I forget to restart ImageJ and then start working with a different source file folder this issue of having the target folder defaulted leads to the plugin giving error.

Did anyone encounter this type of problem before? How to solve this? The plugin starts working again after some time and without any obvious reason. Restarting PC doesn’t help.

Error.txt (1.0 KB)