Lung ventilation and perfusion analyses using chest imaging methods require a correct segmentation of the lung to offer anatomical landmarks for the physiological data. An automatic segmentation approach simplifies and accelerates the analysis. However, the segmentation of the lungs has shown to be difficult if collapsed areas are present that tend to share similar gray values with surrounding non-pulmonary tissue. Our goal was to develop an automatic segmentation algorithm that is able to approximate dorsal lung boundaries even if alveolar collapse is present in the dependent lung areas adjacent to the pleura. Computed tomography data acquired in five supine pigs with injured lungs were used for this purpose. First, healthy lung tissue was segmented using a standard 3D region growing algorithm. Further, the bones in the chest wall surrounding the lungs were segmented to find the contact points of ribs and pleura. Artificial boundaries of the dorsal lung were set by spline interpolation through these contact points. Segmentation masks of the entire lung including the collapsed regions were created by combining the splines with the segmentation masks of the healthy lung tissue through multiple morphological operations. The automatically segmented images were then evaluated by comparing them to manual segmentations and determining the Dice similarity coefficients (DSC) as a similarity measure. The developed method was able to accurately segment the lungs including the collapsed regions (DSCs over 0.96).