A 3D MRI denoising algorithm based on Bayesian theory