Lung segmentation

how can I know oxygen lung´s saturation ? first I have to segment the lung but I dont know what to do after, thanks s much

What exactly do you mean by “oxygen lung saturation”?

Slicer contains a “Chest Imaging Platform” with many lung-related tools. One way to analyze a CT scan would be:

(1) create lung masks as shown here:

(2) then segment lung areas of interest (emphysema,inflated,infiltrated,collapsed) as shown here:

In a CT scan you would not see functional parameters like blood´s oxygen saturation.
If this does not answer your question please describe a bit more with an example.


thank you so much . Oxygen lung´s saturation= oxygen level that pass through lungs blood vessels (10mm^2 for example).
Thanks again!

The amount of oxygen passing through lung vessels can not be detected in a conventional lung CT. To measure oxygen update in test persons you would need to perform a spiroergometry, to measure lung perfusion you would need to involve scintigraphy.


Very nice extension. Thanks for sharing!

I have a problem with the segmentation of the trachea. Some voxels from the background are being segmented in some of the CTs I’m working on. Do you know how I can get around this problem?



By “Trachea” we just mean “everything else” (not lungs). If there was a strong use case for actually extracting the trachea then we a fourth “other” segment could be added that would allow separating trachea from “everything else”. LungCTSegmenter module is a Python scripted, so you can go on and change the code (wherever you find “trachea” in the code, add a fourth option of “other” or “background”). If it works for you then you can send a pull request so that we can review and integrate your changes.

Thanks for the comment, Mauro.
I can not clearly see the problem in the image that you provided (too small), but I guess I know what you mean.
The Lung CT Segmenter was mainly created for the purpose of providing a quick way to produce lung masks in CT. We needed that to be able to further process areas of the CT within these masks. The surface of the lung masks is automatically smoothed, and airway/trachea segmentation is currently not always correct.

We will possibly deal with this in an update (a checkbox “Produce detailed airways” and additional code), in the meantime, you could try to segment the airways by using the “Grow From Seeds” effect in the “Segment Editor”.

1 Like

Produced a video today to show how I currently segment airways from a lung CT with Slicers´s “Grow from Seeds” function.

[sry for the double post]


Thank you very much for the tips! I’m new to 3DSlicer.

I’m not exactly trying to segment the airways at the moment. I was wondering how to improve the model because the ‘Lung CT segmenter’ extension prompts the user to click on a point to segment the trachea. However, in some images I am testing, over-segmentation occurs (many voxels are classified as false positives).

In the segmentation shown below, the left and right lungs (light yellow and light green, respectively) are acceptable. The region called ‘trachea’ (in light blue) contains voxels from the background.

I was wondering if it is possible to have some control over the growing region (stopping criterion or threshold)? I am assuming that segmentation occurs in a similar way to ‘Grow from Seeds’ tool.

The segment that we call “trachea” now is really just a catch-all for all background structures that we want to exclude from the lung segmentation. Maybe we should just rename “trachea” to “other” to avoid any confusion.

1 Like

I renamed the output segments in the source and changed “trachea” to “others”.
Is there anything else I need to push for getting the extension updated on the Slicer extension servers ?

No you should be all set. Since you listed the master branch in your s4ext file it will automatically be used in the next extension build.


In the latest version, the airway segmentation module in CIP has disappeared.


I am not related to the airway segmentation module - but I can find it in 4.11.20200930 under Chest Imaging Platform → Toolkit → Segmentation → Segment Lung Airways

There is/was a module called “Airway Segmentation” too in CIP version (Documentation/4.10/Modules/AirwaySegmentation - Slicer Wiki). The “Segment Lung Airways” has similar functionality so maybe one was removed for the sake of redundancy.