# How to use volume histogram widget in my module

**URL:** <https://discourse.slicer.org/t/how-to-use-volume-histogram-widget-in-my-module/14782>\
**Category:** Development\
**Created:** [November 26, 2020, 8:58am UTC](https://discourse.slicer.org/t/how-to-use-volume-histogram-widget-in-my-module/14782 "2020-11-26T08:58:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ond12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ond12/32/8706_2.png) [@ond12](https://discourse.slicer.org/u/ond12)\
**Post date:** [November 26, 2020, 8:58am UTC](https://discourse.slicer.org/t/how-to-use-volume-histogram-widget-in-my-module/14782/1 "2020-11-26T08:58:33Z")

</div>

Hello,

I want to add the “Histogram” in my module ![histoslicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/4/74cb67fef0eea7af975025f31a50576d8e1927aa.png)

I find the module UI use a " ctkCollapsibleGroupBox" and inside a " ctkTransfertFunctionView" but it’s does not work in my module.

Can you help me, how can i add this same histogram in my own module ?

Thanks

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [November 26, 2020, 9:37am UTC](https://discourse.slicer.org/t/how-to-use-volume-histogram-widget-in-my-module/14782/2 "2020-11-26T09:37:33Z")

</div>

> [@ond12](#):
>
> but it’s does not work in my module

We need more information about this part in order to help.

For starters, I’d suggest taking a look at how the transfer function view is used in the widget in Slicer: [Slicer/Modules/Loadable/Volumes/Widgets/qSlicerScalarVolumeDisplayWidget.cxx at main · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/blob/master/Modules/Loadable/Volumes/Widgets/qSlicerScalarVolumeDisplayWidget.cxx#L69-L70)
