Segmentation creation

See the answer in this post: