//Macro to generate Kymos from MT snaps and GFP streams. //Chris Gell 28-11-2017 //Version 1 //macro to make kymos for gfp tirf data //assumes 2 images are loaded and that //these are a stream and a mt. //go to either and add lines to the //ROI manager. Then run the macro. //to do the next one clear the ROI manager //and close all open windows. //load the next strem and snap. // to add // have it work out which is the stream // reduce thickness or transparency of the lines in the mt map //name directory in an intelegent way - not wanted, not flexible. //cope with multiple streams (of the same MT FOV)? //see if any images are open. if (nImages!=2) { // Dialog.create(""); Dialog.addMessage("Too many or too few images open, open 2 images, the MTs and stream."); Dialog.show(); exit; } roiManager("show all with labels") setBatchMode(true); //ask for an identifier for this analysis expName=getString("Enter an indetifier for this experiment", ""); //create an array with a list of open window names n = nImages; list = newArray(n); setBatchMode(true); for (i=1; i<=n; i++) { selectImage(i); list[i-1] = getTitle; } //setBatchMode(false); // create a dialog to get the user to tell us which is which title = "Choose MT image"; width=1024; height=1024; Dialog.create("Choose MT image"); Dialog.addChoice("Type:", list); Dialog.show(); mtImageName = Dialog.getChoice(); // create a dialog to get the user to tell us which is which title = "Choose GFP image"; width=1024; height=1024; Dialog.create("Choose GFP image"); Dialog.addChoice("Type:", list); Dialog.show(); gfpImageName = Dialog.getChoice(); //print(gfpImageName); //make the stack for the MT kymo // "ConvertImageToStack" // // This macro expands a single image into a // stack by duplicating the image a specified // number of times. //get the number of frames in the stream selectWindow(gfpImageName); getDimensions(width, height, channels, slices, frames); n = frames; //print(n); selectWindow(mtImageName); //make a blurred mt image, a little better look for the kymos run("Gaussian Blur...", "sigma=1"); run("Copy"); for (i=0; i