Detection, Isolation and Quantification of Myocardial Infarct with Four Different Histological Staining Techniques

Precise quantification of myocardial infarction is crucial for evaluating the therapeutic strategies. We developed a robust, color-based semi-automatic algorithm capable of infarct region detection, isolation and quantification with four different histological staining techniques, and the isolation and quantification of diffuse fibrosis in the heart. Our method is developed based on the color difference in the infarct and non-infarct regions after histological staining. Mouse cardiac tissues stained with Masson’s trichrome (MTS), hematoxylin and eosin (H&E), 2,3,5-Triphenyltetrazolium chloride and picrosirius red were included to demonstrate the performance of our method. We demonstrate that our algorithm can effectively identify and produce a clear visualization of infarct tissue for the four staining techniques. Notably, the infarct region on a H&E-stained tissue section can be clearly visualized after processing. The MATLAB-based program we developed holds promise in the infarct quantification. Additionally, our program can isolate and quantify the diffuse fibrotic elements from an MTS-stained cardiac section, which suggested the algorithm’s potential for evaluating pathological cardiac fibrosis in diseased cardiac tissues. In conclusion, we demonstrate that this color-based algorithm is capable of accurately identifying, isolating and quantifying cardiac infarct regions with different staining techniques, as well as the diffuse and patchy fibrosis in MTS-stained cardiac tissues.


Introduction
Myocardial infarction is one of the leading causes of cardiac death in the world 1,2 .The infarct size is highly associated with the incidence of cardiac arrest 3,4 .Therapeutic strategies have been developed to reduce the infarct size and prevent the incidence of cardiac arrhythmias [5][6][7][8] .Therefore, improving the accuracy of quantification of infarct region is imperative to assess the efficacy of such therapeutics.
Currently, manually tracing the infarct region with the aid of the image analysis software remains the conventional method to quantify the myocardial infarct size [9][10][11] .However, this hand-tracing method can pose challenges that may impact accuracy, cost and expediency associated with image analysis.Despite recent developments in algorithmbased methods, poor user-friendliness and a limited histological staining technique discretion hinder the potential use of such methods [12][13][14][15] .
Masson's trichrome (MTS) and picrosirius red (PSR), are most commonly used to detect and assess the post-myocardial infarction scar, which easily distinguishable as blue for MTS and red for PSR, relative to non-infarct region 16,17 .Given this distinct color difference, we aimed to develop an easy and effective algorithm to quantify the myocardial infarction with different histological staining techniques.
In comparison with MTS, PSR and 2,3,5-Triphenyl tetrazolium chloride (TTC) 6 , hematoxylin and eosin (H&E) is rarely used for infarction evaluation, sometimes used to understand the morphology of the infarct without isolating and quantifying the infarct region 18,19 .In this study, H&E staining was also included to investigate if the infarct region can be clearly identified and isolated with our algorithm.Additionally, we evaluated if our algorithm is capable of isolating and quantifying the diffuse fibrosis.

Methods
The investigation conforms to the Guide for the Care and Use of Laboratory Animals published by the US National Institutes of Health (NIH Publication No. 85 -23, revised     1996).All animal study protocols were approved by the Institutional Animal Care and Use Committee at the Virginia Polytechnic Institute and State University.

Pre-processing of stained tissues
All cardiac tissues used in this study were derived from mouse hearts stained with either MTS, H&E, PSR or TTC.: MTS and H&E-stained tissues were obtained from 8-12-weekold CD-1 mice that underwent the cryoinjury method which served as a model for myocardial infarction 8 .The cardiac tissues stained with TTC were obtained from 8-12week-old CD1 mouse hearts 24 hours after transient (30 minutes) ligation of the left anterior descending artery.Cardiac tissues stained with PSR were obtained from 8-12week-old CD1 mouse hearts seven days after transient (30 minutes) ligation of the left anterior descending artery.All tissue sections were scanned and stored as color digital images which consist of a combination of three primary colors; red, green and blue (RGB), and then employed to MATLAB software (MATLAB R2022b, MathWorks, Natick, MA) for image analysis.

