3D c-space generation and ellipsoidal segmentation