where W is the calculation window inside the region of interest (ROI) on vertical or horizontal images, IDR is the pixel value of each image, and IDRR(di)is also the pixel value of each image generated by moving each image or CT volumes with di. The average pixel values in the calculation window for DR and DRR are IDR¯ and IDRR¯, respectively. [Correction added on 8th February 2018, after first online publication: Equation was corrected.] Optimization was performed to minimize an evaluation value calculated as fdi, shown in eq. (2). In roll optimization, ZNCC was used for the average of ZNCCs on the vertical and horizontal images. The image size of DR and DRR for all calculation steps used in this study was 256 × 256; the pixel spacing was 0.447 mm. The CT image size was 512 × 512. The pixel spacing in prostate, lung, liver, and pancreas cases was 1.074 mm; the pixel spacing in H&N cases was 0.879 mm. The CT slice thickness at all sites was 2 mm. (2)f(di)=1−ZNCC(di)