We have data from ImageJ with angle and distance. We are looking for a tool to plot this on polar coordinates kind of like
http://stackoverflow.com/questions/11250166/matlab-rose-plot-increasing-radial-incrementsWe also have an added component of time such that we'd like to assign colors based on time.
Is there a method to do this in ImageJ or should we look into writing our own?
Here's a very no-frills version of what we are looking for, but with frills...
var scaleFactor = 50; // how long to scale lines on graph
var wedgeAngle = 5 / 180 * PI / 2; // in this example, wedge is 5 degrees wide
macro "radial graph [f4]" {
angles = newArray(85, 115, 83, 78, 90, 95, 15); // in arrays for development; real data from text files
dists = newArray( 3, 4, 2.5, 1, 3.25, 2, 1.5);
times = newArray( 0, 0, 0, 1, 1, 2, 3);
colors = newArray("red", "magenta", "cyan", "green", "yellow"); // change from names to numbers
newImage("plot", "RGB black", 512, 512, 1);
xc = 256;
yc = 256;
a = newArray(2);
x = newArray(2);
y = newArray(2);
for (i=0; i<angles.length; i++) {
angle = (angles[i] / 180) * PI;
a[0] = angle-wedgeAngle;
a[1] = angle+wedgeAngle;
for (k=0; k<a.length; k++) {
x[k] = xc + dists[i] * sin(a[k]) * scaleFactor;
y[k] = yc + dists[i] * cos(a[k]) * scaleFactor;
run("Colors...", "foreground=" + colors[(times[i])] + " background=black selection=cyan");
} // for k (makes the wedge)
makePolygon(xc, yc, x[0], y[0], x[1], y[1]);
run("Fill", "slice");
} // for i
run("Select None");
} // end macro
Thank you!!!
=========================================================================
Michael Cammer, Microscopy Core & Skirball Institute, NYU Langone Medical Center
Cell: 914-309-3270 ** MY OFFICE HAS MOVED TO SKIRBALL 2nd FLOOR, Back right **
http://ocs.med.nyu.edu/microscopy &
http://microscopynotes.com/------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html