{'fraction_non_alphanumeric': 0.02834553703786892, 'fraction_numerical': 0.012712816135842953, 'mean_word_length': 5.211495535714286, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Automated Method for the Quantification and Fractal Analysis of Immunostaining

Aims. In tissue counter analysis (TCA) digital images of complex histologic sections are dissected into elements of equal size and shape, and digital information comprising grey level, colour and texture features is calculated for each element. In this study we assessed the feasibility of TCA for the quantitative description of amount and also of distribution of immunostained material. Methods. In a first step, our system was trained for differentiating between background and tissue on the one hand and between immunopositive and so‐called other tissue on the other. In a second step, immunostained slides were automatically screened and the procedure was tested for the quantitative description of amount of cytokeratin (CK) and leukocyte common antigen (LCA) immunopositive structures. Additionally, fractal analysis was applied to all cases describing the architectural distribution of immunostained material. Results. The procedure yielded reproducible assessments of the relative amounts of immunopositive tissue components when the number and percentage of CK and LCA stained structures was assessed. Furthermore, a reliable classification of immunopositive patterns was found by means of fractal dimensionality. Conclusions. Tissue counter analysis combined with classification trees and fractal analysis is a fully automated and reproducible approach for the quantitative description in immunohistology.


Introduction
There is a growing trend towards the objective quantification of immunohistochemical staining. Many studies dealing with automated quantification in immunohistochemistry show quite successful results in discriminating immunostained regions using dynamic threshold operations, color based classifiers or pixelwise measurements [4,10,12,13]. However, fully automated discrimination of immunostained particles is a complex task, and semi-automated or even interactive measurements have to be performed [5,11]. Since structures in histologic sections are usually arranged in a complex pattern, simple threshold operations are often not sufficient for practical application in auto-mated immunohistochemical analysis, though they are applied [18]. Consequently, interactive tracing of structures of interest has to be performed by the operator. This is subject to intra-and inter-personal variation and time-consuming user interaction is usually necessary. In contrast to conventional systems, tissue counter analysis (TCA), a recently developed and validated procedure, overcomes these problems since digital information is gathered from a series of tissue elements and significant measuring features are automatically selected by statistical approaches [14,15]. By the method, a grid of measuring masks (elements) of equal size and shape is placed over histologic sections and the digital content of each element is automatically evaluated ( Table 1). During a learning phase, digital information of each element comprising grey value, colour and texture features is stored together with the interactive user classification (e.g., background, immunopositive tissue elements, "other" tissue elements). Based on pooled data obtained from these learning sets, one can grow a decision tree separating the various classes of elements. Once such a classification procedure is established, it can be implemented into an image analysis system and used for fully automated, user independent classification of tissue elements [16]. As described in previous studies, TCA serves as a potential tool in automated image analysis and works independently of the image source, since experiments not only at light and epiluminescence microscopic levels but also at the macroscopic level were equally successful [6][7][8]. In this study we tested our method on immunostained histologic sections of normal skin with antibodies against cytokeratin (CK) and leukocyte common antigen (LCA). At first, our system was trained for differentiating between background and tissue elements on one hand and between immunostained tissue and so-called other tissue elements on the other. In a second step, slides were automatically screened and the procedure was tested for the quantitative description of immunohistochemically stained structures. Additionally, fractal analysis using the box-counting method was applied to all cases describing the architectural distribution of immunostained material.
For fractal analysis, each tissue element labeled as positive in the TCA procedure was reduced to one pixel in a de-magnified binary image. Each of these pixels was regarded as a "point" from a geometric point of view, yielding a dimensionality of 0. Thus, a continuous line of positive pixels would represent a line with a dimensionality of 1, and a cluster of positive pixels would comprise an area with a dimensionality of 2. With the box counting method [1], arrangements of positive pixels at various scales are evaluated and a fractal dimensionality is estimated, which would be close to 0 when there is a dissemination of widely spaced single pixels, and close to 2, when large positive areas prevail.

Specimens
The specimens were randomly sampled from the Dermatopathology files of the Department of Dermatology, University of Graz, Austria. In total, 20 samples of clinically normal appearing skin taken from the uninvolved part of excision biopsies of melanocytic nevi were used. All biopsies were routinely formalin-fixed, embedded in paraffin and cut at a section thickness of 4 µm.

Immunohistochemistry
Highly sensitive immunohistochemistry was performed with an automated immunostainer (Horizon, DAKO A/S, Glostrup, Denmark) using an indirect streptavidin-biotin method following the standardized MSIPE-protocol of the provider (DAKO). Two different primary antibodies were applied: Mouse Anti-Human Cytokeratin against CK (clone MNF116, 1 : 25, DAKO) and Mouse Anti-Human CD45 against LCA (clone 2B11 + PD7/26, 1 : 50, DAKO). In brief, in nor-mal tissue the CK antibody shows a broad pattern of reactivity with human epithelial tissues from simple glandular to stratified squamous epithelium, including epidermis, eccrine sweat glands, mammary gland ducts, tracheal epithelium and amniotic epithelium, whereas the LCA antibody labels lymphoid cells and to a variable degree macrophages and histiocytes. In each case, one section served as negative control by omission of the primary antibody.

Equipment and settings
Digital images were taken using an Axioskop 2 bright field microscope with a scanning table (Zeiss, Oberkochen, Germany) mounted with a CCD threechip color video camera (Sony, Tokyo, Japan) connected to a KS 400 3.0 image analysis unit (Zeiss Vision, Hallbergmoos, Germany; [3]). A 20× objective was used with an image size of 764×573 pixels, yielding a pixel size of 0.65 µm. For each slide a white reference image was taken and smoothed with a 10 × 10 average filter. Illumination was set according to Köhler's principle and kept constant during the study. Image brightness and colour temperature were kept constant, with colour temperature being automatically adjusted to 3200 K by the Axioplan imaging software. Adjustment for brightness was performed with a set of neutral filters inserted into the illuminated beam. For each image, additive shading correction was performed.

Tissue counter analysis
In each slide, a measuring region was defined which included a whole section. For this purpose, the observer defines two points outside the lesion from which a rectangle is calculated serving as a border for further measuring procedures. When learning sets for background and tissue separation were created, in each histologic section random digits automatically selected 5 fields, and a lattice of 108 (12 × 9) measuring masks each was used for measurement within the images of 764×573 pixel size (Fig. 1). 20 instead of 5 fields using an identical grid of 108 masks were randomly selected when datasets differentiating immunopositive tissue and so-called other tissue elements were sampled. In the automated procedure, however, the whole measuring region was scanned and each field of vision was evaluated by a grid of 300 (20 × 15) measuring masks ( Fig. 2A,B). The individual square measuring masks were of 32 × 32 pixels size. An image part covered by a measuring mask is called an element. For each element, 70 measuring parameters including grey level features, colour features and Haralick texture features were automatically assessed (Table 1; [3,9]). In learning procedures each element was interactively classified as belonging to background, immunopositive tissue or "other" tissue and classifications were stored together with the digital features into the SPSS-file for- mat. On these learning sets, classification and regression tree (CART) analysis was performed in order to obtain split-criteria (rules) for differentiating particular classes. In automated measuring procedures, the features measured in each element were tested for fulfilling certain rules. Based on these rules, the particular element was automatically assigned to a particular class.

CART
In our study we used the CART 4.0 software (Classification and Regression Tree; Salford Systems, San Diego, USA). CART is a decision-tree tool for data mining, predictive modeling and data preprocessing. The software automatically searches for important pattern and relationships even in highly complex data us-ing the original CART code [2,17]. In the search for pattern in databases it is essential to avoid the trap of "over-fitting", or finding patterns that apply only to the training data. In CART, however, test disciplines are embedded, which ensure that the patterns found will hold up when applied to new data. For this purpose a total of 10 trees based on independent subsets of the learning sample are created. For each tree, CART begins by growing the maximal tree possible and then prunes those sections of the tree that contribute least to overall accuracy, pruning all the way back to the root node. A root node is the first node in a decision tree containing also the first split criterion, which leads to two daughter nodes. If the nodes cannot be divided anymore, they are designated as terminal nodes. Only the tree that performs best on its subsample is used for further analysis.

Fractal geometry
In addition to the classical task of assessing the "amount" of positively stained material in immunohistological slides, the distribution of the material could be of interest. Therefore we developed a method based on tissue counter analysis which describes the distribution by means of fractal analysis. A binary image showing the immunostained material of the whole section was created. For this purpose, each measuring mask labeled as positive for immunohistology was demagnified to a single positive pixel. One pixel of this de-magnified image corresponds to 20.8 µm. The binary image was overlayed with a regularly meshed lattice of square boxes of decreasing size covering always the whole image, with minimum size of the boxes being identical to single pixels in the de-magnified image. The number of boxes containing at least one immunohistologically positive element was counted and this number plotted against the box width. From the steepness of the regression line after log/log transformation the fractal dimensionality can be calculated as described by Baish and Jain [1] (Fig. 3A,B; [1]).

Data sets
For the task of differentiating between background and tissue elements, 5 cases in each group (CK, LCA, negative controls) were measured and interactively classified as mentioned above resulting in a learning set of 8100 elements (3287 background and 4813 tissue elements). CART analysis of the learning set provided a decision tree, which was used for the exclu- sion of background elements in further analysis. When only tissue elements were shown to the operator, 10 randomly selected cases in each group were evaluated. This time, the observer classified all elements as belonging to CK or LCA immunopositive tissue on one hand, or "other" tissue components on the other. Tissue elements derived from the negative controls were pooled either with tissue elements obtained from the CK stained slides (889 CK immunopositive and 27107 "other" tissue elements; overall 27996) or LCA stained slides (367 LCA immunopositive and 29572 "other" tissue elements; overall 29939) resulting in a learning set for each antibody. Classification trees based on the datasets were used for collecting either CK immunopositive or LCA immunopositive elements when a whole section was measured in each case.

Statistics
Basic statistics (mean, standard deviation), comparison of mean values (t-test) and correlation coefficient (Pearson) were performed using the SPSS statistical software package (SPSS Inc., Sunnyvale, USA). A p value of less than 0.01 was considered to indicate statistical significance. CART analyses were performed using the CART V4.0 software (Salford Systems, San Diego, USA).

Classification of tissue elements
CART analysis of background versus tissue elements led to a correct classification of 98.0%. When the immunopositive components of the tissue elements were considered, CART analyses yielded to a correct classification of 97.0% of CK immunopositive elements and 88.9% of LCA immunopositive elements versus "other" tissue elements within the learning sets. Applied to the individual cases of immunostained slides using the generated decision trees, background elements were automatically excluded and only immunopositive (blue frames) and "other" tissue elements (grey frames) were shown to the operator and counted by the image analysis system when each field was measured ( Fig. 2A,B). For highlighting the immunopositive architecture of each antibody in contrast to "other" tissue, de-magnified images displaying a scanning view of the whole section were generated (Fig. 4A,B,C; Fig. 5A,B,C). Each pixel in Fig. 4B,C and 5B,C corresponds to a measuring mask (32 × 32 pixel) as shown in Figs 1 and 2A,B.
Since CART performs automated feature selection within the set of grey level, colour and texture parameters for classification purposes, only a subset was finally incorporated in the particular classification trees. For the task of differentiating between background and tissue, it turned out that CART considered only one colour parameter, namely ENTROPYG, as necessary for high performance classification. Describing immunopositive tissue, which in fact is a more complex task, CART required a subset of 6 grey level, colour and texture features (MEAND/grey,  SUMQD/grey ∧ 2, HARAM6, MEANDG/grey, SUMQB and MEANDB/grey) for CK and 6 colour and texture features (HARAM4, HARAM7, STDDG/grey, STDDB/ grey, MING and MINB) for LCA stained tissue classification (Table 1).

Quantitative description and fractal dimension
The relationship between the number and percentage of immunopositive elements, the number of tissue elements overall and the fractal dimension on the one hand and the type of antibody used on the other was evaluated. Within the set of immunostained cases no significant difference was found between the number of tissue elements in CK stained and LCA stained sections (p = 0.129). When the number and percentage of immunopositive elements were considered, 1979.4 ± 1536.0 (5.9 ± 5.2%) elements were found in CK stained sections in contrast to 283.7 ± 342.5 (1.0 ± 1.2%) elements in LCA stained sections. T -test of the number and percentage of immunopositive elements revealed a significant difference between both antibodies (p < 0.001; Fig. 6).
Evaluating the fractal geometry of each antibody, CK stained slides yielded a fractal dimension of 1.2 ± 0.1, whereas LCA stained slides produced a dimension of 0.4 ± 0.2 (p < 0.001; Fig. 7). This is in agreement with the biological distribution of the immunostained structures: Cytokeratins, as a component of epithelial cells, are limited to a certain anatomic compartment which appears as a broad linear structure in the tissue section. Leukocytes, in contrast, are often dispersed in the interstitial connective tissue, yielding individually spaced elements and small groups.

Reproducibility of CK and LCA counts
To test the reproducibility of our system, 10 cases (5 CK and 5 LCA) were measured twice at an interval of several weeks. Correlation between the measurements were r = 0.999 and r = 0.980 for the percentage and fractal dimension of immunopositive tissue elements and r = 1.00 for the number of the total of all tissue elements.

Time requirement
Depending on the size of the section, in particular the number of fields measured in each slide, automated measurements take 5 to 40 minutes. User interaction is limited to defining the corners of a rectangular measuring region which should include the whole histologic section. This task, however, takes about only 1 minute.

Discussion
We have described here an approach that allows fully automated quantification of immunohistology. Besides the amount of tissue of interest, which is most often the solely output of other methods, TCA and CART additionally enable description of the spatial distribution by means of fractal analysis.
By the method, digital images of tissue scenes are divided into elements of equal size and shape and features are calculated by extracting the digital information in each square element. In learning phases, thousands of elements have to be interactively classified by an operator as belonging to particular classes of tissue components. This task, however, has only been done once, since CART analysis, applied to the created learning sets, defines rules for classification of new elements. The software turned out to be a powerful and reliable classification tool so that we needed only one type of classification algorithm in the whole study. Arbitrary feature selection among the overall 70 measuring parameters provided by our image analysis software was not necessary, since CART independently performs the selection of significant measuring parameters. Within the whole set of features measured automatically by the KS 400 image analysis unit, it turned out that not only grey level and colour, but also texture features were selected by CART for classification procedures. By reproducing the interactive classifications, accuracy of about 90-100% was achieved by the algorithm.
In contrast to a conventional image analysis procedure based on single pixels, TCA shows the advantage that digital information not of individual pixels, but of a region can be taken into account. Therefore, not only the three grey values of the three colour channels can be taken into account, but also parameters concerning histogram moments and texture. By this approach, classification procedures can be based on a broader range of information than conventional pixel-by-pixel methods.
This fact is underlined by the findings obtained in the discrimination between tissue and background: Though a single parameter has turned out to be sufficient according to the CART procedure, it was not a simple grey value of a particular colour channel as it might have been found in pixel-by-pixel analysis, but the entropy of the green channel histogram.
Applied to whole slides of immunostained tissue scenes, our system detected automatically CK and LCA immunopositive tissue. User interaction was lim-ited by defining a rectangular measuring region including the whole histologic section. This task, however, takes about one minute. To evaluate the recognition process, immunopositive tissue elements were shown to the operator by blue frames and counted by the image analysis system. Classification results visualized on the computer screen were in good agreement with visual control by the observer. When the number and percentage of CK and LCA immunopositive tissue was statistically evaluated, high reproducibility of the amount of stained tissue resulted.
Besides amount of tissue, distribution may be important and may differ between various immunohistological structures. Since TCA already produces a pattern of "boxes", our approach seemed to be particularly suitable to the fractal analysis method described by Baish and Jain [1]. They previously used fractal geometry to consider the fractal dimension of vascular patterns in tumors. Applied to staining patterns in normal skin, we tested the method for describing the distribution of CK and LCA immunopositive elements. Compact areas for CK with small clusters of sweat glands showed a dimensionality between "line" and "area", i.e. between 1.0 and 2.0 whereas dissemination of inflammatory cells, individual cells and small clusters represents a dimensionality between "point" and "line", i.e. between 0.0 and 1.0. This rather low value of fractal dimensionality is due to the fact that in the de-magnified measurement images a small amount of positive material is de-magnified to a single pixel, and that single pixels are considered as "points" in terms of geometry. It turned out, that clear classification between CK and LCA patterns by means of fractal dimension can be achieved.
There are, however, several limitations to be addressed before tissue counter analysis can be proposed as a practical tool in routine immunohistochemical settings. All specimens have been prepared in the same laboratory with a standard staining protocol. Greater variations in the histotechnical procedure would definitely hamper the final results. Furthermore, the settings of the digital camera, microscope and image analysis unit had to be kept constant in order to avoid conflicting results.
In the future, tissue counter analysis (TCA) combined with classification and regression trees (CART) and fractal analysis will be tested on a wider selection of specimens and pathologic conditions. Especially, the significance of fractal dimensionality should be determined in further work.
In conclusion, our study shows that tissue counter analysis is a fully automated and reproducible ap-proach for the quantitative description of amount and also of distribution of immunopositive structures in immunohistology.