SaveEyelidROI.ijm 459 B

1234567891011121314
  1. Dialog.create("Listing eyelid ROI...");
  2. Dialog.addChoice("which eyelid?", newArray("Top", "Bottom"));
  3. Dialog.show();
  4. channel = Dialog.getChoice();
  5. savename = replace(getTitle(), ".png", "-"+channel+".txt");
  6. savepath = getDirectory("image") + "/" + savename;
  7. fp = File.open(savepath);
  8. print(fp, "X,Y");
  9. Roi.getContainedPoints(xp, yp);
  10. for (i=0; i<xp.length; i++) {
  11. print(fp, toString(xp[i]) + "," + toString(yp[i]));
  12. }
  13. showMessage("saved as: "+savename);