Segmentation of pelvic structures from preoperative images for surgical planning and guidance