Saving Profile Plot Data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Saving Profile Plot Data

Orsaeonco
Hi I am writing a small macro to go through the images of a stack (up to 300 images) and plot the intensity line profile of a certain particle in the image then save the profile and the numeric data to a folder the only bit I am struggling with however is the saving of the numeric data.. I try to get it to loop through the images but it brings up an error with the Plot.getValues(x, y) line. Outside of the loop the code works but that only saves one slice and I want it to repeat the process for all slices in the stack.

for (i=1; i<frames; i++) {
         
 selectWindow("Stack");
 run("Next Slice [>]");
run("Plot Profile");
saveAs("Tiff", "/Volumes/MATTUSB01/Teresa's Work/"+title+n)
 
  Plot.getValues(x, y);
  run("Clear Results");
  for (i=0; i<x.length; i++) {
     setResult("x", i, x[i]);
     setResult("y", i, y[i]);
  }
  setOption("ShowRowNumbers", false);
  updateResults;
  saveAs("Results", "/Volumes/MATTUSB01/Teresa's Work/"+data+n+ext);

 n=n+1

 run("Close");
 run("Close");

}

Help is greatly appreciated.
Matthew