# Colour Gradient Based on Pixel Density of Overlaid Segmentations?

**URL:** <https://discourse.slicer.org/t/colour-gradient-based-on-pixel-density-of-overlaid-segmentations/20294>\
**Category:** Support\
**Tags:** segmentation, extensions-manager\
**Created:** [October 21, 2021, 11:52pm UTC](https://discourse.slicer.org/t/colour-gradient-based-on-pixel-density-of-overlaid-segmentations/20294 "2021-10-21T23:52:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Greg](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@Greg](https://discourse.slicer.org/u/Greg)\
**Post date:** [October 25, 2021, 3:37pm UTC](https://discourse.slicer.org/t/colour-gradient-based-on-pixel-density-of-overlaid-segmentations/20294/5 "2021-10-25T15:37:38Z")

</div>

Hi Andras,

I am not terribly familiar with python (so after a few failed attempts) I used the method you mention under: [Segment / BinaryLabelMap to numpy array](https://discourse.slicer.org/t/segment-binarylabelmap-to-numpy-array/778).

Would this work for the problem?

---

_[View the full topic](https://discourse.slicer.org/t/colour-gradient-based-on-pixel-density-of-overlaid-segmentations/20294)._
