

ORIGINAL ARTICLE 



Year : 2020  Volume
: 45
 Issue : 4  Page : 249255 

Texture analysis on ultrasound: The effect of time gain compensation on histogram metrics and graylevel matrices
Giulio Vara^{1}, Arianna Rustici^{1}, Andrea Sechi^{2}, Cristina Mosconi^{1}, Vincenzo Lucidi^{1}, Rita Golfieri^{1}
^{1} Department of Experimental, Diagnostic and Specialty Medicine, University of Bologna, Bologna, Italy ^{2} Department of Specialized, Clinical and Experimental Medicine, Division of Dermatology, University of Bologna, Bologna, Italy
Date of Submission  08Sep2020 
Date of Decision  11Dec2020 
Date of Acceptance  13Dec2020 
Date of Web Publication  2Feb2021 
Correspondence Address: Dr. Giulio Vara Via Ernesto Masi 43, Bologna Italy
Source of Support: None, Conflict of Interest: None  Check 
DOI: 10.4103/jmp.JMP_82_20
Abstract   
Aims: Texture analysis (TA) is becoming an increasingly used tool in radiological research. Some papers have been published on its use in ultrasound (US), but the way in which the machine settings affect the features has not yet been fully explored. With this research, we analyze how the time gain compensation (TGC) influences the features of the graylevel matrices in the abdominal US setting. Subjects and Methods: We analyzed the images acquired from the hepatorenal acoustic window of a healthy 29yearold volunteer acquired with different TGC settings. TA was carried out using the LifeX software. Results: Several both 1^{st} and 2^{nd} order graylevel matrices features showed a strong correlation with TGC settings. Conclusions: TGC settings must be accounted for when carrying out further TA studies.
Keywords: Kidney, liver, texture analysis, time gain compensation, ultrasound
How to cite this article: Vara G, Rustici A, Sechi A, Mosconi C, Lucidi V, Golfieri R. Texture analysis on ultrasound: The effect of time gain compensation on histogram metrics and graylevel matrices. J Med Phys 2020;45:24955 
How to cite this URL: Vara G, Rustici A, Sechi A, Mosconi C, Lucidi V, Golfieri R. Texture analysis on ultrasound: The effect of time gain compensation on histogram metrics and graylevel matrices. J Med Phys [serial online] 2020 [cited 2021 Mar 6];45:24955. Available from: https://www.jmp.org.in/text.asp?2020/45/4/249/308615 
Introduction   
Ultrasound (US) imaging is a technique that enables the realtime visualization of the vast majority of internal organs with the advantage of being noninvasive. In Bmode US imaging, the different structures are displayed with a grayscale imagemodality, deriving from the differences in acoustic attenuation of different parenchyma. A limitation of US imaging is the presence of speckle noise on images that reduce the visualization of the organs. To improve the US visualization, the operators have often to modify several basic parameters of the systems, to which the image quality is sensitive.^{[1]} Among them, the Time Gain Compensation (TGC) and the Dynamic Range are the more relevant,^{[1],[2],[3]} but the TGC is the most frequent parameter modified by operators. In fact, TGC allows to display similar interfaces in a similar level of brightness compensating the attenuation of US echo signal along with deepness. The TGC amplifies the echoes returning from deeper structures making them comparable to those returning from superficial ones, resulting in the visualization of more uniform images.^{[1]}
To optimize image quality, algorithms for the automatic adjustment of the TGC (ATGC) have been introduced,^{[4]} but despite some advantage, they have an inherent drawback. In fact, those algorithms consider homogeneous all the scanned structures, thus not highlighting the differences of acoustic attenuation of different tissues and structures. Therefore, the ATGC fails in the adjustment of brightness or darkness at the interface between different organs, and the operators must manually change the overall gain. As a result, in the US panel, several buttons and options must be present to permit the manual modification needed to adjust the quality of images.
Despite some previous studies have reported how the changing of the overall gain allows a better visualization of different structures, just a few focused on the influence of the TGC modification, and among them, the vast majority focused on the visualization of phantom models.^{[5],[6],[7],[8]} Recently, due to the increased interest in artificial intelligence, several studies have explored the potentials of texture analysis (TA) applied to US images, without considering how the machine's settings could influence the features representations.^{[9],[10]} Since TA software can calculate dozens to hundreds of indices from a single image, not having a clear comprehension of which are more representative of a certain tissue and how they can change basing on basic parameters of the systems, could force researchers to take every index into account, leading to potential bias when building predictive models such as overfitting.
Even if this topic is gaining growing popularity in the scientific literature, currently, there are no feasibility studies, nor studies aimed to explore which radiomic features are the most suited to be analyzed in US images or how are they influenced by the machine's settings.
The purpose of this study is to define a set of textural indices reliably representative of the healthy liver parenchyma, and outline the best TGC values in which explore them, to allow future research to deal with less variables and rely on simpler data analysis methods.
Subjects and Methods   
Images sample
Images on the hepatorenal space on the sagittal plane were acquired with a curved array transducer, with the subject prone and during breath hold, and exportend in the bitmap format. All images were subsequently reviewed to remove those affected by minimal motion artifact to ensure the best results, resulting in fifty images selected out of sixtytwo. Among them, only the images comprising from 36% to 79% TGC were considered, the maximum and minimum Hz values, in which the liver and the kidney were distinguishable. At the end of the process, 22 images were suitable for further analysis. Two circular Region of Interest (ROIs) with a radius of 5 mm were identified on each image in the same position on liver and on kidney, both at the same distance from the transducer, caring to place them in areas where only parenchyma was present to avoid potential distortion on the histogram metrics [Figure 1].  Figure 1: ROIs definition method: Circular ROIs of identical size were selected at the same distance from the transducer, trying to minimize the inclusion of nonparenchymal structures
Click here to view 
The resulting images were analyzed using LifeX software (www.lifexsoft.org), and the intensity discretization was set at 256 gray levels. Both 1^{st} and 2^{nd} order features were analyzed. Firstorder features are related to the distribution of gray levels detected in the selected ROIs such as skewness, kurtosis, entropy, and energy of the distribution. Conversely, secondorder features are composed of indices calculated from a matrix, being it the cooccurrence matrix, run, and zone length matrices. A detailed explanation can be found on the software's whitepaper.^{[11]}
Data analysis
Results from the liver ROIs alone and their values divided by the ones detected in the kidney' ROIs were analyzed. Correlations among the different TGC and textural indices were evaluated by reporting the data on a scatter plot, whereas effect size and significance were evaluated with whichever equation model best fitted the data, choosing among linear, logarithmic, inverse, quadratic, cubic, power, compound, sigmoid, logistic, growth, and exponential. Confidence interval (CI) of 95% was set to test the significant effect of ROIs and their interactions. The percentage of variability of optimized ROIs was analyzed by R squared statistics. For comparisons between parenchyma, the indices were plotted on a scatter plot; then, it was reported when values were shown outside the mean interval in the scatter plot.
Results   
Firstorder features
Unsurprisingly, minimum, maximum, and mean values of the distribution of gray values measured in the ROIs selected on the liver were linearly correlated to the different TGC values (Minimum: R^{2} = 0.951; Maximum: R^{2} = 0.978; Mean: R^{2} = 0.992) [Figure 2]. Notably, both minimum and mean values showed a “lag” effect below a TGC value of 38%. A quadratic model was found for standard deviation (R^{2} = 0.915), for skewness (R^{2} = 0.707) and for entropy (R^{2} = 0.915). Conversely, the Kurtosis (R^{2} = 0.633) and Uniformity (R^{2} = 0.774) followed a sigmoid distribution.  Figure 2: Scatterplot for Firstorder level indices value correlated with TGC settings as seen in the liver (blue) and kidney (red) parenchyma. The best fir line was drawn according to the best fitting function; 95% confidence interval lines are displayed on the sides
Click here to view 
The minimum gray value showed no overlapping of the mean C. I. lines between 43% and 74% of TGC; for mean, it was from 41% to 79%; for maximum, it was from 41% to 78%; for standard deviation, it was from 47% to 72%. For the gray level distribution parameters, skewness showed no overlapping of the mean C. I. lines below a TGC value of 45%, kurtosis below 41%, entropy below 52%, and uniformity below 47% [Figure 2].
Secondorder features
Graylevel cooccurrence matrix
For the graylevel cooccurrence matrix (GLCM), a quadratic distribution was observed for homogeneity (R^{2} = 0.818), contrast (R^{2} = 0.856), entropy (R^{2} = 0.789), and dissimilarity (R^{2} = 0.868). Conversely, the energy follows a sigmoid distribution (R^{2} = 0.726), while correlation did not appear to fit any of the explored fit functions. No overlapping of the mean C. I. lines in the GLCM was reported for homogeneity below 55% TGC, for energy below 46% TGC, and for entropy below 54% TGC. For contrast and dissimilarity, no overlapping of the mean C. I. lines in the GLCM was reported between 41%–68% TGC and 38%–61% TGC, respectively. Instead, the correlation showed completely overlapping confidence lines [Figure 3].  Figure 3: Scatterplot for gray level cooccurrence matrix indices value correlated with time gain compensation settings as seen in the liver (blue) and kidney (red) parenchyma. The best fir line was drawn according to the best fitting function; 95% confidence interval lines are displayed on the sides
Click here to view 
Graylevel run length matrix
For the graylevel run length matrix (GLRLM), a quadratic distribution was observed for run percentage (RP, R^{2} = 0.684), for shortrun emphasis (SRE, R^{2} = 0.638), for high graylevel run emphasis (HGRE, R^{2} = 0.996), for short run high graylevel emphasis (SRHGE, R2 = 0.996), for long run high graylevel emphasis (LRHGE, R^{2} = 0.994), and for run length nonuniformity (RLNU, R^{2} = 0.638). Conversely, a sigmoid distribution was discovered for low graylevel run emphasis (LGRE, R^{2} = 0.967), for short run low graylevel emphasis (SRLGE, R^{2} = 0.963), for long run low graylevel emphasis (LRLGE, R^{2} = 0.921), and for the gray level nonuniformity (GLNU, R^{2} = 0.846). Instead, the long run emphasis (LRE) did not fit to any of the explored distributions.
In the GLRLM, no overlapping of the mean C. I. lines was noticed below the 52% of TGC for RP, above the 43% of TGC for HGRE, between 43% and 84% of TGC for LRHGE, between 36% and 53% of TGC for SRE, between 41% and 55% of TGC for SRLGE, between 48% and 53% of TGC for GLNU, above 44% of TGC for SRHGE, below 54% of TGC for RLNU, between 36% and 53% of TGC for LGRE, and below 40% of TGC for LRLGE. Complete overlapping confidence lines were noticed for LRE [Figure 4].  Figure 4: Scatterplot for graylevel run length matrix indices value correlated with time gain compensation settings as seen in the liver (blue) and kidney (red) parenchyma. The best fir line was drawn according to the best fitting function; 95% confidence interval lines are displayed on the sides
Click here to view 
Graylevel zone length matrix
For the graylevel zone length matrix (GLZLM), a quadratic distribution was observed for small zone emphasis (SZE, R^{2} = 0.659), for small zone high gray emphasis (SZHGE, R^{2} = 0.996), for zone length nonuniformity (ZLNU, R^{2} = 0.895), for zone percentage (ZP, R^{2} = 0.878), for high gray zone emphasis (HGZE, R^{2} = 0.996), and for large zone high gray emphasis (LZHGE, R^{2} = 0.627). On the contrary, a sigmoid distribution was observed for small zone low gray emphasis (SZLGE, R^{2} = 0.977), for large zone emphasis (LZE, R^{2} = 0.622), for low gray zone emphasis (LGZE, R^{2} = 0.971), and for large zone low gray emphasis (LZLGE, R^{2} = 0.882). For the GLNU, none of the explored functions showed a fitting model. In the GLZLM, no overlapping of the mean C. I. lines was noticed in the LZE and LZLGE, between 47% and 55% of TGC for SZE, between 39% and 53% of TGC for SZLGE, above 44% of TGC for SZHGE, between 39% and 59% of TGC for ZLNU, between 40% and 53% of TGC for LGZE, between 36% and 58% of TGC for ZP, above 44% of TGC for HGZE, and between 54% and 69% of TGC for LZHGE. Complete overlapping confidence lines were noticed for GLNU [Figure 5].  Figure 5: Scatterplot for gray level zone length matrix indices value correlated with time gain compensation settings as seen in the liver (blue) and kidney (red) parenchyma. The best fir line was drawn according to the best fitting function; 95% confidence interval lines are displayed on the sides
Click here to view 
Coefficients of variation
Among the conventional features, with a TGC >45%, the entropy showed to be the feature with the lowest coefficient of variation, whereas minimum, mean, and maximum showed to have the highest. For LGRE, SRLGE, LRLGE, LGZE, SZLGE, and LZLGE, a threshold of >55% TGC was used, since they visually appeared noncorrelated to TGC after that point.
Among the second order features, the different coefficient of variation are shown in [Table 1].  Table 1: Coefficient of variation of the analyzed indices with a threshold of time gain compensation >45 or >55%
Click here to view 
Discussion   
First order
Among the eight first order indices analyzed, we identified the mean value of the gray's distribution on the selected ROIs as the most adherent to the fitting equation, which can be reliably used from 40% to 80% TGC. In fact, in this range, we identified an optimal TGC value of 60%, in which the parenchyma of the liver was most different from the parenchyma of the kidney. This value of TGC should therefore be used in clinical practice to evaluate echogenicity differences between the liver and the kidney, such as in the assessment of steatosis or chronical renal failure. Furthermore, this value of TGC should be used for TA studies evaluating alterations in liver or kidney parenchyma using the mean value of the distribution of the grays among the firstorder features. A similar behavior is also noted for minimum and maximum value of grays detected in the ROIs. We also found that, energy, entropy, kurtosis, and skewness indices values were not correlated to TGC above a value of, respectively, 47%, 51%, 41%, and 45%, without significant variations. Observing this, we infer that TA studies involving these indices can be performed regardless of the TGC value when images are acquired beyond the said thresholds.
Second order
The GLCM defines the distribution of cooccurring pixel values over an image at a given offset. A GLRLM quantifies the homogeneity of graylevel runs, as the length of consecutive pixels that have the same gray level value. The GLZLM quantifies the size of homogeneous zones for each gray level in three dimensions. Predictably, high gray emphasis indices showed a direct correlation with TGC values, and low gray emphasis the opposite. More consistent values were obtained for small run/zone indices, possibly due to the influence of noise artifacts, to which long run and large zone indices should be, theoretically, less influenced. It must be noted that for values higher than 50% TGC, indices with emphasis on low gray level values tend to zero, proving likely of limited use in the healthy parenchimas, whereas could provide a quantitative assesment on conditions in which fluid is collected.
Coefficients of variation
Among the conventional features, with TGC >45% or >55% according to the lag effect on the scatter plot, entropy showed to be the feature less influenced by the TGC%, whereas minimum, mean, and maximum showed to be the most influenced. Among the histogram features, contrast appeared to be the most influenced, and entropy the least. Among the secondorder features, lowgray and highgray level emphasis features appear to be the most influenced by TGC variation, whereas nonuniformity features appear to be the most consistent.
Conclusions   
Time gain control appears to heavily influence most of the features that can be extracted with common procedures of TA; for the majority of them, the best range of TGC appears to be approximately 50%. Further studies with a larger sample size are needed to better define these results and eventually define a nomogram for normal echotextural liver features. An important problem that has been, and sometimes still is neglected, is the dependence of echographic information on the equipment, as the TGC. The TGC in fact induces nonlinear effects, inducing nonreproducibility and a lack of generalizability of data. Therefore, the TGC has to be corrected adequately before any analysis.
Financial support and sponsorship
Nil.
Conflicts of interest
There are no conflicts of interest.
References   
1.  Lee D, Kim YS, Ra JB. Automatic time gain compensation and dynamic range control in ultrasound imaging systems. Proc SPIE 2006;6147: 614708. 
2.  Hartman PC, Oosterveld BJ, Thijssen JM, Rosenbusch GJ. Variability of quantitative echographic parameters of the liver: Intra and interindividual spread, temporal and agerelated effects. Ultrasound Med Biol 1991;17:85767. 
3.  Nayak R, Kumar V, Webb J, Fatemi M, Alizad A. Noninvasive small vessel imaging of human thyroid using motioncorrected spatiotemporal clutter filtering. Ultrasound Med Biol 2019;45:10108. 
4.  Moshavegh R, Hemmsen MC. Automated hierarchical time gain compensation for in vivo ultrasound imaging. Proc SPIE 2015;941:941904. 
5.  Gong P, Song P, Huang C, Trzasko J, Chen S. Systemindependent ultrasound attenuation coefficient estimation using spectra normalization. IEEE Trans Ultrason Ferroelectr Freq Control 2019;66:86775. 
6.  Natalia I, Jan D. Modelbased ultrasound attenuation estimation. J Acoustical Soc Am 2017;141:3956. 
7.  Yao LX, Zagzebski JA, Madsen EL. Backscatter coefficient measurements using a reference phantom to extract depthdependent instrumentation factors. Ultrason Imaging 1990;12:5870. 
8.  Mari JM, Hibbs K, Stride E, Eckersley RJ, Tang MX. An approximate nonlinear model for time gain compensation of amplitude modulated images of ultrasound contrast agent perfusion. IEEE Trans Ultrason Ferroelectr Freq Control 2010;57:818829. 
9.  Lee SE, Han K, Kwak JY, Lee E, Kim EK. Radiomics of US texture features in differential diagnosis between triplenegative breast cancer and fibroadenoma. Sci Rep 2018;8:13546. 
10.  Sogawa K, Nodera H. Neurogenic and myogenic diseases: Quantitative texture analysis of muscle US data for differentiation. Radiology 2017;283:4928. 
11.  Nioche C, Orlhac F, Boughdad S, Reuzé S, GoyaOuti J, Robert C, et al. LIFEx: A freeware for radiomic feature calculation in multimodality imaging to accelerate advances in the characterization of tumor heterogeneity. Cancer Res 2018;78:47869. 
[Figure 1], [Figure 2], [Figure 3], [Figure 4], [Figure 5]
[Table 1]
