//Analyses kymographs (measure growth and shrinkage rates). //Select kymograph to analyze, run the macro and follow the steps. Results will be saved in the //same folder the kymograph is in. //by Mohammed Mahamdeh (Mohammed.mahamdeh@gmail.com) // 2018-12-08 id = getImageID(); //get active image Id, in this case the stack t = getTitle(); N = roiManager("count"); //number of MTs in ROI to analyse manager path = getDirectory(t); // set the directory for saving length_cal = getNumber("enter pixel size in um", 0.065);// pixel size in micron time_cal = getNumber("enter time step in seconds", 5) ; // time step cal = 60*length_cal/time_cal; // rate calibration factor in um/min //---------------------------------------------------------- //other options to get calibration //getVoxelSize(width, height, depth, unit) //getPixelSize(unit, pixelWidth, pixelHeight) //---------------------------------------------------------- // check if result window is open and close it if (isOpen("Results")) { selectWindow("Results"); run("Close"); } run("Set Measurements...", "area bounding display redirect=None decimal=3"); // measuring growth waitForUser("draw growth lines and add them to the ROI (by pressing (t) after each selection) then press OK"); Roi.setStrokeColor("green"); // green color to indecate growth // for every line in the ROI manager measure growth/shrinkage rate and growth time for (i=0 ; i