This is my first time posting in a forum like this, so I apologize if the formatting is off! I have a jython script which iterates through a large folder of images, opening them in imageJ and opening the corresponding ROI zip files. It then sets the scale and performs measurements based on the rois. When closing the images, because I set the scale, it gives me the “Do you want to save changes dialog box?” I want to set it so that this dialog does not pop up so that the script can run without any interaction from the user. In my research, I’ve only been able to find how to do this in imageJ macros language, not python. Currently I just have:
imp = IJ.getImage() imp.close()
In imageJ macros, it seems this is possible through:
imp.changes = false; imp.close();
I don’t know how to set change to false in Jython, but I feel like there should be an easy way to do it. My only other thought/back up plan is to write an imageJ macro to close my images and executing it through the MacroRunner in my jython script, but this seems unnecessarily cumbersome.