My programing skills are very poor and that’s why I need your help.
I want to do the same process to many many images and I thought of programing it (well, record it and then add/remove some things). I want to take an image, specify a region, duplicate that region, change the name adding a “_centered” (instead of a "_1) before the .tif and saving it. This is what I’ve got:
selectWindow("CurrentName.tif"); run("Specify...", "width=540 height=540 x=50 y=15"); run("Duplicate...", "title=CurrentName_centered.tif"); saveAs("Tiff", "C:\\Users\\Admin\\Desktop\\MyFolder\\CurrentName_centered.tif");
I have seen that there’s a similar topic https://forum.image.sc/t/using-duplicates-in-imagej-macros/992 but they start discussing and I lose track.
I guess I have to use “getImageID()”, but as I said, I am not very skilled.
I would be very grateful if you could help me.
Have a nice day