[vtkusers] vtkChartXY
Eric E. Monson
emonson at cs.duke.edu
Tue Oct 19 06:54:44 EDT 2010
Hey Hagen,
I'll let Marcus reply to most of the specifics, but I just wanted to make sure you knew about a couple things that might help a bit.
> In my opinion it would be really nice having a method like vtkPlot::SetInput(vtkDataSet*, vtkDataSet*) or vtkPlot::SetInput(vtkDataSet*, vtkDataSet*, int iNumPoints).
Have you seen vtkDataObjectToTable?
http://www.vtk.org/doc/nightly/html/classvtkDataObjectToTable.html
Maybe it would be fine to add the complication of your proposed methods, but with this it might not be necessary.
> 3. Removing a plot from a chart works with an index. Would it be possible to use (unique) identifiers (just a number). Lets imagine a vtkPlot object holds an identifier and vtkChartXY::RemovePlot(int iIdentifier) will remove this plot object. Assume you have a large number of plots and you would like to display only a few of them. Right now I would have to manage the indices of the shown plots and map them to a list of available plots. Furthermore assume one plot gets deleted from/added to the list of available plots... Working with identifiers would make it a lot easier.
There is also a method RemovePlotInstance(vtkPlot *plot) to go along with the AddPlot(vtkPlot *plot) in which case you could think of the pointer as a unique identifier when you need to add/remove individuals and just keep track of those.
http://www.vtk.org/doc/nightly/html/classvtkChart.html
> I can help programming the stuff if you give me some details about the vtkChartXY class.
Please don't be offended if this is obvious to you, but all of the source code is available to download. Since you were wanting the extra control Marcus just built in for the axis labels, and it sounds like you'd like to contribute code, I would encourage you to get the latest development code from Git.
http://www.vtk.org/VTK/resources/software.html
Have a good day,
-Eric
------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group
More information about the vtkusers
mailing list