With manual detection the program will refer to a specific time to use as a filter to detect the start and end of the events. There are two different ways of specifying the time of an event: using the ROI's frame number when the analysis is first run, or changing the location of the starting or ending point of a previously identified event. These two ways will briefly be explained in the following sections.
As mentioned in the Protocol page, there is the option to enter the ROI frames number for each cell in the Excel file. This will allow the program to perform a manual detection. This detection use the same algorithm as the Automatic detection, but once the program has found all the possible events it will filter those in order to have only the nearest one to the frame number indicated in the Excel file. The particular Excel sheet from which the program will retrieve the ROI frame information should be named "roiplacement", and should have one cell per row as in the figure below.
Sub SheetName()
Columns(1).Insert
For i = 1 To Sheets.Count
Cells(i, 1) = Sheets(i).Name
Next i
End Sub
Moreover, if the RoiSet.zip files are all in the same directory the following ImageJ macro can extract the frame number and save them as needed for the fusion analysis program.
//This macro will ask for the directory where RoiSet file are placed in order to extract the //frame number for each ROI //Getting the folder path = getDirectory("Select a Directory"); //Set the max number of frames Dialog.create("Number of frames"); Dialog.addNumber("Number of frames", 181); Dialog.show; nframes = Dialog.getNumber(); //Create an empty new figure as template newImage("Untitled", "8-bit black", 512, 512, nframes); list = getFileList(path); setBatchMode(true); //Loop through all the RoiSet.zip file in the folder for (f=0; f<list.length; f++){ if (endsWith(list[f], ".zip")){ file = path+ "\\"+ list[f]; roiManager("Open", file); nROI = roiManager("count"); frame = newArray(nROI); for(i=0; i<nROI; i++){ roiManager("Select", i); slice = getSliceNumber(); frame[i] = parseInt(slice); } //Print a line in the log for each file IJ.log(list[f]); Array.print(frame); roiManager("Deselect"); roiManager("Delete"); } } setBatchMode(false); close("Untitled")
Since the ROI frames are comma separated, in order to import them in Excel you have to use the "Paste -> Use Text Import Wizard" option.
After running the automatic detection, both the start and end of events can be modified. To do so, the user simply right-clicks on the Event trace where the event has to start/stop. Then the program will take that frame number as reference and try to locate the first frame in the sorrounding points where the trace matches the detection critiria. If you wish to include a point that does not meet the detection criteria, you can use the Force event option from the context menu: this will add a start and/or end point exactly where you click regardless of the detection criteria.