Cavity contour segmentation in chest radiographs using supervised learning and dynamic programming.