[vtkusers] pipeline update

Amy Squillacote ahs at cfdrc.com
Tue Apr 22 13:40:18 EDT 2008


Hi Adrian,

A call to Update() in VTK does propagate back to earlier filters in the 
pipeline. However, the pipeline checks whether the a filter is 
up-to-date before calling Update() on it, so as long as you don't make 
any changes to the instance of vtkImageGradientMagnitude between calling 
Update() on it and calling Update() on the instance of vtkImageGradient, 
each filter should perform its computation only once.

- Amy

Adrian Albert wrote:
>
> Dear All,
>
>
> I have a question about the pipeline update mechanism in VTK: If I 
> call Update () on an algorithm that has as input the output of another 
> algorithm, does the Update command propagate down the pipeline and 
> causes a recomputation for all algorithms involved?
> For example, this code should calculate the gradient of the gradient 
> magnitude (a measure of a second order derivative):
>
>   // Gradient magnitude
>   vtkImageGradientMagnitude* grad = vtkImageGradientMagnitude::New();
>   grad->SetDimensionality( 3 );
>   grad->SetInput (this->GetMultivariateField (whichField)); 
>   grad->Update ();
>
>   // Gradient of gradient magnitude
>   vtkImageGradient* gradGrad = vtkImageGradient::New();
>   gradGrad->SetDimensionality( 3 );
>   gradGrad->SetInput (grad->GetOutput ());
>   gradGrad->Update ();
>  
> Specifically, would I cause two computations of the gradient magnitude 
> (first 4 lines of code) by calling Update twice?
>
> Thanks!
> Adrian
>
> -- 
> ---------------------------------------------------
> Adrian Albert
> School of Engineering and Science
> Jacobs University Bremen
> Germany
> Tel.: 00494212003258
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list