//Macro to generate Kymos from MT snaps and GFP streams. //Chris Gell 21-05-2018 //Version 2 //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 // DONE- have it work out which is the stream // reduce thickness or transparency of the lines in the mt map //DONE - name directory in an intelegent way - not wanted, not flexible. //DONE, not wanted - cope with multiple streams (of the same MT FOV)? //environment variables envMakeFullOverlay=0; envAskForPNGs=0; //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") //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 and then work out which image is which. n = nImages; list = newArray(n); for (i=1; i<=n; i++) { selectImage(i); list[i-1] = getTitle; } selectWindow(list[0]); getDimensions(width, height, channels, slices, frames); if (slices==1) { gfpImageName=list[0]; mtImageName=list[1]; } if (slices>=1) { gfpImageName=list[1]; mtImageName=list[0]; } //get the number of frames in the stream selectWindow(gfpImageName); getDimensions(width, height, channels, slices, frames); gfpImageID=getImageID(); n = frames; //make the MT image the same length selectWindow(mtImageName); mtImageID=getImageID(); //make a blurred mt image, a little better look for the kymos run("Gaussian Blur...", "sigma=1"); run("Copy"); for (i=0; i