// This macro generates kymographs and movies for each microtubule marked by a line ROI // The macro requires that the plugin KymographMin is installed (https://biop.epfl.ch/TOOL_KYMOGRAPH.html). // it's possible to use other kymograph plugins, just make sure you call the plugin correctly (line 30) // The macro runs in patch mode where no images are displayed during processing but instead kymographs and movies are saved to the chosen folder // // how to use this macro// //1. using the line tool select the microtubules and add the selection to the ROI manager by pressing "t" //2. run the macro //3. for each microtubule a movie and a kymograph are generated with unique identifiers and the ROIs are saved in a zip file // // by Mohammed Mahamdeh (Mohammed.mahamdeh@gmail.com) // 2018-12-08 setBatchMode(true); // if true then no images or kymos will be displayed, instead all will be saved to the folder id = getImageID(); //get active image Id, in this case the stack t = getTitle(); // get image title (used to get the path) N = roiManager("count"); //number of MTs in ROI to analyze path = getDirectory(t); // set the directory for saving // case: ROIs in the ROI manager if (Overlay.size==0){ for (i=0 ; i