# Mammographic density segmentation

**URL:** <https://discourse.slicer.org/t/mammographic-density-segmentation/10347>\
**Category:** Support\
**Created:** [February 19, 2020, 12:30am UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347 "2020-02-19T00:30:45Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolaco](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@paolaco](https://discourse.slicer.org/u/paolaco)\
**Post date:** [February 19, 2020, 12:30am UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/1 "2020-02-19T00:30:45Z")

</div>

Operating system: Windows 10  
Slicer version: 4.10.2

Hi, how to do a mammographic density segmentation in order to show automatic identification of breast density?

Thank you,  
Paola

---

<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:** [February 19, 2020, 2:20am UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/2 "2020-02-19T02:20:22Z")

</div>

Slicer has many tools for this kind of analysis. If you can write a bit more about what you would like to achieve (or provide reference to a paper that describes a workflow that is similar to what you would like to implement) then we can give more specific advice.

---

<div class="post-metadata">

**Author:** ![paolaco](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@paolaco](https://discourse.slicer.org/u/paolaco)\
**Post date:** [February 19, 2020, 8:59am UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/3 "2020-02-19T08:59:55Z")

</div>

I would like to achieve an automated brest density assessement. In the work I mention below the software automatically identified on the mammogram the pixel with higher intensities. The density was measured in percentage. It’s what I am willing to reproduce.

Thank you

DOI 10.25259/JCIS\_70\_2019

 ![a-Left-craniocaudal-mammogram-of-a-41-year-old-woman-with-a-negative-screening-exam-b.png](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/8/286fad20e68044a3d3c57bfa02085599ad07c272.png)

---

<div class="post-metadata">

**Author:** ![timeanddoctor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/timeanddoctor/32/5839_2.png) [@timeanddoctor](https://discourse.slicer.org/u/timeanddoctor)\
**Post date:** [February 19, 2020, 1:25pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/4 "2020-02-19T13:25:48Z")

</div>

You can segment the ROI(the white area and green area in your picture) and then get the each area statistic in segment statistic module.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/a/2abdfc776f93732f35c732fa145099948af899e1.png)

---

<div class="post-metadata">

**Author:** ![timeanddoctor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/timeanddoctor/32/5839_2.png) [@timeanddoctor](https://discourse.slicer.org/u/timeanddoctor)\
**Post date:** [February 19, 2020, 1:27pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/5 "2020-02-19T13:27:46Z")

</div>

> [@New module for measuring user statistics](https://discourse.slicer.org/t/new-module-for-measuring-user-statistics/9220/6):
>
> Thanks for the feedback. I’ve added a button to the user information popup to disable User statistics by a single button click (and tables are not created anymore if the feature is disabled). I’ve added a [bug report to track the slowdown issue](https://github.com/PerkLab/SlicerSandbox/issues/5).

---

<div class="post-metadata">

**Author:** ![paolaco](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@paolaco](https://discourse.slicer.org/u/paolaco)\
**Post date:** [February 19, 2020, 4:50pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/6 "2020-02-19T16:50:18Z")

</div>

Thank you. I am wondering if there is a way to segment automatically the ROI and to let the software calculate the pixel with higher density within that ROI.

---

<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:** [February 20, 2020, 4:00am UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/7 "2020-02-20T04:00:50Z")

</div>

If simple thresholding can segment the high-density area then the process can be made fully automatic very easily by writing a short Python script. See examples here: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How\_to\_run\_segment\_editor\_effects\_from\_a\_script](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script)

You may find [“create fat/muscle/bone segment by thresholding and report volume of each segment”](https://gist.github.com/lassoan/5ad51c89521d3cd9c5faf65767506b37) example particularly relevant. If the script works well then you can [make a Python scripted module out of it](https://www.slicer.org/wiki/Documentation/Nightly/Training#PerkLab.27s_Slicer_bootcamp_training_materials).

---

<div class="post-metadata">

**Author:** ![paolaco](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@paolaco](https://discourse.slicer.org/u/paolaco)\
**Post date:** [February 20, 2020, 5:32pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/8 "2020-02-20T17:32:05Z")

</div>

By thresholding the segmentation seems suboptimal. In the picture I posted the author could “colour” just the fibroglandular breast parenchyma.  
Thank you

---

<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:** [February 20, 2020, 6:50pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/9 "2020-02-20T18:50:22Z")

</div>

The screenshot in the image indicates that the authors used “Level tracing” effect in Editor module (which correspongs to “Segment Editor” module in current Slicer version).

---

<div class="post-metadata">

**Author:** ![paolaco](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@paolaco](https://discourse.slicer.org/u/paolaco)\
**Post date:** [February 20, 2020, 7:11pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/10 "2020-02-20T19:11:58Z")

</div>

I had the same intuition but selecting “Level tracing”, the program don’t let me do any operation on the DICOM file. I thought there was the need of doing something else before but can’t find it.  
Thank you

---

<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:** [February 20, 2020, 7:16pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/11 "2020-02-20T19:16:46Z")

</div>

Once you have your segment highlighting the region of interest, you can follow the steps described [above](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/5) to get the density. Would you expect to do any other operation on the DICOM file?

---

<div class="post-metadata">

**Author:** ![SOFIA\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sofia_r/32/66469_2.png) [@SOFIA\_R](https://discourse.slicer.org/u/SOFIA_R)\
**Post date:** [August 18, 2023, 1:20am UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/12 "2023-08-18T01:20:41Z")

</div>

Hi, i want to know how to make dense tissue segmentation from tomosynthesis images?  
thank you

---

<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 18, 2023, 9:01pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/13 "2023-08-18T21:01:30Z")

</div>

If dense tissue appears bright then you can segment it using Threshold effect in Segment Editor module.

---

<div class="post-metadata">

**Author:** ![SOFIA\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sofia_r/32/66469_2.png) [@SOFIA\_R](https://discourse.slicer.org/u/SOFIA_R)\
**Post date:** [August 20, 2023, 1:38am UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/14 "2023-08-20T01:38:55Z")

</div>

Ok but i will have to do that on every slice, i’m guessing ?

---

<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 20, 2023, 7:22am UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/15 "2023-08-20T07:22:47Z")

</div>

Thresholding is performed for the entire 3D volume. No need to do it for every slice.

In general, in 3D Slicer all data is specified in 3D and all operations (with very few exceptions) are performed in 3D.

---

<div class="post-metadata">

**Author:** ![SOFIA\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sofia_r/32/66469_2.png) [@SOFIA\_R](https://discourse.slicer.org/u/SOFIA_R)\
**Post date:** [August 20, 2023, 2:17pm UTC](https://discourse.slicer.org/t/mammographic-density-segmentation/10347/16 "2023-08-20T14:17:12Z")

</div>

Ok. And how do i make a 3D volume from the tomosynthesis images? I’m starting to use 3D slicer for the first time, so if you could post a screenshot of the steps i have to do, i’d be very grateful.
