Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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