Non-parametric probability density function estimation for medical images