[vtkusers] VTK observer for vtkDataArray objects

Bill Lorensen bill.lorensen at gmail.com
Tue Oct 24 19:16:33 EDT 2017


I recall that the data arrays do not change the modified time because
of efficiency. You can explicitly call Modified each time you add a
value.

On Tue, Oct 24, 2017 at 3:45 PM, Marcelo Duarte Trevisani
<marceloduartetrevisani at gmail.com> wrote:
> I tried to use
> AddObserver(vtkCommand::ModifiedEvent, ...)
>
> but when I add a value into the vtkDataArray the observer doesn't work, I
> have to explicit call the method Modified(), there is another way to do
> data? I just want to call a function after the vtkDataArray is modified like
> when I insert a value or remove it.
>
> Thanks in advance.
>
>
> On Tue, Oct 24, 2017 at 5:14 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Use
>>
>> AddObserver(vtkCommand::ModifiedEvent
>>
>> On Tue, Oct 24, 2017 at 11:54 AM, Marcelo Duarte Trevisani
>> <marceloduartetrevisani at gmail.com> wrote:
>> > Hello folks,
>> >
>> > I was just wondering if there is a way to set an observer for a
>> > vtkDataArray. I want to set a observer for a vtkDoubleArray (for
>> > example)
>> > and when the object change it will call a function in python. Does
>> > anyone
>> > know a way to do this?
>> >
>> > --
>> > Marcelo Duarte Trevisani
>> >
>> > "Success is walking from failure to failure with no loss of enthusiasm."
>> > Winston Churchill
>> >
>> > _______________________________________________
>> > 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
>> >
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
>
> --
> Marcelo Duarte Trevisani
>
> "Success is walking from failure to failure with no loss of enthusiasm."
> Winston Churchill



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtkusers mailing list