Rationale
MTS is predominately used relative to other techniques for assessing myocardial infarction or fibrosis.With MTS, the infarct region is distinguishable by an apparent blue color relative to other non-infarct regions (Figure 1A, left).In the MATLAB program, we analyzed RGB color value proportions in both the infarct regions and non-infarct regions.
As represented in Figure 1A -left, the R value in an infarct region (41) were considerably smaller than that in non-infarct regions (251).Notably, this difference can be utilized to exclude non-infarct regions by removing pixel values that exceed a R value limit using a color threshold.In order to improve the isolation accuracy this mechanism, a ratio of B and R values was designed to support the extraction of normal tissues and any pixels that have very faint blue colors.As shown in the right image of Figure 1A, the blue infarct region was successfully isolated and non-infarct region was removed or greatly suppressed.
Isolating the infarct region after TTC staining was relatively simple as TTC stains normal tissues a deep red and renders the infarct region as an off-white color (Figure 1B, left).
The numeric quantities of R, G and B in the infarct region were comparable in value (133, 136 and 134, respectively), whereas the red value (187 vs 69 and 61) at the non-infarct region was dominant.Due to the similarity between the values for R, G and B at the infarct region, a standard deviation threshold was employed to separate both infarct and noninfarct tissue.Unscarred regions contained pixels with various color values, which produced high standard deviations.The contrast between high and low standard deviations within the color code of differing locations of the tissue produced a clear differentiation between infarcted and non-infarcted structures which gave rise to the successful isolation of the infarct region in TTC-stained sections (Figure 1B, right).
Similar to the distinct color difference between the infarct region and non-infarct region in TTC image, the infarct region in the PSR-stained section is stained as a dominant red color (240 vs 129 and 143) relative to the non-infarct region (204, 191 and 174, respectively) (Figure 1C, left).In order to improve the isolation accuracy, we designed a new color-based algorithm to extract the infarct: G and B represents green and blue values in a pixel, respectively; meanGB represents the mean value of G and B, and R represents the red value in a pixel.thd is a user-determined threshold for extracting the infarct.With the algorithms above, the infarct region can be successfully isolated from the normal tissue (Figure 1C, right).
To assess the algorithm's potential to identify and isolate infarct region in H&E-stained tissues, an H&E image was compared to an analogous MTS-stained tissue.The tissue section next to the section stained with MTS labeled "Original" (Figure 2A, left) was stained with H&E (Figure 2B, left).As shown in Figure 2B-left, it is challenging to visualize the infarct region in the original H&E stained tissue.However, one can roughly identify the infarct region by zooming in the image to recognize the difference in the muscle fiber.
After comparing RGB values between the infarct and non-infarct regions, it was observed that the value for green (174) in the infarct region is larger than that in the non-infarct region (99).However, it was not feasible to isolate the infarct region by utilizing the same color threshold as MTS images.Therefore, we designed two steps to reveal the infarct.
In the first step, a threshold was applied to remove large values of R, G or B in a pixel.If a R value was larger than the threshold, it would be converted to zero, but G and B values in this pixel don't change.With this threshold, the infarct is visualized with green color (Figure 2B, middle) and the normal tissues are changed to the light blue.In the second step, only green color indicating the infarct was extracted and any other colors were removed.Specifically, in a pixel, if R value or B value is smaller than G value, R and B values will be changed to zero.Eventually, the infarct region is clearly identified with mildly suppressed normal tissue regions (Figure 2B, right).Later, the large and dense green color in the infarct region can be masked for isolation and dilated for quantification, which will be described below.Overall, the comparison of highlighted infarcts after MTS and H&E could demonstrate that the algorithm could provide a clearer visualization of the infarct region with H&E staining.
Overall, our color-based algorithm systematically identify and isolate the infarct region from the non-infarct region regardless of staining techniques.Next, we developed a MATLAB-based user-friendly graphic program to isolate and quantify the infarct region.

Results
MATLAB has a powerful image processing toolbox, which was used to mask the infarct region and thereby quantify the infarct size.We here are developing a complete instruction regarding how to use our algorithm to analyze the infarct region.All necessary codes and instructions can be found in the supplemental materials.

