Matlab functions for medical image processing