Re: [wxVTK] about wxVTK
Brought to you by:
malat
From: Mathieu M. <mma...@ny...> - 2005-04-20 03:11:08
|
Francesco, I'll try my best to answer this, but this looks like a question more appropriate to the vtkusers mailing list (remember wxVTK does not bring anything). > well, I would like to create a plotter with two main features (which are > lacking from a lot of other packages out there): > > 1) user-interaction: I would like to be able to intercept user clicks on > the plot and then perform some actions if the click was over the > function plot, some others if user clicked over the axes and so on... I > could not find a plot package with something like a HitTest function > which tells me which part of the plot is tied to (x,y); can VTK do this ? > 2) animated plots: I would like to be able to render flickering-free > animating plots (imagine a parametric function plot where the user can > see the different plots for different values of the parameter in real > time...); I suppose VTK should have no excessive problems to do this.... > is it ? VTK definitely support user click/interaction. You should maybe download paraview just for a try. Then start paraview open a dataset that comes with it, do a 'probe', select line from the left panel. You'll get an histogram you can export as CSV file. You can move it around with 2D mouse, and if you move the probe line you'll see that the histogram reflect the dataset being probe. (a nice example to probe could be vox8_bin.vtk). > My program could give to VTK a dataset which it then would plot; another > question: can I draw axes and labels with VTK ? Yes and yes, you can select fonts for the labels... Have a look at the doxygen here: http://www.vtk.org/doc/nightly/html/classvtkXYPlotActor.html > I'm asking you because I've been searching a good plot packages flexible > enough to give me those two features I told you before; I've found a LOT > of plotting packages but when you select those which are: > > 1) open source (gnuplot, for example, is not GPL) Be carefull here, VTK is BSD like ! > 2) written in c++ ok > 3) cross-platform VTK compiles on almost any plateform / compilers out there !! > you'll find that the list is not so long ;-) > I thought that with some additional work in my program (basically to do > the dataset creation) I could solve my problems with wxVTK... Again Francesco I have to warn you, VTK is really build on top of OpenGL. So using VTK for simple 2D plot seems to me quite akward. Even if I haven't search for package as you seems to have been doing, I would have another look before staring learning VTK if you plan to only use this very subset of VTK. Mathieu Did you search for project on freshmeat.net, sf.net, gnu.org. I would also check with the gnumeric people what they use internally for displaying charts. My 2 cents, Mathieu |