Image splitting
Our program analyzes one image at a time.Since several tissue sections are normally placed and stained on a slide and then the entire slide may be scanned with a camera to a digital image (Figure 3A), a necessary step is required to split all section images.Here, we developed a simple MATLAB-based graphic interface named split_image_manual_5images to split them without altering the image resolution.This interface can split up to 5 single images (Figure 3B).The top and bottom of each image can be adjusted to make sure each sub-image can be split.After splitting, every single image will be saved in the local computer (Figure 3C) with a button.

Isolation and masking of infarct area in the section
We developed a MATLAB-based graphic program named scar_volume_analysis_ver2 to analyze the myocardial infarction in each image from those four different staining techniques.The related operational instruction can be found in the supplemental materials.Briefly, an image is loaded into the program with selecting the staining method from the MTS, H&E, TTC or PSR.The color threshold for detecting and isolating the infarct is specifically pre-defined for each staining technique, which can be adjusted by the user.The infarct region can be cropped for masking and quantification.With this program, the infarct region in each stained image can be detected, isolated and masked as shown in Figure 4. Notably, the infarct region in the H&E-stained tissue section can be detected and isolated clearly (Figure 4B).Subsequently, the isolated infarct can be dilated and masked with the white color for the quantification.Notably, artifacts, such as the bubble in the center of the TTC section (Figure 4C), can be removed during masking, which presents user-determined pre-processing opportunities for improving quantification accuracy.Furthermore, the entire tissue section can also be masked.After masking, the total number of pixels in the infarct and surrounding non-infarct tissue regions comprising the remainder of the sample, a percentage of the infarct region relative to the whole section, and also the images produced during this analysis can be saved for further analysis.

Quantitative analysis of infarct
For infarct area quantification analysis, this program supports two quantitative parameters: the percentage of infarct region relative to the entire section and the actual area of infarcted region.Mathematically, the percentage of infarct region relative to the entire section can be calculated as: = ℎ     ℎ   * 100 ℎ     ℎ   % The number of pixels in the infarct region and in the entire section are produced from the program scar_volume_analysis_ver2.
To calculate the actual infarct area, the pixel size after scanning the image with a microscope is required and can be found in the log.It is commonly assumed that the pixel is a square.With the known pixel size, the actual infarct area can be calculated as: =  *  * ℎ     ℎ   Px represents the pixel size.The area of the entire section can also be determined with the number of pixels in the entire section: We also provide instructions to quantify the infarct volume in the entire heart if it is required.To quantify the infarct volume in a heart, the entire heart must be sectioned and stained.The thickness of each section must be considered for the volume quantification.
To accelerate processing, tissues with a fixed thickness between sections may be removed and an assumption made that infarct area and section area in the removed tissue are equal to that in the adjacent section.To quantify the infarct volume, the infarct area in each section is calculated first, which has been described above.Then the infarct volume (Vs) in each section can be calculated as the infarct area (As) multiplied by the section height (h1).The assumed infarct volume in the removed section (Vrs) will be the infarct area (As) multiplied by the removed section height (h2).Once the infarct volumes in each section and removed section are acquired, the sum of the infarct volumes from all sections will be the infarct volume in a heart.The detailed mathematical equations can be found in Figure 5.This instruction is also applicable for quantifying the tissue volume of the entire heart.With this method, we quantified the volumes of the infarct and entire ventricle from a male CD-1 mouse heart suffering from cryoinjury-induced myocardial infarction 8 .Specifically, over 80 sections with a thickness of 5µm were stained with H&E and the thickness of the removed tissue between two adjacent sections is 10µm.After analysis, the volumes for the infarct region and entire ventricles were 11.15 mm 3 and 134.37 mm 3 , respectively.Therefore, the relative infarct volume in this heart is about 8.3% of the entire ventricles.Some representative in-series images with highlighted infarcts can be found in Figure 6.
Increased patchy and diffuse cardiac fibrosis is often associated with cardiac disease and aging 20,21 .The pattern of this type of fibrosis makes it challenging to quantitatively evaluate fibrosis levels.Although the primary purpose of this algorithm is to evaluate myocardial infarction, the color difference between the fibrotic elements in cardiac tissue and normal tissue makes it possible to isolate fibrotic elements from the entire section and thereby exclusively investigate the distribution and pattern of the fibrosis in the heart.
In order to explore if our algorithm is capable of detecting and isolating sparse fibrotic elements in a cardiac tissue section, we developed another program named fibrosis_analyzer focusing on diffuse fibrosis evaluation, separate from the program that is described above to assess myocardial infarction.At this point, the program only analyzes cardiac fibrosis in an MTS-stained tissue section, though with the same algorithm as used for the infarction analysis.To examine if the program can isolate and quantify diffuse fibrosis, cardiac tissues from wild-type and desmoplakin-deficient mice were involved.The deletion of desmoplakin gene is highly associated with increased cardiac fibrosis. 22We found that a tissue section from a 10-week-old wild type C57BL/6J mouse has 2.5% cardiac fibrosis (Figure 7A) relative to the 9.7% cardiac fibrosis observed in a 10-week-old desmoplakin-deficient mouse heart, which shows more visible fibrosis across the ventricles (Figure 7B).By contrast, cardiac fibrosis reaches 18.9% in a 22week-old desmoplakin-deficient mouse heart, which suggests that the cardiac fibrosis increases with aging (Figure 7C).Notably, the isolation of the fibrosis also helps us visualize the fibrosis distribution across the ventricle wall.In the isolated fibrosis images in Figure 7, we noticed that the cardiac fibrosis is mainly distributed in the left ventricle, with very low level of fibrosis in the septum and right ventricle, regardless of the genetic background or age.Overall, after fibrosis isolation, we could have a general impression of the fibrosis distribution across the ventricular wall without the distraction from the overwhelming large non-fibrotic tissues.

