I am new to java and doesn't really understand much about it. I am attaching herein java code for your reference that was generated after recording macro.
I particularly need help with two of these things:
1) Making ROI more flexible such that if there is a rectangular image then rectangular Roi covering the 95% of the image is selected. If there is circular image as in the case of agar plate, then Oval ROI covering 95% of the image can be selected.
2) Making redirect option more generic such that the grayscale image opened on imagej is selected in the redirect option.