# \[Scalar Volume Display Widget\] Blue line missing in histogram

**URL:** <https://discourse.slicer.org/t/scalar-volume-display-widget-blue-line-missing-in-histogram/21518>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [January 18, 2022, 6:02pm UTC](https://discourse.slicer.org/t/scalar-volume-display-widget-blue-line-missing-in-histogram/21518 "2022-01-18T18:02:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![strider\_hunter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/strider_hunter/32/8253_2.png) [@strider\_hunter](https://discourse.slicer.org/u/strider_hunter)\
**Post date:** [January 18, 2022, 6:02pm UTC](https://discourse.slicer.org/t/scalar-volume-display-widget-blue-line-missing-in-histogram/21518/1 "2022-01-18T18:02:38Z")

</div>

Hi,  
I have a ScalarVolume which has values in the range of [0,0.5]. When I view the histogram of this ScalarVolume, I am unable to understand it due to the missing blue line.

 ![Slicer-VolumeDisplayWidget](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/a/fa5868ca17432096b4f90214af339dc912762edb.png)

* * *

I have another ScalarVolume (a CT scan) with values in the range of [-1000, 2000]. When I view the histogram of this ScalarVolume, I am able to understand the histogram due to the presence of the blue line.  
 ![Slicer-VolumeDisplayWidget-1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/1/315203001193f0fef32d03362d1c433d7f1f1275.png)

Why is this happening? Is this a bug or am I incorrectly using/interpreting the histogram.

* * *

I’m using Slicer 4.11.0. This question is closely related to [another post](https://discourse.slicer.org/t/qslicerscalarvolumedisplaywidget-adding-user-defined-histogram-to-this/21448)

---

<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:** [January 19, 2022, 5:46am UTC](https://discourse.slicer.org/t/scalar-volume-display-widget-blue-line-missing-in-histogram/21518/2 "2022-01-19T05:46:38Z")

</div>

Bin size of 1 works well for integer-valued volumes, but for floating-point volumes the bin size need to be determined from the scalar range of the volume. The current implementation always used the bin size of 1.

I’ve fixed the issue now. The Slicer Preview Release that you download on 2022-01-20 or later will display the histogram correctly for floating-point volume types.

---

<div class="post-metadata">

**Author:** ![strider\_hunter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/strider_hunter/32/8253_2.png) [@strider\_hunter](https://discourse.slicer.org/u/strider_hunter)\
**Post date:** [January 20, 2022, 9:31am UTC](https://discourse.slicer.org/t/scalar-volume-display-widget-blue-line-missing-in-histogram/21518/3 "2022-01-20T09:31:26Z")

</div>

> [@lassoan](#):
>
> … The Slicer Preview Release that you download on 2022-01-20 or later will display the histogram correctly for floating-point volume types …

Thank you @lassoan for this update. I am now able to view the blue line for the floating-point volumes as well.

![Slicer-FloatingPointHistogram](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/8/c835dfa73cc800485ba798dc5b5d98dbc9685a71.png)

I had a feature request regarding the colormap used in the histogram. Currently it used the “Gray” colormap for all volumes, but I use a different colormap for my volumes (i.e. WarmShade2). Is this change possible?
