Multiplane Segmentation MATLAB code