TITLE: FIVTools Thresholding and Measures
AUTHORS: d.grigore

[DESCRIPTION]
YouTube: FIVTools Thresholding and Measures Walkthrough

The goal is to set a criteria on a single FOV for machine learning that will ultimately lead to a final output of single cells with associated intracellular metrics.

[STEPS]
SECTION: Navigating FIVTools Image GUI
1. Open the FIVTools application.
SECTION: Navigating FIVTools Image GUI
2. Access recent scans by navigating to the correct directory under which the images are saved under "InCell Images dB (Root). Click the "Refresh" button to update the directory of images. 
SECTION: Navigating FIVTools Image GUI
3. Search for your scan in the "Plate ID Contains" filter box. Double click on the scan of interest. A pop-up with the GUI of the scan will appear.

SECTION: Establishing Thresholding Parameters for Segmentation
4. Update the color scheme such that the nuclear channel is blue and mitochondria, red. This is necessary for the segmentation protocol to run correctly. The colors can be updated by clicking "Color" [#1 in Figure 1] until the desired color scheme appears, or by inputting hex RGB codes into the corresponding text boxes.
 
SECTION: Establishing Thresholding Parameters for Segmentation
5. Select the blue nuclear and red mitochondrial channels to be active by ticking the checkboxes under "Vis". Press "Update" to apply these changes to the visualized images.
SECTION: Establishing Thresholding Parameters for Segmentation
6. Under the Tresh column [#2 in Figure 1], double click the number associated with the nuclear channel. This will update the image visualization such that the image that was in the upper-left quadrant is represented as 1) the original image, 2) the threshold mask, 3) filtered objects, and 4) deoverlapped regions. Categories and explanations of these are as follows:  

1. Original (top left quadrant). Original image as it appears from the scan.
2. Threshold (bottom left quadrant). The point of this thresholding category is to separate out background vs nuclei. (Increased thresholding value = more black. Decreased value = less black.)
3. Filtered objects (top right quadrant). For now, we are using the defaults under the hood. If you want to fine tune you can right-click "1: Segmentation". A GUI with crop width, min area, max area will pop up. This box is further culling down the originally thresholded nuclei in the previous threshold category based on set metrics.
4. Deoverlapped regions (bottom right quadrant) final thresholding category that is further refining the filtered objects category. Anything in the box is considered single cell. These images can be exported.

 
SECTION: Establishing Thresholding Parameters for Segmentation
7. Once satisfied with thresholding, click "Save" and exit out of the GUI. 
SECTION: Running &quot;Classify and Measure&quot;
8. Return to the main FIVTools interface. Set the pathway of the output "nMeasures.txt" file under "Destination Folder".
SECTION: Running &quot;Classify and Measure&quot;
9. Navigate to the scans of interest. If more than one scan was selected, ensure that scan parameters are consistent before continuing. Click "mRaft" [B, Figure 3] and select "Classify and Measure" [C, Figure 3]. The "nMeasures.txt" file will be outputted in the desired directory. Follow the status by looking in the region to the right of "Layouts...", "Metadata...", "p Values...", buttons.

 
SECTION: Running &quot;Classify and Measure&quot;
10. The resulting "nMeasures.txt" file can be visualized and analyzed in programs such as Excel and Spotfire. 

Current measurement parameters include nuclear radius, nuclear area, cell rotation, mito size for each isolated single-cell, as determined from the Deoverlapped cells in Step 6. Each row in the data table represents a cell or model [Figure 4]. Multiple models can be run with the thresholded settings at the same time (currently under the hood only). Data table can be taken downstream into analytical tools such as Spotfire for further analysis, just like IN Carta data.