# Prospects of Structural Similarity Index for Medical Image Analysis
## 4 SSIM in Medical Imaging
### Current Status of SSIM Research in Medical Imaging
#### 4.6.1 Loss Function  
The loss function along with the activation function, optimizer, and other hyperparameters in CNN is an essential parameter to predict the model architecture ability. A common loss function is MSE since it can provide simple mathematical expressions. In 2021, [PERSON] et al. attempted to develop a CNN-based algorithm to suppress the artifact of phase-contrast cardiac MR images in real time. Here, they assigned MAE and SSIM as the loss function when training the model architecture. They called their CNN model U-Net MAE and U-Net SSIM [38].  
To begin their study, they prepared the synthetic dataset using 520 breath-hold, retrospectively cardiac gated, uniform density phase-contrast MR in the aortic position. The dataset was comprised of 40 combinations between magnitude and phase subtracted images. They split the dataset into 490 training images and 15 images were for validation and test dataset each. The ground-truth training dataset was obtained by interpolating the phase-contrast MR images to the target temporal resolution. To generate the corrupted images, the original dataset was processed using Fourier transform and undersampled utilizing the chosen trajectory. Then, with the inverse Fourier transform, they acquired the aliased data. The ground-truth and noise-contaminated images were normalized and cropped into \(192\times 192\times 40\).  
After the dataset preprocessing, they fed the dataset into the U-Net architecture for training. U-Net model consisted of max-pooling, transpose three-dimensional (3D) convolution, 3D convolution, and 1D convolution layers. They trained the model by implementing an adaptive moment estimation algorithm (Adam) as the optimizer, a batch size of 2, an epoch of 100, as well as with an initial learning rate of 0.0005. To complete the configuration, they assigned two loss functions, namely MAE and SSIM (AvgSSIM).  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Study** & **Year** & **Modality** & **SSIM Implementation** & **Compared Matrix** & **Results** \\ \hline [PERSON] et al. [131] & 2020 & Optical imaging & IQA & MAE & SSIM is suitable for this task \\ \hline [PERSON] et al. [132] & 2021 & Optical imaging & IQA & Dice coefficient & SSIM is suitable for this task \\ \hline \hline \end{tabular}
\end{table}
Table 5: Summary of the published articles encompassing SSIM for optical imaging. MAE, mean-absolute-error.  
Especially for SSIM, the loss can be computed with the complex images over the real (real) and imaginary (imag) elements, as follows  
\[AvgSSIM=\frac{SSIM\Big{(}\frac{real+1}{2}\Big{)}+SSIM\Big{(}\frac{imag+1}{2}\Big{)} }{2}\, \tag{39}\]  
These loss functions were utilized to obtain the selected best performance of the U-Net with the most minimum loss calculated from the validation dataset. To measure the effectivity of their U-Net, MAE, PSNR, average SSIM, magnitude SSIM, and phase SSIM were applied.  
According to their results, U-Net MAE and U-Net SSIM have a significant improvement to suppress the artifact when compared to the gridded images. Additionally, U-Net SSIM enhanced the images' sharpness, whereas U-Net MAE was deemed blurrier. U-Net MAE was superior when the metric evaluations were MAE and PSNR; meanwhile, U-Net SSIM was exceptional in the average SSIM, magnitude SSIM, and phase SSIM. Moreover, they compared the U-Net MAE and U-Net SSIM using flow compensated, flow encoded, and combined images to obtain the denoised images. Both U-Net performed sufficiently with the magnitude images. However, U-Net SSIM was remarkable in denoising the phase images compared to U-Net MAE. With these results, U-Net SSIM outperformed U-Net MAE for the 20 pediatric patients with congenital heart disease.