Abstract:Freehand three-dimensional (3D) ultrasound is widely used in intraoperative imaging and navigation because of its flexibility and non-ionizing nature. However, operator-dependent scanning often results in discontinuous spatial distributions of two-dimensional (2D) slices. This discontinuity produces unevenly distributed voxel holes during 3D reconstruction. Consequently, structural incompleteness and degraded surface continuity occur, which reduce visualization quality. To address this problem, a slice-wise 3D ultrasound hole filling method is proposed within the freehand reconstruction framework. In this method, voxel-level missing data were transformed into a pixel-level restoration task. This strategy avoided the high training cost of 3D restoration networks and the difficulty of acquiring high-quality 3D training data. A U-shaped restoration network was adopted, and Soft Masked Batch Normalization (Soft-MBN) was introduced. Soft-MBN balanced local valid-region statistics and global statistics through a mask-guided soft fusion mechanism, thereby reducing the influence of invalid regions during feature normalization. In addition, a Mask-guided Gated Attention (MGGA) mechanism was designed for skip connections. Encoder features were spatially weighted and gated according to mask validity, which suppressed the impact of invalid-region features on the decoding stage. Experimental results demonstrate that the proposed method outperforms comparative approaches in terms of PSNR, SSIM, and RMSE under hole coverage ratios of 30% and 50%. Under the 50% high missing-rate condition, PSNR and SSIM are improved by approximately 3.7 dB and 0.064, respectively. Furthermore, 3D reconstruction visualizations show that bone surface continuity is effectively improved, and bone interface discontinuities caused by voxel-level missing data are alleviated. These results indicate that the proposed method has strong potential for ultrasound hole filling and for improving 3D reconstruction quality.