[vtkusers] Pipeline Basic Question

David E DeMarle dave.demarle at kitware.com
Tue Mar 3 15:12:55 EST 2009


i)

However, filters can have multiple inputs and outputs.

If c has two inputs, you can say.
c.SetInputConnection(0, b.GetOutputConnection(0));
c.SetInputConnection(1, x.GetOutputConnection(0));

Then c will have access to both b and x and can use them both when it
makes its output.


On Tue, Mar 3, 2009 at 2:49 PM, Paulo Henrique Junqueira Amorim
<paulojamorim at gmail.com> wrote:
> I didn't manage to find the answer to this basic question in Google or
> in VTK books, hope someone might help...
>
> Having an original pipeline (all vtkImageData filters):
> A -> B -> C -> D
>
> Whose code is:
> a = vtkA()
> b = vtkB()
> b.SetInput(a.GetOutput())
> c = vtkC()
> c.SetInput(b.GetOutput())
> d = vtkD()
> d.SetInput(c.GetOutput())
>
> If in a certain moment inside the software developed, after the
> creation of this pipeline, we change the input of a intermediate
> filter, e.g.:
>
> c.SetInput(x.GetOutput())
>
> What will happen when we apply Render to the pipeline interactor (viewer)?
>
> (i) The original pipeline will be lost, and the new pipeline will be:
> X -> C -> D
>
> (ii) This new input will be ignored, and the original pipeline will be kept:
> A->B->C->D
>
> (iii) We will be able to access data provided from both inputs,
> setting a specific flag
>
> (iv) Something else. In this case, what will happen?
>
> Thanks in advance!
> _______________________________________________
> 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
>
>



-- 
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



More information about the vtkusers mailing list