Segmentation and reconstruction of the lung volume in CT images