In Eq. (REF ), the second term \(-\mathbb {E}_{q}[log\, p(y|z;x)]\)  is called the reconstruction loss term in a VAE model. While we can model the distribution of \(p(y|z;x)\)  as a Gaussian as in Eq. (REF ), which is equivalent to using a sum-of-squared difference (SSD) metric to measure the similarity between the warped image \(x\)  and the observed \(y\) ,
in this work, we instead use a normalized local cross-correlation (NCC) metric, due to its robustness properties and superior results, especially for intensity time-variant image registration problems [1]}, [2]}. NCC of an image pair \(I\)  and \(J\)  is defined as:
\(\begin{aligned}&NCC(I, J)= \\&\sum _{p\in \Omega }\frac{\left( \sum _{p_{i}\in \mathcal {W}}(I(p_{i})-\bar{I}(p))(J(p_{i})-\bar{J}(p)) \right)^{2}}{\left( \sum _{p_{i}\in \mathcal {W}}(I(p_{i})-\bar{I}(p))^{2}\right)\left(\sum _{p_{i}\in \mathcal {W}}(J(p_{i})-\bar{J}(p))^{2}\right)},\end{aligned}\) 
