[vtkusers] Image Histograms
Tobias Wissmüller
tobias at wissmueller.net
Sat Feb 8 13:43:56 EST 2003
Hi,
I am having problems with vtkImageAccumulate and computing a histogram with
it. I have a simple grey value image and fed it to vtkImageAccumulate. I
want to put the histogram in a vtkXYPlotActor or something similar.
The code I have so far, assuming that image is my vtkImageData I read from a
file:
vtkImageAccumulate* accu = vtkImageAccumulate::New();
vtkImageMapper* mapper = ...
vtkXYPlotActor* actor = ...
vtkRenderer* renderer = ...
vtkRenderWindow* window = ...
vtkRenderWindowInteractor* interactor = ...
accu -> SetInput(image);
mapper -> SetInput(accu->GetOutput());
actor -> SetMapper(mapper);
renderer -> AddActor(actor);
window -> AddRenderer(renderer);
interactor -> SetRenderWindow(window);
window -> Render();
interactor -> Start();
When I run it there is this error message from vtkXYPlotActor: Nothing to
plot?!
Does anyone have an idea? Thanks?
Bye,
Tobi
More information about the vtkusers
mailing list