#pragma rtGlobals=1 // Use modern global access method. #include "MultiROI" #include "CustomColor" #include "SaveTiff" #include "PopWaveBrowser3" /////////INSTRUCTIONS//////////////////////////////////////////////////////////////////// // 1. SARFIA must be installed // // 2. Threshold the kymograph; // // 3. If thresholding wasn't performed in SARFIA, run the function MultiROI(binarymask, targetwave) // // on the binary mask. Targetwave is a string, which is the name of the resulting wave. Make sure // // the string contains "ROI". Otherwise skip this step. // // 4. Execute KyCP(), which opens a control panel. Specify the waves containing the kymograph and // // the MultiROI mask. // // 5. The results will be automatically displayed // ///////////////////////////////////////////////////////////////////////////////////////// Function/wave SegregateROIsByLine(ROIwave) Wave ROIWave Variable xDim, nLines, ii, ROICount=0, ROIsFound xDim=DimSize(ROIWave, 0) nLines=DimSize(ROIWave,1) MatrixOP/o/free w_ROI = Replace(ROIWave,1,NaN) Duplicate/o ROIWave, segregatedROIs For(ii=0;ii