Matlab code for femur segmentation