Initial commit of segmentation code, sans contour.