Quantification of echodensities in tuberculous pericardial effusion using fractal geometry: a proof of concept study

Background The purpose of this study was to quantify the heterogeneous distribution of echodensities in the pericardial fluid of patients with tuberculous pericarditis using echocardiography and fractal analysis, and to determine whether there were differences in the fractal dimensions of effusive-constrictive and effusive non-constrictive disease. Methods We used fractal geometry to quantify the echocardiographic densities in patients who were enrolled in the Investigation of the Management of Pericarditis in Africa (IMPI Africa) Registry. Sub-costal and four chamber images were included in the analysis if a minimum of two clearly identified fibrin strands were present and the quality of the images were of a standard which allowed for accurate measurement of the fractal dimension. The fractal dimension was calculated as follows: Df = limlog N(s)/[log (l/s)], where Df is the box counting fractal dimension of the fibrin strand, s is the side length of the box and N(s) is the smallest number of boxes of side length s to cover the outline of the object being measured. We compared the fractal dimension of echocardiographic findings in patients with effusive constrictive pericarditis to effusive non-constrictive pericardial effusion using the non-parametric Mann–Whitney test. Results Of the 14 echocardiographs from 14 participants that were selected for the study, 42.8% (6/14) of images were subcostal views while 57.1% (8/14) were 4-chamber views. Eight of the patients had tuberculous effusive constrictive pericarditis while 6 had tuberculous effusive non-constrictive pericarditis. The mean fractal dimension Df was 1.325 with a standard deviation (SD) of 0.146. The measured fibrin strand dimension exceeded the topological dimension in all the images over the entire range of grid scales with a correlation coefficient (r2) greater than 0.8 in the majority. The fractal dimension of echodensities was 1.359 ± 0.199 in effusive constrictive pericarditis compared to 1.330 ± 0.166 in effusive non-constrictive pericarditis (p = 0.595). Conclusions The echocardiographic densities in tuberculous pericardial effusion have a fractal geometrical dimension which is similar in pure effusive and effusive constrictive disease.


