I have made a Jython script which opens an image and asks the user to select points on the image using multipoint selection tool and add the points to ROI manager. This is the Jython script
from ij import IJ from ij.plugin.frame import RoiManager from ij.gui import WaitForUserDialog imp = IJ.openImage("/Users/prakash/Desktop/1.tif"); imp.show() IJ.run("Set Scale...", "distance=0 known=0 pixel=1 unit=pixel"); WaitForUserDialog("","Move to slice where points are to be selected").show() IJ.run("ROI Manager..."); WaitForUserDialog("Select ROIs","Add points to ROI Manager").show() roi = RoiManager.getRoiManager() roi_points = roi.getRoisAsArray()
After this I would like to do the following for each point.
Take one of the points as centre and ask the user for the radius of the circle that needs to be drawn around that point. Then the script should draw the circle and overlay on top of the image. Then the script should ask the user if the circle is satisfactory or not. If not satisfactory, ask the user for new radius for the same point. If satisfactory, save this radius with the corresponding centre coordinates in a csv file and then move to the next point and repeat the same procedure.
Is there any way to do this all in Jython? The reason being I have other Jython code snippets that do something else and I would like to integrate this process with the existing snippets.