Skip to content

Instantly share code, notes, and snippets.

@quantixed
Last active March 9, 2020 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantixed/8d9b04fbff142d48c565f41169199cfc to your computer and use it in GitHub Desktop.
Save quantixed/8d9b04fbff142d48c565f41169199cfc to your computer and use it in GitHub Desktop.
short macro to save a cell of interest (one frame from a two channel movie)
/*
* Short routine to save a single timepoint from a 2 channel movie
* Used for knocksideways spindle analysis
* Best done with "click ROI" square ROI over cell of interest
*/
dir = getDirectory("home")+"Desktop"+File.separator
winName = getTitle();
sliceNo = round(getSliceNumber() / 2);
s = "title=[tempwin] duplicate frames=" + d2s(sliceNo,0);
run("Duplicate...", s);
selectWindow("tempwin");
saveAs("tiff",dir + winName + "-" + IJ.pad(d2s(sliceNo,0),2) + ".tif");
close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment