Is the Fractal Dimension of the Contour-lines a Reliable Tool for Classification of Medical Images?

. When two-dimensional medical images are subject to fractal analysis, one of the methods used is to detect the contour of objects in the binary images and later to estimate the fractal dimension of the extracted contour. This scalar characteristic of the medical image should help in discrimination between normal and abnormal tissues. In this paper we expose the factors that affect the reliability of such examinations and put the fractal dimension in question as a valid criterion for description, classification and recognition in medical diagnosing.


Introduction
Fractal analysis is a mathematical field that deals with fractal characteristics of data.Its most important instrument is the fractal dimension, which can be defined on many ways and computed by different methods.The fractal dimension, roughly speaking, is a measure of complexity or irregularity of a fractal object.Medical images contain objects with typical fractal, non-Euclidean, structure -the fact that triggered the scientific community to apply the tools of fractal analysis in medical diagnosing.One of the most used approaches when using the fractal dimension as a diagnosing tool is the following.Normal and abnormal considered tissues (or cells) visually differ in smoothness; the first are smooth and even, the second are irregular, complex and odd.The first have lower complexity, i.e. lower fractal dimension, whilst the second have higher complexity, i.e. higher fractal dimension.Although this fractal approach for describing, classifying and recognition of medical images, as well as following and predicting the patient's condition, sounds reasonable and it is justified many times (see for example [1][2][3][4][5][6]), we have detected many ambiguities which put in question the reliability of the fractal dimension when applied in medical diagnosis or in some other field where natural objects are classified on the basis of the estimated values of the fractal dimension of their 2D contours.
Our experimentation began when we tried to reproduce closely the results met in several papers for successful application of fractal dimension in diagnosing cancer ( [1][2][3][4][5][6][7]).We decided to work with skin cancer, taking into consideration the previously reported results and the dermatological ABCDE rule, according to which one of the most specific characteristic of melanoma moles is their irregular border.Thus, for melanoma moles higher fractal dimension is expected to be obtained, at least in statistical sense, compared to the fractal dimension of non-melanoma moles.We had an idea for establishing a new method for estimating the boxcounting dimension of lines, for which we had a strong theoretical justification that it would be more robust than already used methods (a description of some methods is given in the review article [8]).And we planned to compare the published methods with our new method, in a proper application.Unfortunately, all our efforts to reproduce as much as possible the results from the papers, were unsuccessful, i.e. they were not giving neither expected results, nor any systematization or differentiation of melanoma and non-melanoma moles.Thus, we came to a challenge of answering the question: is the fractal dimension reliable or not to be used as a tool in medical diagnosing?
Deeper insight in our research is exposed in the following sections: Related Work, Theoretical Grounds, Data and Methods, Results and Discussion and Conclusion.

Related work
The authors in [6] compare the detection rate of malignant melanoma based on clinical visual investigation of about 65% with their approach based on fractal analysis, which gives significant 79.1% correctness.Moreover, the approach of Klein et al. in [2] gives high 97% of correctness in identifying malignant

2016
, 6 cells, which sounds remarkable compared to the current best tumor marker for pancreatic adenocarcinoma CA19-9 -it has its own sensitivity of 50 -70% and applied jointly with two other tumor markers, the sensitivity is up to 85%.Dobrescu et al. in [7] claim that fractal and texture analyses can discriminate between the shapes of benign and malignant tumors.Fractal analysis and geometry have many applications other than diagnosing cancer.Indeed, they have application in image analysis in general, and especially in the medical fields (classifying ECG and EEG signals, brain, mammography, bone images, see for example the review given in [8]).All of these papers use the fractal dimension, computed with different methods, as one of the factors for classification and diagnosing.
On the other hand, there are papers that report about the non-reliability of the fractal dimension.Most of the fractal dimension estimators use the easy-to-implement box-counting method, for which the following drawbacks were recorded: binarization of the signal, construction of empty boxes, grid effect ( [8]).Parameters tuning could improve the estimations by the box-counting method.However, it will be not clear whether the obtained differences in fractal dimensions are results of true differences in the images or results of certain "good" decisions made during the estimation process.In the same paper ( [8]), the authors conclude that no comparative analysis was done (according to our knowledge, this is still the case), which could produce the most suitable method and improvements of existing results.The authors in [9] claim that the fractal dimension estimates depend on the estimator employed, the pixelization and resolution of the images and the structure identification technique used, and they kindly suggest that the previously reported results need revision.The authors of [10] come to a conclusion that fractal dimension depends on the edge detection algorithm used, in the sense that thicker line yields to higher dimensional values.Other authors (see [11]) treat the inconsistency of the fractal characteristics of medical images over large scale-ranges, proving that the fractal dimension depends on scale at which the object of interest is considered.Also, they propose a method for determining a scale or scale interval in which fractal dimension of observed tissue will have relevance in diagnosing (particularly, they work with breast cancer images, but their approach has wider application).It is known that medical images are "no reference model", i.e. they suffer from noise, that can not be objectively detected or measured.Reiss et al. in [12] found that the noise has significant effect on few commonly applied methods for computing the fractal dimension.
All of the authors cited in the last paragraph note different advantages and disadvantages in the process of calculating the fractal dimension, which they propose to be taken into consideration in order to avoid misreading of the results.

Theoretical grounds
When we think of fractals, we mainly think on "broken, irregular, complex, fragmented, grainy, ramified, strange, tangled and wrinkled shapes" ( [13]), such as clouds, coastlines, edgy rocks, bushes, river basins, blood vessels, or lungs are.The theoretical definition of fractals can be met in many forms, but it seems like they are defined the best with the descriptive definition stated by Falconer in [14]: We refer to the subset of Թ ݊ as a fractal if: • it has a fine structure, noticed even on arbitrarily small scales, • it is too irregular to be described in traditional geometric language, both locally and globally, • it often has some form of self-similarity, rigorous or approximate, • its "fractal dimension" (defined in some way) is greater than its topological dimension, • in most of the cases, it is defined in a very simple way, perhaps recursively.
Relating to the fourth item of the last definition, we will define dimensions mostly used to characterize fractals.

}ܣ‬ is called the Hausdorff dimension (or Hausdorff-Besicovitch dimension) of the set A.
Although very satisfactory from theoretical point of view, in the sense that it satisfies all requirements from the pure mathematical definition of dimension, the Hausdorff dimension is almost useless for practical computational purposes.

Definition 2 ([15], p. 174) Let A ‫א‬ (Թ ݉ ) and let ‫,ܣ(ܰ‬ ߝ) denote the smallest number of closed balls of radius ߝ > 0 needed to cover the set
When the existence of the fractal dimension is ensured, it can be obtained if instead of balls, boxes of side length ߝ ݅ = 1 2 ݅ , ݅ ‫א‬ Գ are used.In such case, the fractal dimension is commonly called box-counting fractal dimension and it can be obtained by the formula where ‫,ܣ(ܰ(‬ ݊)) is the number of boxes with side-length 1/2 ݊ that have nonempty intersection with A. Due to the limitation of the box-size with the size of the pixel, in practice, the fractal dimension is obtained when finite number of points (ln 2 ݅ , ln ‫,ܣ(ܰ‬ ݅)) are fitted with a line, whose slope is then taken as approximation of the fractal dimension.This computational method is commonly known as basic box-counting method for the computation of the fractal dimension and it is mostly embedded in the software tools which estimate the fractal dimension.
HarFA (Harmonic and Fractal Image Analyser) is a software used to perform harmonic, wavelet and fractal analysis of digitized, especially biomedical images ( [17]).It computes three fractal dimensions by using variations of traditional basic box counting method: DB, DBW, DW, which characterize properties of black plane DB, black-white border of black object DBW and properties of white background DW, respectively.The best result for the fractal dimension of the Sierpinski triangle, as our benchmark, was 1.5777, and it was obtained for values of the parameters of mesh varying from 4 = 2 2 (minimum size of mesh square) to 512 = 2 9 (maximum size of mesh square) and the number of steps between this values set to 10.The absolute percent error of this estimation is 0.73%.
FracLac is image analysis software developed as a plugin for ImageJ, which evolved to a suite of fractal analysis and morphology functions.The basic box counting algorithm, which is used for estimation of the fractal dimensions of images, was originally modified from ImageJ's box counting algorithm.FracLac is suitable to work with known fractals, as well as images of biological cells and other biological structures, including branching structures and textures.FracLac works on binary images (detects only black pixels on a white background, or white pixels on a black background), and on gray-scale images or grayscale images that have been converted to RGB.Using the Image Type option -Autoconvert to Binary, we can automatically threshold images to binary.We have used 4 grid positions and two different method for scaling: Power series and Block series.Benchmark testing with FracLac (Sierpinski triangle) gave D = 1.5640 for the method Power series and D = 1.5959 for Block series.The absolute percent errors of these estimations are 1-5%.
Fractalyse is an easy to use software, which is used to estimate the fractal dimension of black and white images, curves and networks.It works with black and white images in TIFF or BMP file formats.Two modules (counting and estimation) were used in the process of estimation of the fractal dimension using box counting method.The counting module offers an opportunity to choose box size (exponential or linear), and the type of the algorithm (grid or free box).The best estimated value for the fractal dimension of the Sierpinski triangle, as our benchmark testing, was D = 1.5290 obtained when using the exponential box size and grid algorithm.The absolute percent error of this estimation is 5%.
Fractal Count is another plugin for ImageJ, used for the estimation of the fractal dimension of the 2D and 3D binary images.The estimated values for the fractal dimension were obtained using the default values for the parameters.For the Sierpinski triangle, as our benchmark testing, the estimated value was D = 1.5504, which has absolute percent error of 3,5%.
Fractal analysis system for Windows is a free software developed to estimate the fractal dimensions of bitmap (bmp) images.The fractal dimension can be estimated on the entire image or on area of interest.The estimated value for the Sierpinski triangle was 1.5138, which is a result with 7% absolute error.
After establishing and configuring the software tools, we considered a set of 100 biomedical images of melanoma and non-melanoma moles, most of them obtained with the kind allowance of the first author of [18]- [21].The images (out of which 30 are invasive malignant melanoma and 70 benign) are obtained from the EDRA Interactive Atlas of Dermoscopy and the dermatology practices of Dr. Ashfaq Marghoob (New York, NY), Dr. Harold Rabinovitz (Plantation, FL), and Dr. Scott Menzies (Sydney, Australia).These are 24-bit RGB color images with dimensions ranging from 577 × 391 pixels to 2556 × 1693 pixels.
The process of extracting the edge of the moles was mainly consisted of two parts: 1. Applying a thresholding algorithm which results in a black and white image, where the region of interest (the mole itself) is black, on a white background (the normal skin), 2. Cropping the pixels positioned on the edge between the black and white parts.ImageJ as a suitable, widely used tool for manipulating images, has proven to be useful in our research as well.By default, ImageJ offers 17 threshold algorithms.To make sure they are all given a chance in a reasonable effort, an ImageJ Macro script was written and put in use (available on https://gist.github.com/9bdd6a6a2fb9fbef459d).These are the steps that were automatized: • Open the mole image; • Conversion to 8bit (gray-scale); • Select and apply thresholding algorithm; • Invert colors; • Manual selection of the region of interest using Wand Tool; • Run the Outline tool to get the area of interest outline; • Finally, save the result for further calculation of the fractal dimension.
After this process was completed, we obtained 1700 = 17 × 100 one pixel wide edges ready for the calculation of the fractal dimension.By visual observation, we have

Results and discussion
As said in the introduction, we were expecting to obtain the results which will discriminate between the melanoma and non-melanoma moles and later to choose the thresholding algorithm and the software tool for estimating fractal dimension which will give the best differentiation.Compared to many existing thresholding algorithms which result in smooth contours, our four chosen algorithms were producing pretty natural, fractal contours (see figures 2-5, 7-10).Figure 1 shows the original image of one randomly chosen melanoma mole and figures 2-5 show the four contours of this mole obtained by the chosen thresholding algorithms.for the values of fractal dimension, whilst the vertical is for the number of moles.The histograms, supported by the table 1 of means and standard deviation of the fractal dimensions of melanoma and non-melanoma moles, show that there is no good differentiation between melanoma and non-melanoma moles.Taking into consideration that there are many existing algorithms for extracting contour and many methods for estimating the fractal dimension (which contain many adjustable parameters), we might say that the results for the fractal dimension of the contours of images might be arbitrary and the classification non-accurate.We note that we are aware that what dermatologist understand as irregular border might be very different of what fractal analysts understand, i.e. melanoma moles might not be characterized by higher fractal dimension.Moreover, the dermatologists are not very sensitive on the exactness of the contour-line or contour thickness.Is it possible at all to choose the optimal contour-line?

Conclusion
As it is noted ( [22]), medical images typically suffer from at least one of the following deficiencies: low resolution, high level of noise, low contrast, geometric deformations, presence of imaging artifacts.Highly trained technicians and clinicians could bring these influences to a minimum.Additionally, in recent years there are lot of improvements in hardware, acquisition methods, signal processing techniques and mathematical methods.However, different papers show (see Section 2) that the fractal dimension depends on the following factors: • the pixelization of the images, • the resolution of the images, • the edge-detection algorithm used, • the scale at which the object is considered, • the noise in the images, • the thresholding algorithm, and • the estimator used.
In our paper we give additional value to the last two factors, thresholding algorithm and the estimator used.We also try to highlight the struggle that occurs if well defined mathematical theory should be put in use.When the precisely, asymptotically defined scalar, as fractal dimension is, should characterize images dependent on many factors and limitations, many ambiguities happen.Deeper understanding of all positive and negative sides of the instruments of the fractal analysis, both from theoretical and practical aspects, is of crucial importance.Although in the papers considered in the Section 2, the authors give suggestions for the improvement of particular steps of the fractal analysis, there is a lot of randomness, arbitrariness, relativeness, beneficial and non-beneficial coincidences, that we suspect might yield to non-reliable results in practical applications.

DOI: 10
4 × 100 contour-lines appropriate for further investigation, obtained by the four ImageJ threshold algorithms: Default, Huang, Intermodes and Minimum.

Figure 1 .
Figure 1.Original image of a melanoma mole.

Figure 2 .
Figure 2. Contour of the mole from the Figure 1 obtained by the Default thresholding algorithm.

Figure 6
Figure 6 presents the original image of a randomly chosen non-melanoma mole, while figures 7-10 show the extracted outlines by Default, Huang, Intermodes and Minimum thresholding algorithm, respectively.The distributions of the fractal dimensions of the contours extracted by the Default thresholding algorithm and computed by Harfa, Fraclac, Fractalyse, Fractal Count and Fractal Analysis System, are presented by the histograms given on Figures 11-15.The horizontal axis is

Figure 3 .
Figure 3. Contour of the mole from the Figure 1 obtained by the Huang thresholding algorithm.

Figure 4 .
Figure 4. Contour of the mole from the Figure 1 obtained by the Intermodes thresholding algorithm.

Figure 5 .
Figure 5. Contour of the mole from the Figure 1 obtained by the Minimum thresholding algorithm It can be noted that, except in the FracLac case, the means of the fractal dimensions of melanoma moles are less than the appropriate means of the fractal dimensions of non-melanoma moles!Even in the FracLac case, if we consider the modes of the fractal dimensions, we wouldn't obtain satisfactory results.The values of the

Figure 6 .
Figure 6.Original image of a non-melanoma mole.

Figure 7 .
Figure 7. Contour of the mole from the Figure 6 obtained by the Default thresholding algorithm.

Figure 8 .
Figure 8. Contour of the mole from the Figure 6 obtained by the Huang thresholding algorithm.Having in mind the obtained results and the accuracy of FracLac in estimating the fractal dimensions of artificial fractals previously considered ([16]), we decided to make another comparative analysis: to compute by FracLac the fractal dimensions of the contours obtained by the four different thresholding algorithms.The resulting fractal

Figure 9 .
Figure 9. Contour of the mole from the Figure 6 obtained by the Intermodes thresholding algorithm.

Figure 10 .
Figure 10.Contour of the mole from the Figure 6 obtained by the Minimum thresholding algorithm.

Figure 11 .
Figure 11.Histogram of the estimated fractal dimensions by Harfa, for outlines obtained by the Default thresholding algorithm.Figures 16-18 show the histograms for the results obtained when the other three thresholding algorithms are employed, Huang, Intermodes and Minimum, respectively.The results for means and standard deviations of the fractal dimensions of melanoma and non-melanoma moles obtained with the last computations are resumed inTable 2. No new or different conclusion than previously stated.

Figure 12 .
Figure 12.Histogram of the estimated fractal dimensions by FracLac, for contours obtained by the Default thresholding algorithm.

Figure 13 .
Figure 13.Histogram of the estimated fractal dimensions by Fractalyse, for contours obtained by the Default thresholding algorithm

Figure 14 .
Figure 14.Histogram of the estimated fractal dimensions by Fractal Count, for contours obtained by the Default thresholding algorithm.

Figure 15 .
Figure 15.Histogram of the estimated fractal dimensions by Fractal Analysis System, for contours obtained by the Default thresholding algorithm.

Figure 16 .
Figure 16.Histogram of computed fractal dimensions by FracLac, for contours obtained by the Huang thresholding algorithm.

Figure 17 .
Figure 17.Histogram of computed fractal dimensions by FracLac, for contours obtained by the Intermodes thresholding algorithm.

Figure 18 .
Figure 18.Histogram of computed fractal dimensions by FracLac, for contours obtained by the Minimum thresholding algorithm.

Table 2 .
No new or different conclusion than previously stated.

Table 1 .
Table of means and standard deviations of the fractal dimensions of borderlines of melanoma and non-melanoma moles (thresholded by the Default thresholding algorithm), computed by different software tools

Table 2 .
Table of means and standard deviations of the fractal dimensions of borderlines of melanoma and non-melanoma moles, thresholded by the Default, Intermodes, Huang and Minimum thresholding algorithm, computed by FracLac