Paint segmentation : this commit defines functions to copy and paste from and into the 3d Mask