3 files

Step-By-Step Guide to 3D Segmentation of Tumor, Airways, and Vessels for Preoperative Planning for Anatomic Segmentectomy Using 3D Slicer

posted on 2023-01-04, 18:48 authored by David Rice

With the recent publication of two large, multicenter, randomized trials showing equivalent or even improved survival for segmental versus lobar resection of small (≤2 cm) stage I non-small cell lung cancer (1,2), there is greater onus among thoracic surgeons to be able to perform anatomic segmentectomy. 

Simple anatomic segmentectomy is a straightforward procedure; however, complex anatomic segmentectomy requires an intimate knowledge of the bronchovascular anatomy and its variations, which are frequent. Preoperative 3D reconstruction of segmental bronchi, arteries, and veins can be helpful in determining the extent of resection and can provide intraoperative guidance, ensuring that the appropriate segmental bronchovascular structures are divided. 

Although there are several commercially available software products and/or services that provide excellent 3D reconstruction of lung anatomy, 3D Slicer is a free, open-source software platform that allows the user to create highly detailed digital 3D models of the lung from DICOM CT image files. The software is compatible with Windows, macOS and Linux and can be downloaded free from the website.

Important Note: Saving Your Work

Before you begin, it is important to note that 3D Slicer is freeware, and though it is relatively stable, it can crash occasionally, so frequent saving is a good idea. Under “Save Data,” there is an icon that looks like a wrapped present. This creates a bundled package that contains the segmentation data as well as the DICOM files. Use this function often to save your progress and prevent potential loss of work.

Using 3D Slicer

The process of creating accurate 3D reconstructions of the bronchovascular anatomy is a bit labor intensive, and there is a significant learning curve. However, the following step-by-step approach demonstrates a workflow that will enable the user to create good 3D reconstructions of the bronchovascular anatomy.

1) Obtain high quality CT images in DICOM format.

This is the old garbage in, garbage out scenario. The better the quality of the CT, the better the quality of the reconstructed images. Enhancement of the pulmonary artery and vein with intravenous contrast is ideal. Suggested scanner settings are kVP 110-140kV; Pitch  1.0, slice spacing 0.5 mm - 0.8 mm; Slice thickness 0.5 mm - 1.0 mm; field of view  32 cm. The diagnostic imaging department should be able to supply the relevant images as de-identified DICOM (Digital Imaging and Communications in Medicine) files. Once you have opened 3D Slicer, select “Add DICOM Data” and upload the files. Then double click on the DICOM file to open it. This will present you with the standard view showing four windows—axial, coronal, sagittal, and 3D.

2) Working with Segment Editor

Next, select “Segment Editor” from the drop-down menu. Use the “Add” button to create three separate layers. Label them something like “Lung,” “Airways,” and “Other.” These will be used with the “Grow From Seeds” function to create the initial 3D modeling of the airway and lung parenchyma. It is important to understand the concept of layers, editable areas, and masks. To make changes to a layer, select the layer and choose whether you want to work only within that layer or among all segment layers. To apply changes to all or visible segments select “Overwrite all” or “Overwrite visible” in the “Modify other segments” dropdown menu, depending on which layers you wish to apply the changes to. To apply changes only to the layer you are working on, select “Allow overlap.” In the “Editable area,” select “Everywhere,” unless you wish to work inside a mask, which will be addressed later on.

3) Creating the Basic 3D Lung/Airway Model Using “Grow From Seeds”

[Video 1]

Once you have made three separate layers for Lung, Airway, and Other, select the Lung layer and using the “Paint brush”   function, paint representative areas of the lung parenchyma on the axial, coronal, and sagittal CT images. If you need to make a correction, simply use the “Erase”   function. Select four or five different planes on the axial, sagittal, and coronal windows. Then select the “Airway” layer and do the same, adding drops of paint to define the lumen of the trachea and bronchi. Finally, select the “Other” layer and paint outside the lung parenchyma and airway (chest wall, upper abdomen, etc.). 

