# Lung airway segmentation

**URL:** <https://discourse.slicer.org/t/lung-airway-segmentation/2467>\
**Category:** SlicerCIP\
**Tags:** cip\
**Created:** [March 29, 2018, 7:52am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467 "2018-03-29T07:52:53Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [April 11, 2018, 7:20am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/21 "2018-04-11T07:20:17Z")

</div>

one more thing sir. i am loading and viewing dicom image as ‘dicom\_021.dcm’ containing some 450 images. is it possible to convert it to ‘dicom\_021/_.dcm’ where '_’ represents 459 image set using slicer. hope i have put my question correctly

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [April 11, 2018, 12:18pm UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/22 "2018-04-11T12:18:53Z")

</div>

sorry. Actually i wrote convert to dicom\_021/\*.dcm’. don’t know why \* didn’t show in my earlier message

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 11, 2018, 1:22pm UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/23 "2018-04-11T13:22:46Z")

</div>

> Actually i wrote

You can go back and edit your posts. Please do so instead of writing additional posts.

`*` is a formatting character in markdown. If you need verbatim display of text containing formatting characters then select the text and click ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/f/9f47e5506cce2c2cfb0575f82414e6a5f486c761.png) button in the editor.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 18, 2018, 2:13pm UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/24 "2018-04-18T14:13:51Z")

</div>

A post was split to a new topic: [Show two volumes overlaid](https://discourse.slicer.org/t/show-two-volumes-overlaid/2626)

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [April 20, 2018, 6:41am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/25 "2018-04-20T06:41:27Z")

</div>

sir i have attempted lung vessel segmentation. how can i remove very smallbroken pieces of segmented results and also make vessels smooth using slicer?

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [April 26, 2018, 9:06am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/26 "2018-04-26T09:06:34Z")

</div>

how can i view int16 dicom images with HU units in 3D slicer. many codes are with Hu units of dicom images.  
sorry to ask but are my questions not relevant to be answered sir.  
regards

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 26, 2018, 9:30pm UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/27 "2018-04-26T21:30:54Z")

</div>

Slicer should be displaying HU if the dicom header is correct. Do you have a reason to think the pixels are not in HU?

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [May 3, 2018, 10:31am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/28 "2018-05-03T10:31:05Z")

</div>

thanks for reply  
sir i want to know two things:

1. how to give seed points in simple region growing module
2. after region growing, how can i find areas of segmented region and remove areas smaller than a threshold.  
pl suggest

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 3, 2018, 12:09pm UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/29 "2018-05-03T12:09:01Z")

</div>

Hi @anitakh1 - have a look at the segmentation tutorials and documentation - you’ll find lots of ways to do define regions and use thresholds:

[https://www.slicer.org/wiki/Documentation/4.8/Training#Segmentation](https://www.slicer.org/wiki/Documentation/4.8/Training#Segmentation)

Cheers,  
Steve

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [May 15, 2018, 12:55pm UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/30 "2018-05-15T12:55:51Z")

</div>

hello. i am stuck badly. i did some segmentation work and stored the image volume as .nrrd using slicer. but when i am opening single images in matlab, image is opening in double format but pixel values as not between [0 1] (as is the case with double image in matlab) but in numbers like 45, 23 etc . this is creating problem for me to run an algorithm in matlab. pl help to read each image in matlab as double image between [0 1].

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 19, 2018, 3:14pm UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/31 "2018-05-19T15:14:57Z")

</div>

You can use the nrrd file reader/writer (nrrdread.m and nrrd write.m) in Slicer MatlabBridge, which work correctly: [https://github.com/PerkLab/SlicerMatlabBridge/tree/master/MatlabCommander/commandserver](https://github.com/PerkLab/SlicerMatlabBridge/tree/master/MatlabCommander/commandserver)

Note that segmentation result is stored in a 4D array, each segment is a 3D array in it.

You may use Slicer’s MatlabBridge extension for running Matlab functions directly from Slicer: [https://www.slicer.org/wiki/Documentation/Nightly/Extensions/MatlabBridge](https://www.slicer.org/wiki/Documentation/Nightly/Extensions/MatlabBridge)

At some point, you may consider moving from Matlab environment to Python, as there are much better and many more tools for medical image computing in Python packages and in Slicer and there are no licensing hassles.

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [May 21, 2018, 9:29am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/32 "2018-05-21T09:29:35Z")

</div>

thanks a lot. sir can i get some training on slicer and matlab bridge module in india. it would be quite helpful

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 23, 2018, 4:07pm UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/33 "2018-05-23T16:07:48Z")

</div>

A post was split to a new topic: [Vessel tracking algorithm on lung CT](https://discourse.slicer.org/t/vessel-tracking-algorithm-on-lung-ct/2913)

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [June 7, 2018, 12:51am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/34 "2018-06-07T00:51:17Z")

</div>

hello sir. can you please help me. i made some code and applied it on .raw volume data where pixel intensities were positive numbers. but rest of the data i have has HU units both positive and negative. my code is not working properly on these HU units. pl guide me how to get .raw file with all positive pixel values. i am not sure but some window level change is required i think. pl tell me how. my work has stopped because of that. regards

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 7, 2018, 2:26am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/35 "2018-06-07T02:26:46Z")

</div>

How did you create the .raw file? How did you read it? Did you implement processing in Matlab, Python, or C++?

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [June 7, 2018, 3:12am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/36 "2018-06-07T03:12:32Z")

</div>

I made code in python using simpleitk, numpy etc. but region growing works well when pixel intensity is \>0. So how to change pixel range of ,raw n make all positive. Thanks

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [June 7, 2018, 3:15am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/37 "2018-06-07T03:15:55Z")

</div>

Sorry. I think u asked about file. Well i downloaded the file from vessel12 data n did 7zip to get .mhd n .raw folder but HU units are -&+ as usual. I m reading it on slicer.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 7, 2018, 4:03am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/38 "2018-06-07T04:03:24Z")

</div>

> [@anitakh1](#):
>
> region growing works well when pixel intensity is \>0

Have you implemented region growing or you used SimpleITK or VTK filters?

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [June 7, 2018, 4:34am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/39 "2018-06-07T04:34:46Z")

</div>

I used region growing using simpleitk command on raw images with pixel intensity above zero.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 7, 2018, 11:46am UTC](https://discourse.slicer.org/t/lung-airway-segmentation/2467/40 "2018-06-07T11:46:17Z")

</div>

Which SimpleITK command?

[Previous page](https://discourse.slicer.org/t/lung-airway-segmentation/2467.md?page=1)

[Next page](https://discourse.slicer.org/t/lung-airway-segmentation/2467.md?page=3)