Background
Echocardiography is used extensively in patients with pericarditis to identify pericardial effusion, and to look for evidence of cardiac tamponade and constriction [1] It has been proposed that the presence of band-like intrapericardial echocardiographic changes may indicate effusive-constrictive pericarditis [2]. There has also been an attempt to use qualitative changes in echocardiographic densities to diagnose tuberculous pericarditis and to distinguish tuberculous pericarditis from other causes of pericardial disease. Many of the common qualitative descriptions of echo densities found in pericardial effusions include such terms as "fronds", "snow", and "strands" [3,4] (Figure 1). These descriptions are subjective, culturally confined, mathematically ambiguous, and are of limited diagnostic value. It is possible that quantitative descriptions of pericardial abnormalities, which have a validated reproducible mathematical method as their basis for their quantification, may overcome these qualitative limitations. Here, we describe a fractal geometry based method to quantify pericardial echo-densities [5]. We applied this method to pericardial tuberculosis, a common problem in Africa, as an example of how this method may be applied to enhance echocardiography based diagnosis.
Pericardial tuberculosis (TB) is a chronic fibrinous pericarditis characterized by granulomatous inflammation and caseous necrosis [6]. Despite being the most common cause of inflammatory pericarditis in the developing world, a non-invasive method of establishing the diagnosis remains elusive, contributing to the high morbidity and mortality associated with the condition [6][7][8].
As far back as 1893, Sir William Osler reported the presence of "sero-fibrinous exudation with thick fibrin in ridges" resembling "long villous extensions" at autopsy [9]. The echocardiographic equivalent of these pathological findings are fronds-like fibrin strands and the evocatively termed "shaggy coating" of the pericardium [10][11][12]. The use of 2D echocardiography detected fronds-like fibrin strands as a diagnostic guide for TB pericarditis has been limited by the poor specificity of qualitative methods used in these studies [3,[12][13][14].
The fractal dimension is a measure of the space filling properties of a naturally occurring object [15,16]. Fractal analysis is a method for quantifying naturally occurring objects that are irregular, rough and which cannot be characterized using Euclidean geometry axioms [15,16]. In Euclidean geometry, a point has a dimension of 0, a straight line has a dimension of 1, and a regular planar figure such as a square has a dimension of 2. On the other hand, most pericardial abnormalities detected by echocardiography are irregular and complex and not mere points, straight lines or planar figures. The fractal analytic approach has been used in other settings to quantify the "roughness" or "ruggedness" of objects such as rivers, coasts of seas, leaf veins, the heterogeneity of blood flow, and the clearance of drugs [15,[17][18][19]. This has led to the calculation of dimensions that exceeded the Euclidean topological dimension. In this proof of concept study we have used fractal analysis as a method to quantify pericardial echocardiographic densities in tuberculous pericarditis. We hypothesized that tuberculosis related fibrin strands are associated with a specific reproducible fractal dimension that was measurable using a simple box counting method. In addition, we investigated if the fractal dimension could be used to differentiate patients with tuberculous effusive constrictive pericarditis from those with tuberculous effusive non-constrictive pericarditis, in which case the fractal dimension may reflect progression from a pure effusive state to an early stage of constrictive pericarditis, in addition to etiology.

Patient selection
This is a sub-study of the Investigation of Management of Pericarditis in Africa (IMPI Africa) prospective registry of patients with tuberculous pericarditis [20]. The Human Research Ethics Committee at the University of Cape Town approved the study (HREC REF: 102/2003). The patients were referred from four community hospitals of Cape Town to Groote Schuur Hospital for investigation of suspected tuberculous pericarditis by means of a diagnostic or therapeutic pericardiocentesis. Consenting adult patients were included if they had all of the following: an echocardiographically confirmed moderate or large effusion [13,21]; evidence of tuberculous etiology; and complete hemodynamic data from a right heart study and intra-pericardial pressure measurements performed pre-and post-pericardiocentesis. The exclusion criteria were evidence of pre-existing structural heart disease, pregnancy and age under eighteen.

Echocardiography
Prior to pericardiocentesis all patients were evaluated by 2D echocardiography (GE Vivid i portable machine with 5.0 MHz phased-array transducer) Sub-costal and four chamber views were preselected as being optimal for fibrin strand analysis following an internal pilot study to assess the impact of the views on the fractal dimension. In the pilot study there was no significant or systematic difference in the fractal dimensions obtained by using either of these views. Echocardiographic images were included in the analysis if a minimum of two clearly identified fibrin strands were present and the quality of the images were of a standard which allowed for accurate measurement of the fractal dimension. The image with the highest quality and clearest definition was chosen for each patient. After selection of the best quality image it was saved five times in a tagged image file format (TIFF). For this proof of concept fractal dimension study the first 14 participants with echocardiographs that allowed for adequate fractal analysis were selected.

Diagnosis of tuberculosis and effusive-constrictive pericarditis
The etiology was accepted as tuberculous if the pericardial fluid was an inflammatory exudate with: a) direct microbiological evidence as indicated by positive microscopy, culture or polymerase chain reaction based assay for Mycobacterium tuberculosis; or b) either an interferon gamma IFN-γ>50 pg/L or an adenosine deaminase (ADA) >40 IU in pericardial fluid [7]. Criteria for a diagnosis of effusive constrictive pericarditis included failure of the right atrial pressure to fall below 10 mmHg or by 50% after the intra-pericardial pressure had normalized [22].

Fractal dimension calculation and statistical analysis
Each digital photograph was exported as encapsulated postscripts into the Microsoft PowerPoint program. Five grids of cells (boxes) of side length 2 s, s, s/2, s/4, s/8 and s/16, where s = 7 mm, (or series s/2 m , where m is a an integer) were created using Adobe Illustrator version CS4. Each grid was imported into PowerPoint and embedded within the five separate images so that there were 15 identical images of the same size that had five embedded grids of descending cell size for each original image. The number of boxes N inside which at least one point was covered by some component of the identified fibrin strands was then counted manually by a one author (MN) and recounted by a second author (TG) for quality control. The fractal dimension was calculated as follows [5,15]: Where D f is the box counting fractal dimension of the fibrin strand, s is the side length of the box and N(s) is the smallest number of boxes of side length s to cover the outline of the object being measured. Because the limit zero cannot be applied to natural objects, the dimension was calculated by: Where d is the slope of the graph of logarithm [log] (N(s)) against log (l/s).
The fractal dimension was measured five times for each fibrin strand-containing image. For some of the images, no additional information was gained by increasing the box size beyond 7 mm 2 , i.e., as s increased the log of s remained constant. Log-log graphs of the side of the length of the square cells within each grid were plotted against the number of cells.
Linear regression of the log-log function was then utilized to calculate the slope. The dimension was calculated as "1 + slope." The correlation coefficient (r 2 ) for the linear regression was also calculated. A second method was used to check the validity of the method, for box sizes where m ≥ 1 in the series s/2 m . In this method, the fractal dimension was calculated as = (log [number of boxes for s/2 m+1 /number of boxes for s/2 m ])/ log 2. An average was calculated for each successive pair of boxes. The Hausodorff-Bescovitch (fractal) dimension calculated based on each these two methods had to be identical. We compared the fractal dimension of echocardiographic findings in patients with effusive constrictive pericarditis to effusive non-constrictive pericardial effusion using the non-parametric Mann-Whitney test.

