# Fetal lung volume calculation

**URL:** <https://discourse.slicer.org/t/fetal-lung-volume-calculation/578>\
**Category:** Support\
**Created:** [June 27, 2017, 9:41am UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578 "2017-06-27T09:41:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Egor](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@Egor](https://discourse.slicer.org/u/Egor)\
**Post date:** [June 27, 2017, 9:41am UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578/1 "2017-06-27T09:41:09Z")

</div>

What module should I use to calculate the volume of the fetal lungs? Is there any guide for it? I want to measure it by subtracting mediastinal volume from total thoracic volume.

---

<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 27, 2017, 11:22am UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578/2 "2017-06-27T11:22:11Z")

</div>

Segment the structures using Segment editor and compute volumes using Segment statistics module.

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [June 27, 2017, 12:00pm UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578/3 "2017-06-27T12:00:21Z")

</div>

See also

> **[Chest Imaging Platform (CIP)](https://chestimagingplatform.org/)**
>
> Chest Imaging Platform (CIP)

---

<div class="post-metadata">

**Author:** ![Egor](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@Egor](https://discourse.slicer.org/u/Egor)\
**Post date:** [August 4, 2017, 11:54am UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578/4 "2017-08-04T11:54:26Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/e/dea550ce25f132620fe6f395b23779074e8ce04d.png)  
How can I smooth the edges?

Which of the volumes is correct? LM? GS?

---

<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:** [August 4, 2017, 1:08pm UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578/5 "2017-08-04T13:08:47Z")

</div>

The main problem with this segmentation is that it is created from a volume that has spacing between slices that is about 10x larger than pixel spacing within a slice. Use `Crop Volume` module to resample the volume with isotropic voxel size by checking `Isotropic spacing` checkbox and selecting `B-spline` interpolation. It is also advisable to set the region of interest to be just slightly larger than your region of interest (crop the rest of the volume to reduce memory need and processing time during segmentation).

After this, segment the lungs again. It seems that contrast between lungs and surrounding structures are quite good, so you may can segment very quickly and accurately using `Grow from seeds` effect or `Watershed` effect (to get `Watershed` effect, install `SegmentEditorExtraEffects` extension).

Difference between LM and GS volume is that GS only considers that region that is included in both the segment and the selected grayscale volume node. Usually the grayscale volume contains the whole segment and so the LM and GS volumes are the same.

---

<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:** [August 4, 2017, 1:31pm UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578/6 "2017-08-04T13:31:50Z")

</div>

Also it appears that the fetal lungs moved during the acquisition, leading to the stair-step appearance of the segmentation. It’s possible that the volume calculation from the labelmap is fairly accurate even if the 3D reconstruction is not anatomically correct.

---

<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:** [August 4, 2017, 3:26pm UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578/7 "2017-08-04T15:26:58Z")

</div>

Good point, Steve. At first look, it seemed to me that the staircase artifacts are due to large slice spacing, but maybe you are right that it’s due to motion. Either way, resampling to isotropic voxel size will not hurt.

You may reduce staircase artifacts by using `Smoothing` effect. Try different smoothing methods and parameters and browse through slices to check how well the smoothed segment matches the organ’s shape. If they are not good (not smooth enough or oversmoothed), then you can just undo the smoothing and try with different method or parameter setting.

---

<div class="post-metadata">

**Author:** ![Egor](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@Egor](https://discourse.slicer.org/u/Egor)\
**Post date:** [August 7, 2017, 7:10am UTC](https://discourse.slicer.org/t/fetal-lung-volume-calculation/578/8 "2017-08-07T07:10:46Z")

</div>

Thank you very much!
