[vtkusers] How to detect change/update of input inside algorithm?

David E DeMarle dave.demarle at kitware.com
Mon Jul 23 10:24:47 EDT 2012


You shouldn't have to. The vtkDemandDrivenPipeline executive makes
sure that RequestData is _only_ called when the input changes or the
parameters of the algorithm itself changes. See
vtkDemandDrivenPipeline::NeedToExecuteData for how the various MTimes
are calculated and used to do that.

If the "input" is not a standard pipeline input (say a pointer to
something that you manage rather than an upstream data object or
algorithms output that you've called SetInputData/SetInputConnection
to assign) then you can override the algorithm's GetMTime to take that
object's mtime into account too when the algorithm is check in
NeedToExecuteData. See vtkClipPolyData an example.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Sat, Jul 21, 2012 at 8:39 PM, Jana Sefcikova <neollie at gmail.com> wrote:
> Hi all,
> how can be detected change or update of input vtkPolyData inside
> vtkPolyDataAlgorithm ?
> In RequestData storing the pointer and comparing it with incoming pointer ?
> (but what if pointer stays but input changed its properties or topologies
> or s.t else)
>
> Jana
>
>
>
> _______________________________________________
> 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
>



More information about the vtkusers mailing list