Next, select the “Grow from Seeds”   function. With all three layers visible, in the Masking Menu, select Editable Area: “Everywhere,” Modify Other Segments: “Overwrite All.” Then click “Initialize.” This will typically take about three minutes to process. Ensure that “Show 3D” is not selected at this point, as this will take computational time. 

Once “Grow From Seeds” has generated the layer masks, scroll through the CT to identify regions of mismatch or bleed. Where one layer is misrepresented, simply select that layer, choose the “Paint brush” tool (flat brush rather than spherical), and paint over a portion of the misrepresented region. You do not need to be super accurate; “Grow From Seeds” will automatically update the masking. Do this for each layer. 

Once each layer is appropriately defined, select “Apply,” and “Grow From Seeds” will create the final renditions. To view the 3D reconstruction, make “Other” layer invisible and then select “Show 3D.” To show only one lung, select the scissors tool and simply snip away from the 3D model whatever you do not want. Make sure that “Modify Other Segments” is set to “Allow Overlap.” Otherwise, you will cut away sections from other layers as well.

4) Creating a Lung Mask

[Video 2]

The newly created “Lung Segmentation” layer will now be used to create a lung mask. This is an important step because the mask will be used to limit the area in which further computational analysis is performed. For instance, if you are interested in rendering the pulmonary vessels of the left lung only, you can apply a lung mask on the left so that only the vessels inside of the masked area appear. To do this, you will first create a new layer (“Lung Mask”) and then use the “Logical Operators”   tab, selecting “Lung Mask” layer, choose the operator (“Copy”) and then select the layer you wish to copy. Ensure that editable area is set to “Everywhere” and that you allow overlap. This will copy the lung layer into the lung mask layer. As there are often small regions within the lung that are not filled in completely (e.g., vessels, bronchi, etc.), these pockets should be removed. To do this, use the “Smoothing”   function (closing, fill holes, kernel size about 5 mm) or the spherical paintbrush to paint out any defects. Reducing the opacity of the layer will often allow you to identify defects within the layer. 

5) Defining the Tumor

Create a new layer (“Tumor”). Set editable area everywhere and allow layer overlap. Working within the “Tumor” layer, select the “Level Tracing”   tab and, slice by slice, select the tumor region. This works well for small lesions where there may be only ten to fifteen axial cuts that encompass the tumor. For larger tumors, you can still use this tool, only skip every two to three axial cuts. Next, use the “Fill Between Slices”   function to join them together.

Read more on CTSNet.org.


1. Saji H, Okada M, Tsuboi M, Nakajima R, Suzuki K, Aokage K, Aoki T, Okami J, Yoshino I, Ito H, Okumura N, Yamaguchi M, Ikeda N, Wakabayashi M, Nakamura K, Fukuda H, Nakamura S, Mitsudomi T, Watanabe SI, Asamura H; West Japan Oncology Group and Japan Clinical Oncology Group. Segmentectomy versus lobectomy in small-sized peripheral non-small-cell lung cancer (JCOG0802/WJOG4607L): a multicentre, open-label, phase 3, randomised, controlled, non-inferiority trial. Lancet. 2022 Apr 23;399(10335):1607-1617. doi: 10.1016/S0140-6736(21)02333-3. PMID: 35461558.

2. N.K. Altorki , X. Wang, D. Kozono, C. Watt, R. Landreneau , D. Wigle, J. Port , D.R. Jones, M. Conti, A.S. Ashrafi, R. Keenan, T. Bauer, L.J. Kohman, T.E. Stinchcombe, E. Vokes14. Lobar or Sub-lobar Resection for Peripheral Clinical Stage IA = 2 cm Non-small Cell Lung Cancer (NSCLC): Results From an International Randomized Phase III Trial (CALGB 140503 [Alliance]) Presented at 2022 World Conference on Lung Cancer, Vienna, Austria, August 8, 2022


Usage metrics




    Ref. manager