[vtkusers] A simple and efficient histogram class?
Bill Lorensen
bill.lorensen at gmail.com
Wed Sep 20 18:01:19 EDT 2017
And here is an example that uses ImageAccumulate and produces a bar chart.
https://lorensen.github.io/VTKExamples/site//Cxx/Images/ImageAccumulateGreyscale/
On Wed, Sep 20, 2017 at 5:06 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Here an example that uses vtkImageHistogram:
>
> https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageHistogram/
>
>
> On Wed, Sep 20, 2017 at 10:09 AM, Miguel Nunes <m.nunes at fratoria.com> wrote:
>> Hello,
>> I would like to ask this list about histograms in VTK c++. I have been a vtk
>> user for several years, but never had the need to use histograms through vtk
>> as I was using pure c++ and openGL.
>> Now, I would like to simply plot a basic histogram of a float 3d image. I
>> have taken a look at the examples provided but I find myself quite confused.
>> Honestly, for an advanced visualization toolkit I am quite surprised to
>> find
>> it so complicated. There are classes such as vtkPlot that allow bars, then
>> there is vtkBarChartActor, vtkImageAccumulate, vtkXYPlotActor,
>> vtkImageHistogramStatistics and vtkImageHistogram.
>>
>> It all needs to be remixed, connected and many properties have to be set
>> manually.
>>
>> Maybe I am missing a class (or the point), but in general terms I would like
>> to easily plot and render a simple histogram, like:
>>
>> myHistogram->setData( vtkImagaData *)
>> myHistogram->setXRange(range[2]) // clips values under and above the range
>> specified
>> myHistogram->setNumberOfBins(15) // calculates the bin width and each bins'
>> Y
>> myHistogram->update() //generate the whole thing
>> renderer->getActor()->setData(myHistogram)
>>
>> ...and then its done.
>>
>> Any chance this actually exist? Thank you very much!
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
--
Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list