Discussion
Histological staining techniques primarily stain the myocardial infarct with one color and non-infarct tissues with another color, which provides the opportunity for isolating the infarct with the aid of the advanced imaging microscopy and programming techniques.
Multiple semi-automatic approaches have been developed to quantify the myocardial infarct, while they were only used to process the images from a single histological staining technique [12][13][14][15] .By contract, the algorithm we developed in the current study can be used for infarct assessment in four different histological staining techniques.Although there are slight differences in processing images from different staining techniques, the rationale behind these different processing steps are the same -namely, we take advantage of differences in color coding between infarcted and non-infarcted regions regardless of histological staining technique.Conveniently, this rational is generally applicable for infarction assessment in different organs, including cerebral infarction induced by stroke 23,24 .Notably, the algorithm we provide also has additional potential to provide quantification of diffuse fibrosis levels as well.Overall, our simple and effective algorithm demonstrated the capability of identifying, isolating and quantifying myocardial infarct in tissues stained with either MTS, H&E, TTC or PSR.
It is well known that MTS staining is commonly used to label myocardial infarction or fibrosis with blue color.Using this as a control/baseline, we successfully validated the detection and isolation of infarcts in H&E-stained tissue.The similarity in color between the infarct region and non-infarct region in this type of staining is the main obstacle for locating the infarcted area 25 .As H&E staining is not commonly used to qualitatively understand the morphology of myocardial infarct and the border of the infarct region is not readily distinguishable from other tissue regions, which limits H&E staining's use in assessments of myocardial infarct.However, with our simple algorithm, the infarct region is revealed as a notably and visibly distinct border (Figures 2B and 4B).To our knowledge, no previous approach has been as successful in bringing infarcted regions in H&E-stained tissues into such definitive contrast with non-infarcted regions.Overall, successful detection and isolation of the infarct region in H&E-stained cardiac tissue provides a new approach to assess the severity of myocardial infarction.
Slightly different from MTS, which stains the tissues with three colors, TTC and PSR respectively stain the infarct region with one color and other regions with another color.
The distinct difference in color means that our algorithm is able to readily isolate the infarcted region for quantification purposes.Although TTC staining is used to stain living cardiac and brain tissues 23 26 while PSR is used to stain fixed tissues 27,28 , our algorithm can effectively detect the border of the infarcted region.Importantly, the algorithm can provide a highly efficient method for quantifying infarct size, especially when processing bulk tissues samples 26,29 .
Although our algorithm is designed to assess myocardial infarction, it is potentially able to evaluate the distribution and pattern of sparse fibrotic elements.The sparse and randomly distributed fibrosis in diseased cardiac tissue can make it challenging and tedious to quantify levels of fibrosis using manual tracing [30][31][32] .However, our algorithm provides the advantageous feature of isolating and quantifying such sparse and broadly scattered elements from the entire tissue section, so that the fibrosis level can be qualitatively and quantitively evaluated.

