# MedicalSeg: A Medical GUI Application for Image Segmentation Management
## 4 Results and Discussion
### Performance Analysis  
The robustness and quality of the proposed segmentation methods have been evaluated. A digital retinal database for vessel extraction has been used for this evaluation [24]. This database provides true segmentation data that have been compared with our segmentation results. An example of a DSC comparison of the segmented images against a reference ground truth is depicted in Figure 10. This comparison shows the masks on top of each other. The different colours represent true positive pixels (TP, in white), true negative pixels (TN, in black), false positives (FP, in green), and false negatives (FN, in magenta). For this example, Threshold, Normalized, Intensity, and Snake segmentation results indicate a good correlation between the GT and the mask. Otherwise, Canny and Watershed are the worst algorithms for this purpose because one is based on a contour-based, and the other is region-based. Figure 10: Example of a DSC comparison of the segmented images against a reference ground truth. The different colours represent true positive pixels (TP, in white), true negative pixels (TN, in black), false positives (FP, in green) and false negatives (FN, in magenta). Figure 9: Example of a vascular cerebral TRANCE image using different segmentation techniques (Intensity, Watershed, and GMM). In order to perform a quantitative evaluation of the segmentation result we use the Sorensen-Dice Similarity Coefficient (DSC) [43] defined as twice the intersection between the segmentation mask \(S\) and the ground truth mask (GT) \(GT\) over union of both sets  
\[DSC=2*|S\cap GT|/(|S|+|GT|)=\frac{2 TP}{2 TP+FP+FN} \tag{6}\]  
where \(TP\) stands for true positive pixels (i.e., pixels that take a value of one in both in \(S\) and \(GT\)), \(FP\) for false positives (one in \(S\) but zero in \(GT\)) and \(FN\) for false negatives (pixels that are zero \(S\) but one in \(GT\)). The DSC coefficient as a numeric scalar or numeric vector with values in the range [0, 1] and a value 1 indicates that the segmentation and ground truth masks are identical. As it can be observed in Figure 10, the best algorithm for this purpose is Otsu followed by GMM and ThreshMAX segmentation. This evaluation performance demonstrates that MedicalSeg is a useful tool to generate ground truth and which allows to compare their effectiveness and select the best algorithm for a given application. Summarizing, Figure 10 represents the differences between the correct solution and our results. On the one hand, the green region indicates the difference areas compared to the ground truth. On the other hand, the purple shows just the opposite, with the two algorithms showing that the results are further away from the ground truth. The purpose is not to compare our application with other medical tools available online, such as Fiji/ImageJ, 3D slicer, Horus/Osirix--Osirix DICOM Viewer, Matlab apps, ICY, QuPath, or CADs, among others. All of them are excellent applications and allow to perform segmentations, pre-processing tools, filters similar to the ones we propose in this work, but the big difference is that you usually have to do it manually one by one. Currently, we use MedicalSeg to massively generate large volumes of segmented data with their respective masks. This application automatically generates a folder with all the masks of the block segmentations. In fact, one of the main advantage is the easy access and management of the results. This application represents a first step towards a robust tool to generate automatically and manual management ground truth data using medical images. In this sense, MedicalSeg can be used for artificial intelligence purposes, such as data augmentation. Furthermore, a little validation compared to ImageJ [44] using the same ground truth (GT) database depicted in Figure 10 is performed. ImageJ has been chosen because we consider this tool as a reference in medical applications, and also because it contains most of the segmentations techniques that are used in MedicalSeg.