Macro to save plot profile data as text
Posted by arobisson on
URL: http://imagej.273.s1.nabble.com/Macro-to-save-plot-profile-data-as-text-tp5018666.html
Hello,
I am new to macro.. and cannot get this to work. I am trying to save my plot profile automatically in a txt or csv file. The macro below gives me a log window but not a txt file. Ultimately, I will need to plot and save this on each image from an image sequence…
Your input is welcome, Agathe
xcenter=1658;
ycenter=306;
makeLine(xcenter,ycenter+1100, xcenter, ycenter+1900);
run("Plot Profile");
Plot.getValues(x, y);
for (i=0; i<x.length; i++)
print(x[i], y[i]);
path = getDirectory("home")+"profile.csv";
saveAs("Results", path);