# ZFTool: A Software for Automatic Quantification of Cancer Cell Mass Evolution in Zebrafish
## 2 Materials and Methods
### Methods  
The objective of ZFTool is to automatize and improve the task of measuring the number and mean value of GFP pixels to compare them for 0 hpi and 24, 48, or 72 hpi (depending on the experiment) in order to quantify cancer mass evolution with time. ZFTool was developed as a Matlab toolbox and is available at [[https://gitlab.citius.usc.es/zebrafish/zftool](https://gitlab.citius.usc.es/zebrafish/zftool)]([https://gitlab.citius.usc.es/zebrafish/zftool](https://gitlab.citius.usc.es/zebrafish/zftool)). (Accessed on 22 August 2021). ZFTool eliminates the autofluorescence of the zebrafish through computation of the area with different intensity thresholds and automatically computing the autofluorescence threshold, which is established for both images at 0 hpi and 24, 48, or 72 hpi. ZFTool can establish a base threshold that eliminatesembryo autofluorescence and measures the area of marked cells (GFP) and the intensity of those cells to define a proliferation index. The input to the system are two images at 0 hpi and two images at 24, 48, or 72 hpi (the user selects the time to measure the tumor evolution, ZFool works with any of these values). The output is both numerical (final threshold, mean areas and GFP intensities, proliferation index) and graphical (GFP intensity and area evolution, threshold, and images with initial and final perimeter). As was stated before, zebrafish is ideal for quantification of GFP masses because of its transparency, but a problem arises caused by the variable autofluorescence of the fish, especially in the yolk area. In order to accurately quantify the GFP evolution, a preprocessing must be applied to eliminate the autofluorescence region from the count. This preprocessing is based on the observation of evolution of GFP area with a threshold from 0 (no threshold) to 50 in steps of 5 (see an example in Figure 2). As was stated before, this autofluorescence is variable, depending of the fish and on the hpi, so this threshold must be adapted to each case. The ZFool software evaluated the graph of GFP threshold with respect to the area and selected as threshold the point in which this area remains stable. Once this autofluorescence is eliminated, some parameters are computed in order to measure the cancer mass evolution: the number of GFP pixels in the image (nGFP), which represents the area of the cells inside the yolk sac at two different times, and the GFP intensity Medium Value (GMV), which represents the medium intensity of the fluorescence inside the yolk. By multiplying the nGFP number by the GMV of each image, we determined the proliferation ratio between 0 hpi and 72 hpi to estimate the cell growth. The result obtained at 72 hpi was divided by that obtained at 0 hpi, yielding a proliferation index value (\(PI\)):  
\[PI=\frac{nGFP_{\rm 72 hpi}*GMV_{\rm 72 hpi}}{nGFP_{\rm 0 hpi}*GMV_{\rm 0 hpi}} \tag{1}\]  
A \(PI\) value = 1 means that cells remain stable during incubation, a \(PI\) slightly higher than 1 usually indicates a dissemination of cells (greater area, similar intensity), a \(PI\) near or over 2 indicates a proliferation of cells (greater area, greater intensity), and a \(PI\) lower than 1 indicates tumor cell death. We must have in mind that, in order to compare these measures at 0 hpi and at 72 hpi, the threshold in both cases must be the same, so we will compute these two thresholds automatically and the biggest one will be applied to both images. Due to zebrafish autofluorescence and the variability of capture conditions, the segmentation threshold will not be always the same. In order to design a methodology for automatic computation of this threshold, several tests were performed with a training set of 14 zebrafish, applying thresholds from 0 to 50 in 5 intervals and discarding regions  
Figure 1: Example of segmentation over a characteristic image (zebrafish #8 at 0 hpi and 72 hpi) where the GFP value and the contour image are overlaid in green and red, respectively. The white rectangle will be the region of interest in the next figures.