Hi, I’m trying to get a distance distribution from a point in an image. I’ve been using the Radial Profile plugin, but it automatically changes ROI to a circle. Is there another way to get a similar result, but on a hand-drawn ROI that resembles an oval shape?
Would you please direct me on how to edit this section? Why mR is divided by 4? Thank you.
public void run(ImageProcessor ip) {
setXYcenter();
IJ.makeOval((int)(X0-mR), (int)(Y0-mR), (int)(2*mR), (int)(2*mR));
doDialog();
IJ.makeOval((int)(X0-mR), (int)(Y0-mR), (int)(2*mR), (int)(2*mR));
imp.startTiming();
if (canceled) return;
doRadialDistribution(ip);
}
private void setXYcenter() {
rct = imp.getRoi().getBoundingRect();
X0 = (double)rct.x+(double)rct.width/2;
Y0 = (double)rct.y+(double)rct.height/2;
mR = (rct.width+rct.height)/4.0;
}