# Histogram from vtkTable

**URL:** https://discourse.vtk.org/t/histogram-from-vtktable/7519
**Category:** Support
**Created:** [December 29, 2021, 7:46am UTC](https://discourse.vtk.org/t/histogram-from-vtktable/7519 "2021-12-29T07:46:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![drpeterfranz](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/f19dbf/32.png) [@drpeterfranz](https://discourse.vtk.org/u/drpeterfranz)
#### Post date: [December 29, 2021, 7:46am UTC](https://discourse.vtk.org/t/histogram-from-vtktable/7519/1 "2021-12-29T07:46:43Z")

</div>

I can’t find an appropriate filter to generate a 1D histogram from a vtkTable. There are classes to generate 2D histograms from images etc. I also found vtkmHistogram but when I build against the required variables then my application takes 2 minutes to start up.

So is there a better way to create 1D histograms?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [December 29, 2021, 12:21pm UTC](https://discourse.vtk.org/t/histogram-from-vtktable/7519/2 "2021-12-29T12:21:13Z")

</div>

ParaView has a vtkExtractHistogram filter, this should be put in VTK imo.

@cory.quammen

---

<div class="post-metadata">

### Author: ![drpeterfranz](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/f19dbf/32.png) [@drpeterfranz](https://discourse.vtk.org/u/drpeterfranz)
#### Post date: [December 29, 2021, 6:08pm UTC](https://discourse.vtk.org/t/histogram-from-vtktable/7519/3 "2021-12-29T18:08:15Z")

</div>

I had a quick look; it appears that this is exactly the kind of class I would like to have. It also does not appear to depend on any other paraview specific classes, so I would support that `vtkExtractHistogram` and `vtkPExtractHistogram` should be moved into the vtk project.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [December 30, 2021, 9:02am UTC](https://discourse.vtk.org/t/histogram-from-vtktable/7519/4 "2021-12-30T09:02:38Z")

</div>

This seems simple to do, If you open a MR on VTK for that, I can definitely assist you.

---

<div class="post-metadata">

### Author: ![drpeterfranz](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/f19dbf/32.png) [@drpeterfranz](https://discourse.vtk.org/u/drpeterfranz)
#### Post date: [December 30, 2021, 8:34pm UTC](https://discourse.vtk.org/t/histogram-from-vtktable/7519/5 "2021-12-30T20:34:25Z")

</div>

Have create MR, see [https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/8781](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8781)