Results
Of the echocardiographs acquired from the 14 participants 14 images were deemed to be of high enough clarity and quantity for use in the study. 42.8% (6/14) of the images were from the subcostal view and 57.1% (8/14) were from the 4 chamber view. Eight of the patients had tuberculous effusive constrictive pericarditis while 6 had tuberculous effusive non-constrictive pericarditis. The clinical characteristics of the 14 participants are shown in Table 1. All 14 participants were Africans with a median age of 31 (Interquartile range 28-34) years. Six of them (42.8%) were women and 10 (71.4%) were HIV infected. None of these demographic variables differed significantly between patients with and without tuberculous effusive constrictive pericarditis and only the clinical features that define the effusive constrictive phenotype differed between the two groups.
The fractal dimensions calculated for each of the 14 patients are shown in Table 2. The mean fractal dimension D f was 1.325 with a standard deviation (SD) of 0.146. The measured fibrin strand dimension exceeded the topological dimension in all the images over the entire range of grid scales with a correlation coefficient (r 2 ) greater than 0.8 in the majority ( Table 1). The definition of fractal is a set in which the Hausdoff-Bescovitch dimension exceeds the topological dimension. In this case, in all patients, Df exceeded the topological dimension of a line, which is 1. The fractal dimension was 1.359 ± 0.199 in effusive constrictive pericarditis compared to 1.33 ± 0.166 in effusive non-constrictive pericarditis (p = 1.00) (Figure 2). Thus the fractal dimensions were similar in both syndromes of tuberculous pericarditis.

Discussion
To the best of our knowledge, we report the first study in which simple and reproducible steps have been applied to quantify the fractal dimension of echocardiographic pericardial effusion. This experiment extends the use of fractal geometry and fractal dimensions to Table 1 Clinical characteristics of the participants who were included in the study   pericardial disease and specifically tuberculous pericarditis. We have demonstrated in this small study that fibrin strands like many naturally occurring objects are a fractal structure and are therefore quantifiable by fractal geometry and dimensions.
Since the recognition that fibrinous pericarditis is associated with various echogenic abnormalities on 2D echocardiography [11], there have been multiple attempts to describe, quantify and utilize these echo abnormalities diagnostically [3,[23][24][25] These attempts have been limited to qualitative descriptive methods. However in the natural sciences, particularly anatomy and pharmacology, the usefulness of fractal geometry in quantifying and describing dimensions is well established [26,27]. Examples include the use of fractal dimension in the description of of neurones [28], motor nerve terminals [29,30], colonies of bacteria [31], the patterns of the cerebral cortex, [32] and antibiotic clearance from patients [19].
We were however unable to demonstrate that the fibrin strand fractal dimension could be used to distinguish effusive constrictive pericarditis from effusive nonconstrictive pericarditis. There are however a number of limitations of this study which suggest that this latter result was not unexpected. The first and most important reason is the small number of quality images of the pericardium available to adequately compare the phenotypes. Given the dynamic fluid nature of the fibrin strands and the difficulty capturing adequate still images, future studies addressing this issue will have to consider acquiring more images, with longer cine loops and should consider integrating many more views than the two used in this study.
The fractal dimension of 1.325 for tuberculous pericardial effusion is in itself as interesting as it is famous; it is the fractal dimension of the Apollonian gasket or Leibniz packing [33]. This strongly suggests that the echodensities seen in tuberculous pericarditis are a generalization of inversion transformation, and likely a result of simple iterative process. While this does not reveal the identity of the pathophysiologic process that leads to this lesion, it gives a hint at the mathematical models that can be used to describe the process. We speculate that the fractal dimensions will therefore correspond to specific iterative or repetitive processes, each one linked to specific etiological processes. This study, which has established the fractal dimension of chronic pericarditis, thus lays the basis for a comparative study of the fractal dimension of pericarditis due to different causes such as malignancy and autoimmune disease.

Conclusion
These results demonstrate that the measured fractal dimension of fibrin strands exceeds the Euclidian geometrical dimension over the entire range of grid scales used. This fulfills the mathematical definition of a fractal structure. It is therefore appropriate to conclude that fractal dimension is the most useful and reproducible tool to quantify this naturally occurring echogenic material in patients with tuberculous pericardial effusion. This proof of principle study opens the possibility for measuring the fractal dimension of other forms of pericarditis, and possibly lay the basis for quantitative definition of different forms of pericarditis using echocardiography.