Limitations
The algorithm we provide was developed based on color differences between the myocardial infarct regions and other regions, therefore, the effectiveness of the algorithm can be affected by staining quality.If the color in the myocardial infarct region is minimally distinct from other regions in MTS, TTC or PSR-stained sections, the accuracy of infarct quantification can be attenuated.A specific limitation of H&E staining is that it is challenging to evaluate fibrosis level when the fibrotic tissue is sparse and randomly distributed.As shown in Figure 1, the non-infarcted region still has a strong sparse green color after the infarct region is revealed.Therefore, our algorithm may not be suitable to investigate the sparse fibrosis in H&E-stained cardiac tissues.Lastly, this study doesn't include any experimental groups of normal and diseased hearts with and without any treatments to investigate the efficiency of our algorithm in.comparatively evaluating myocardial infarct size.This being said, since our algorithm is highly dependent on the color difference in the infarct region and non-infarct region, we believe our algorithm will provide a reliable tool for evaluating relative comparisons of myocardial infarction volumes between treatments.

Conclusions
In conclusion, we successfully developed a simple and effective color-based algorithm to detect, isolate and quantify myocardial infarct size.Notably, this color-based algorithm is also capable of detecting and isolating difficult to resolve myocardial infarct regions in H&E-stained cardiac tissues and also proved potentially useful in the evaluation of patchy and diffuse fibrosis in cardiac tissues.

SOURCES OF FUNDING
This work was supported by the National Heart, Lung, and Blood Institute Grants R01HL150115 (to ST), R01HL159097&R01HL169610 (to SP), 1R35HL161237-01 (to RGG), and a gift from the Fralin family (Heywood Fralin Professorship) to RGG.

Figure 1 .
Figure 1.The rationale of the color-based algorithm for detecting and isolating myocardial infarctions from three different histological staining techniques.The original section image

Figure 2 .
Figure 2. Identification of the infarct region in an H&E-stained tissue section. A. The original tissue and isolated infarct in a MTS-stained tissue section.B. The original tissue, identified and isolated infarct in a H&E-stained tissue section.

Figure 3 .
Figure 3. Image splitting.A. The slide image with five tissue sections stained with H&E after scanning with a microscope.B. The tissue sections separated by lines for splitting in the program.The top value and bottom value on the right used to determine each image.

Figure 4 .
Figure 4. Isolated and masked infarct regions.The infarct region is isolated and masked after staining with MTS (A), H&E (B), TTC (C) and PSR (D), respectively.The whole

Figure 5 .
Figure 5.The schematic and equations for calculating the area and volume of the tissue and the infarct.A represents the area of the tissue (At) or infarct (As); h represents the height of the section (h1) or removed tissues (h2); Px represents the pixel size; ∑P

Figure 6 .
Figure 6.Representative in-series images with the detected myocardial infarcts in H&Estained tissue sections in a heart.The images in series show the gradually larger area of

Figure 7 .
Figure 7. Isolation of diffuse fibrosis from the MTS-stained cardiac sections from three different types of mice. A. The cardiac section and the isolated fibrotic tissues from a 10week-old wild type normal mouse heart.B. The cardiac section and the isolated fibrosis from a 10-week-old desmoplakin-deficient mouse heart.C. The cardiac section and the isolated fibrosis from a 22-week-old desmoplakin-deficient mouse heart.The percentage