Posted by
Thaddeus on
Aug 18, 2020; 8:39am
URL: http://imagej.273.s1.nabble.com/Concentric-Circle-Formation-Slices-tp5023860.html
I intend to produce a macro where after a user generated circle a series of
concentric circles is produced. However, the variables change without any
alteration on my part. The bounding rectangle positions and radius just
decrease on their own for no reason each time I run the macro so I cannot
script it in any straight forward manner. Here is my macro so far:
setBackgroundColor(0, 0, 0);
run("Clear Outside"); // Clear background data
W1 = getValue("Width");
H1 = getValue("Height");
xb = getValue("BX");
yb = getValue("BY");
R = (H1+W1)/4 //get radius
xc=xb+W1/2 // Center x value
yc=yb+H1/2 // Center x value
Rx=0.9*R // Reduced radius
x=xc-Rx*sqrt(2) //New bounded corner x value
y=yc-Rx*sqrt(2) //New bounded corner y value
makeOval(xb,yb,2*,2*R); // This should reproduce the same exact oval as the
user generated one and it
//does not (Ideally this new circle
would be smaller and about the same
//centroid as the original, but I cant
even make the same oval yet)
run("Clear", "slice"); // Remove center data
//Next I would recall the image and repeat with new smaller outer circle
// Ideally I should run this in a loop and each iteration will save only the
data from each new concentric ring
//Thanks for your time and help
--
Sent from:
http://imagej.1557.x6.nabble.com/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html