I tried to set the value of each point with SetPointComponent, but it didn’t seem to work.
Or who knows how to use AddDataSetInput to input one-dimensional int array, please let me know, thank you!
vtkSmartPointer<vtkXYPlotActor> histogramPlot =
vtkSmartPointer<vtkXYPlotActor>::New();
// histogramPlot->AddDataSetInput(ImageAccumulate->GetOutput());
for(int i=0; i<pLen; i++){
histogramPlot->SetPointComponent(i, value[i]);
qDebug() << "SetPointComponent:" << histogramPlot->GetPointComponent(i);
}