# Information about LungCTSegmenter

**URL:** <https://discourse.slicer.org/t/information-about-lungctsegmenter/28976>\
**Category:** Support\
**Tags:** segmentation, lungctanalyzer, lung\
**Created:** [April 17, 2023, 5:53pm UTC](https://discourse.slicer.org/t/information-about-lungctsegmenter/28976 "2023-04-17T17:53:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://discourse.slicer.org/u/paolo)\
**Post date:** [April 17, 2023, 5:53pm UTC](https://discourse.slicer.org/t/information-about-lungctsegmenter/28976/1 "2023-04-17T17:53:18Z")

</div>

Hi everyone,

I’m a biomedical engineering student from Italy, this is the first time I’m using 3D Slicer.  
I’m writing to ask you some information about the Lung CT Analyzer and Lung CT Segmenter extensions in 3D Slicer.

I’d like to ask you some details about the image segmentation algorithms that are implemented in the extensions: which algorithms are used to segment the lungs (parenchyma)? Why are the markups needed?  
I read that airways are segmented by applying a local thrsholding algorithm; I’d like to ask  
which conditions are set in terms of number of pixels in the neighborhood and parameters used for the computation of the local thresholds.

Thank you for your support,

best regards,

Paolo

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [April 17, 2023, 6:28pm UTC](https://discourse.slicer.org/t/information-about-lungctsegmenter/28976/2 "2023-04-17T18:28:17Z")

</div>

Hello Paolo,

This is a two-step process in which Lung CT Segmenter produces lungs, lobe, and airway segmentation first, and in a second step the Lung Analyzer thresholds the parenchyma according to their respective Hounsfield unit ranges.  
The markups in Lung CT Segmenter must only be placed if you do not use one of the recently implemented AI tools. Airway segmentation uses the Segment Editor Local Threshold effect outgoing from on marker that is calculated in the center of the AI trachea segment (or, if you do not use AI, from the lastly placed manual marker).

The airway segmentation parameters [are here](https://github.com/rbumm/SlicerLungCTAnalyzer/blob/2977886b1f3bd65869df50a0f8a2fa1cc2056e3e/LungCTSegmenter/LungCTSegmenter.py#L2528). and use “Local threshold” and “GrowCut”. AIrway segmentation works best with thin sliced CT and tissue kernels.

---

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://discourse.slicer.org/u/paolo)\
**Post date:** [April 17, 2023, 6:42pm UTC](https://discourse.slicer.org/t/information-about-lungctsegmenter/28976/3 "2023-04-17T18:42:51Z")

</div>

Thank you!

So, roughly speaking, and excluding the recently implemented AI tools, lungs are segmented with a global threshold, according to their Hounsfield unit range.

As for the airways, they are segmented in a second step, via the 3D Slicer Segment Editor Local Threshold algorithm, and for this reason the markups are needed.

Is it generally correct?

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [April 18, 2023, 4:43pm UTC](https://discourse.slicer.org/t/information-about-lungctsegmenter/28976/4 "2023-04-18T16:43:43Z")

</div>

The conventional lung masks are actually generated with Slicer´s [Grow From Seeds](https://github.com/rbumm/SlicerLungCTAnalyzer/blob/master/LungCTSegmenter/LungCTSegmenter.py#L1606:~:text=%23%20set%20effect-,self.segmentEditorWidget.setActiveEffectByName(%22Grow%20from%20seeds%22),-effect%20%3D%20self) effect after you placed the markups in both lungs and one in the trachea.

---

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://discourse.slicer.org/u/paolo)\
**Post date:** [April 18, 2023, 8:24pm UTC](https://discourse.slicer.org/t/information-about-lungctsegmenter/28976/5 "2023-04-18T20:24:51Z")

</div>

Thanks for your reply,

Since I’m new in 3D Slicer but also in segmentation, I’m trying to figure out the relationships between the parameters requested in the extension and the actual segmentation algorithms that are implemented.  
So, hoping not to bother you, I’d like to ask the following question:  
if a grow from seeds algorithm is used for the lung segmentation, why do I have to set a Hounsfield Units range for the lungs? Is there any global thresholding?

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [April 19, 2023, 7:31am UTC](https://discourse.slicer.org/t/information-about-lungctsegmenter/28976/6 "2023-04-19T07:31:25Z")

</div>

The overall goal was to segment abnormalities that are within the lungs. We wanted to create the lung masks first because everything we are interested in lies there (Lung CT Segmenter). In Lung CT Analyzer there is global thresholding within the lung regions to define emphysema, normal, infiltrated, and collapsed lung as volumetric segmentations. We included an airway analysis and the production of a vessel mask. The final goal is nodule and pattern recognition and full anatomic workup for surgical planning.

---

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://discourse.slicer.org/u/paolo)\
**Post date:** [April 19, 2023, 6:43pm UTC](https://discourse.slicer.org/t/information-about-lungctsegmenter/28976/7 "2023-04-19T18:43:53Z")

</div>

Thank you so much!

Paolo
