# A Prostate MRI Segmentation Tool Based on Active Contour Models Using a Gradient Vector Flow
## 4 Discussion of the Segmentation Method Results  
In this section, we present a deep analysis of the results of a single segmentation experiment performed using the implemented algorithms, namely the Basic ACS, Simplified ACS and GVF ACS versions of the snake-based models. For all the cases, the initial contours used for all the zones are shown in Figure 11.  
The results for all the algorithms and the ground truth for the selected image are shown in the Figure 12.  
From this experiment, it is possible to confirm what it has been said in previous sections. The Basic ACS algorithm performs relatively well when there is some gradient information between different areas. In this image, the cyan and the blue contours (corresponding to the PZ and CZ, respectively) are practically attached to the borders; the contour corresponding to the TZ (yellow contour) is almost perfect. Nonetheless, the tumour area invades the TZ area, since the intensities contrast between them is not enough in order to define a good edge. For the case of Simplified ACS, the results are not so satisfactory. This algorithm is uses simplifications of the formulas described in [12]. It has been tested for heart's left ventricle segmentation and it has a good performance in both, quality and speed, but for prostate segmentation, this is not true. Except for the TZ, all the results take part of the other zones, and only when the edge is too strong, the snake seems to be perfectly attached to it. Figure 11: Initialization used for the testing of all the algorithms. Finally, as it is expected, the Gradient Vector Flow implementation overcomes all the problems, and the curves are strongly attached to the borders of each zone. There is only a little overlapping between the tumour and the TZ. Another point to observe is the smoothness of the results from _Basic ACS_ and _GVF ACS_. None of them include either a shape prior or the smoothing factor. This allows the snake to evolve in any shape, which is desired in this case, since there is not a single prior that work for all the prostate zones. Additionally, for the same reason, a generic post-processing that increases the smoothness of the curves is not trivial to implement. This problem is visible mainly in the result given by the _Basic ACS_, where all the contours do not present smooth borders. Nonetheless, the _GVF ACS_ generates a result that even without these factors, the outcomes are not so jagged. Once again, the addition of the Gradient Vector Flow component surpasses the results given by the _Basic ACS_. It is worth mentioning that the initialization (in all the cases) requires to be inside of the object to produce valid results. Since a lot of objects are present in an MR image, a larger contour than the object will produce poor segmentation results. In order to reduce this effect, the image to be segmented is cropped to an square of 150x150 pixels around the center of the initialization contour before starting the segmentation process. As a consequence, not only the influence of other objects over the snake is reduced, but also it reduces the execution time, since less operations are required at each iteration of the algorithm. In order to measure quantitatively the efficiency of the three model implementations, a contour evaluation of this test was performed. For this evaluation, the Hausdorff distance (HD) and Dice index (DI) metrics for the various segmentation results were compared with a ground truth provided by a specialist. The Hausdorff distance between two finite set of points A and B is defined as follows:  
\[HD(A,B)=max(h(A,B),h(B,A)) \tag{22}\]  
where \(h(A,B)\) is the directed Hausdorff distance defined by:  
\[h(A,B)=\max_{a\in A}\min_{b\in B}\|a-b\| \tag{23}\]  
where \(\|.\|\) is the Euclidean distance and \(A\) and \(B\) are the resulting contours of the segmentation.