Bayesian analysis toolkit for medical image processing