[vtkusers] Using Python VTK to add more points, lines on callback
Cory Quammen
cory.quammen at kitware.com
Wed Oct 7 09:01:41 EDT 2015
Shakthi,
Have you made any progress on this? I tried to run your code example, but
don't have Paho installed. Maybe you could modify your code to not use
multiprocessing and get the Render() function to work serially. This will
rule out some unknown interaction with the multiprocessing module.
Thanks,
Cory
On Fri, Sep 25, 2015 at 2:31 PM, Shakthi Kannan <shakthimaan at gmail.com>
wrote:
> Hi,
>
> I am now able to get data from a separate process on to a queue, and
> send it to vtkTimerCallback(), but, the image is not rendering. I have
> used self.actor.GetProperty().SetColor() and
> iren.GetRenderWindow().Render() in the callback.
>
> How else can I force it to render the image?
>
> The latest code is available at:
>
> https://gist.github.com/shakthimaan/d8e4f51f3d074926e244
>
> Thanks!
>
> SK
>
> On Thu, Sep 24, 2015 at 10:34 PM, Shakthi Kannan <shakthimaan at gmail.com>
> wrote:
> > Hi,
> >
> > I would like to render lines using a Python callback method and VTK. I
> > am using the following code snippet as a template:
> >
> >
> http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/LongLine
> >
> > and the follow examples for a callback function:
> >
> > http://cmake.org/Wiki/VTK/Examples/Python/Animation
> >
> > http://public.kitware.com/pipermail/vtkusers/2010-January/056316.html
> >
> > Changing the colour of the line using the callback method after 5s
> > works fine. But, I am not sure how to add more points and lines to the
> > existing image. My hacked up code is here:
> >
> > https://gist.github.com/shakthimaan/588af4b6d0facdf2cc89
> >
> > How do I incrementally add lines to an existing drawing, and render them?
> >
> > Appreciate your help in this regard,
> >
> > Thanks!
> >
> > SK
> >
> > --
> > Shakthi Kannan
> > http://www.shakthimaan.com
>
>
> --
> Shakthi Kannan
> http://www.shakthimaan.com
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
--
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151007/e55f335b/attachment.html>
More information about the vtkusers
mailing list