Thanks a lot Andras. I already saw that program and tested it out. The results are impressive on manual segmentations of the pelvis. The problem is that my script and the bone segmentation has to be automatic. Femur and pelvis are close together and I can’t keep the segments separated without editing it manually. With the femur, I get this segmentation as output: