# A Weighted Histogram-Based Tone Mapping Algorithm for CT Images
## 4 Materials and Methods
### Evaluation  
Three evaluation metrics are used to present our results: the structural part of the tone mapped image quality index (TMQI) [39], image entropy, and gradient magnitude. TMQI is a metric for determining image quality of tone mapped images using a high dynamic range original as a reference image. It correlates the pixels of the original image and the tone mapped image using Pearson correlation. The correlation is calculated at five different scales, and weighted combination of the coefficients gives the structural similarity component of the TMQI score. The score should be between \(-1\) and \(1\), and the higher value indicates better structural match. Entropy and gradient magnitude are used as image descriptors. Entropy measures how well the dynamic range is utilized. It gives a high value when the levels in the dynamic range are uniformly utilized. While entropy measures a global property of the image, gradient magnitude measures a local one. Gradient magnitude measures the averaged amount of edges in an image. A higher value indicates more or larger edges, which indicates more details in the image. Neither entropy nor gradient magnitude determine perceived image quality,  
Figure 4: Harbour in sunset, taken by the first author. The fine details of the deck and the buildings are hidden in the shadow.  
as they do not take the human visual system into account; however, as a frequently used image, they can contribute to the characterization of the proposed algorithm.  
These descriptors above are used to compare the tone mapping operators to the proposed algorithm in two cases: a chest CT where the low tissue densities (lungs) are significant, and a head CT where the medium densities (white and gray matter) play an important role.  
The parameters for the algorithms are presented in Table 1. They were selected using a grid-search algorithm around the recommended parameter settings. The parameter combination was selected which yielded the highest combined TMQI score for the two CT images. The proposed algorithm has a relatively wide parameter range where the TMQI score is stable. From this range, \(a=1\), \(clip\_limit=6\) were selected, as convenient integer parameters.  
Next to the structural similarity, gradient magnitude and image entropy are also reported. These three quantitative results are presented in Table 2, while the tone mapped images are shown in Figures 5 and 6.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & \begin{tabular}{c} **Chest CT** \\ **TMQI** \\ \end{tabular} & \begin{tabular}{c} **Head CT** \\ **TMQI** \\ \end{tabular} & \begin{tabular}{c} **Chest CT** \\ **grad.mag.** \\ \end{tabular} & \begin{tabular}{c} **Head CT** \\ **grad.mag.** \\ \end{tabular} & \
\begin{tabular}{c} **Chest CT** \\ **Entropy** \\ \end{tabular} &
\begin{tabular}{c} **Head CT** \\ **Entropy** \\ \end{tabular} \\ \hline Drago & 0.904 & 0.794 & 0.208 & 0.202 & 5.96 & 5.85 \\ Durand & 0.899 & 0.749 & 0.212 & 0.207 & 6.12 & 6.18 \\ Fattal & 0.971 & 0.836 & 0.217 & 0.202 & 6.89 & 6.15 \\ Ferradans & 0.916 & 0.835 & 0.014 & 0.019 & 6.71 & 7.08 \\ Mantiuk’06 & 0.918 & 0.828 & **0.226** & **0.231** & **7.38** & **7.10** \\ Mantiuk’08 & **0.976** & 0.783 & 0.216 & 0.207 & 6.77 & 6.26 \\ Reinhard’02 & 0.898 & 0.803 & 0.206 & 0.202 & 5.81 & 5.86 \\ Reinhard’05 & 0.908 & 0.798 & 0.208 & 0.200 & 6.00 & 5.80 \\ proposed & 0.957 & **0.949** & **0.226** & 0.224 & 7.03 & 6.73 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Structural similarity scores from the TMQI algorithm, gradient magnitudes and image entropies. Bold text indicates the highest score.  
Figure 5: Tone mapped chest CT scan with eight common operators and the proposed method. Parameters are summarized in Table 1; a quantitative comparison is presented in Table 2.  
Figure 6: Tone mapped head CT scan with eight common operators and the proposed method. Parameters are summarized in Table 1; a quantitative comparison is presented in Table 2.