[vtkusers] 'live' 2D plot : feasible ?

guillaume ranquet granquet at wyplay.com
Fri Jul 17 08:05:37 EDT 2009


Thanks Gerrick for your input :)

I'm currently in the 'cloud of classes' of the vtk documentation.
I don't need a spline (more a collection of lines), so I'm thinking of a
vtkXYPlotWidget (which contains a XYPlotActor) and a vtkPolyData.
I don't know If I need a vtkProbeFilter, it seems to be only of use for
transformations and projections (which I don't need for the moment)
It's still blurry on how to update smoothly the plot with new points.
just adding them to the vtkPolyData seems a bit too easy : there must be
a 'sync' somewhere?

is a :
MyPolyDataObj.InsertNextPoint(mx, my, 0)
MyPolyDataObj.Update()

enough to refresh my plot properly?
I don't see anything in the vtkXYPlotWidget/XYPlotActor that permits to
refresh the view of the data?

Guillaume.

Gerrick Bivins wrote:
> Hi Guillaume,
> I've successfully (for the most part) used XYPlot similar to the the way
> you've described. I use a spline widget to update a the chart while probing
> a 3d a dataset. The hard part is making sure the spline probe output stays
> synced with the xyplot. This involved setting up the callbacks for the
> widget so that any interaction with it constantly updated the filter. Also I
> had to make sure the probe output had enough "valid points" to display a
> sensible chart. This issue dealt mainly with my dataset being a vtkComposite
> dataset so if your data is a vtkDataSet (or subclass of) then you should be
> good to go.
> 
> Gerrick
> 
> 
>  
> 
> 
> On 7/16/09 8:57 AM, "guillaume ranquet" <granquet at wyplay.com> wrote:
> 
>> Hi list.
>> I've been trying to find out if vtk could be used as a live 2D plotting
>> tool (plot as the data comes in)?
>> I'm working with Python, I stumbled upon
>> Examples/Annotation/Python/xyPlot.py which is a good start for my goal.
>> But I can't figure out how to animate a 2D plot nor if it's a good idea
>> (maybe I'm the only one around being silly enough to use VTK for that
>> kind of plotting)
>>
>> and second question: is there a Python Documentation? I'm a bit lost
>> with the Cpp doxygen, trying to find out what is mapped to what :S
>> ----
>> This message contains confidential information and may contain information
>> that is legally privileged.  If you have received this message by mistake,
>> please immediately notify us and delete the original message. Thank you.
>>
>> Ce message contient des informations confidentielles.  S'il vous est parvenu
>> par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire
>> aucun usage et de n'en garder aucune copie.
>> ----
>> _______________________________________________
>> 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
> 

----
This message contains confidential information and may contain information that is legally privileged.  If you have received this message by mistake, please immediately notify us and delete the original message. Thank you.  

Ce message contient des informations confidentielles.  S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie.
----



More information about the vtkusers mailing list