Segmentation and reconstruction of the 3D geometry of the middle and inner ear