[vtkusers] displaying histogram using vtkImageAccumulate

David Gobbi david.gobbi at gmail.com
Tue Jul 20 11:50:52 EDT 2010


Hi Prathamesh,

The output of vtkImageAccumulate must be plotted in order to show the histogram:
http://www.vtk.org/Wiki/VTK/Examples/Images/HistogramXYPlot

  David



On Tue, Jul 20, 2010 at 8:44 AM, Prathamesh Kulkarni
<prathameshmkulkarni at gmail.com> wrote:
>
> Hello all,
>
> I want to be able to display histogram of a part of an image. Following is
> what I did so far:
>
> image_accumulate->SetInput(vtkImageData);
> image_accumulate->SetStencil(vtkImageStencilData);
> image_accumulate->Update();
>
> histogram_image = image_accumulate->GetOutput();
> histogram_image->Update();
>
>
> When I cast the histogram image to unsigned char and render it using
> vtkImageActor, I see a blank white image. Am I missing something here?
>
>
> Thanks,
> Prathamesh
>
>
>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list