Skip to content

Copy vtkExtractHistogram code from paraview project.

Copy the code for vtkExtractHistogram from the paraview project into the vtk project to filters/statistics module.

Note the paraview project may fail to build since it will have the duplicate class in there. It should be disabled via a macro there which tests for the VTK version number. How do we resolve this best?

The vtkExtractHistogram class could be improved a bit:

  • The array names are currently hard-coded as "bin_extents" and "bin_values". Proper get/set methods should be used.
  • More functionality could be implemented. In particular it would be nice if optionally the class could create a normed histogram where the bins add up to 1.0, and an accumulated histogram. These could be user options and could be additional columns in the output table.

Note that paraview has implemented a vtkPExtractHistogram subclass which would take more work to move into the vtk project. If we would implement my suggestions above then the vtkPExtractHistogram code should also be modified to reflect these additional capabilities. In particular vtkPExtractHistogram already has a Normalize option.

Edited by Peter Franz

Merge request reports