An application that extracts lung, pulmonary artery, pulmonary vein, bronchus, and other regions for 3D visualization of the lungs. Lung resection simulation can be performed by extracting and segmenting the territories of pulmonary vessels and bronchi, which is useful for preoperative planning.