[vtkusers] pipelines connections
David Doria
daviddoria+vtk at gmail.com
Sun Dec 6 08:30:42 EST 2009
On Sun, Dec 6, 2009 at 7:35 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Sun, Dec 6, 2009 at 4:16 AM, Jérôme <jerome.velut at gmail.com> wrote:
> > The new style connection concerns vtkAlgorithmOutput. In the case of a
> > comprehensive pipeline (Source -> Filters -> Mappers), this is completely
> > transparent, whenever you use old or new style.
>
> Yes. And I was wrong in my last post, the lack of a
> SetInputConnection() method on vtkImageActor was not just an
> oversight. There is a valid reason why it doesn't have this method:
> it is derived vtkProp3D, not from vtkAlgorithm. Of course, if it had
> a mapper like the other Prop3D classes then there would be no problem.
> (There actually is a vtkImageMapper in VTK, but it is something
> different, it isn't for vtkImageActor).
>
> > In the special case where no vtk source is used (meaning vtkAlgorithm
> with
> > no input), but a simple raw DataSet construction, there won't be any
> > "Producer". We cannot use the GetProducerPort( ) for the
> SetInputConnection(
> > ). If I understand well, using the old SetInput method is still valid?
>
> Hmm, what you say in the first sentence isn't quite right, but
> everything else that you say is correct. To put it plainly, using the
> old SetInput() method is necessary in the following cases:
>
> 1) If the data is coming from an object that isn't a vtkAlgorithm.
> 2) If the data is going into an object that isn't a vtkAlgorithm.
> 3) If the data is "naked" i.e. if you constructed the data object yourself.
>
> David
>
>
I think it would be worth putting together a little tutorial describing
these things with some little code snippets of examples of when to use
SetInput vs SetInputConnection - what do you guys think? It should be pushed
on the website to be high on the "things to read first" list for newcomers
to VTK.
Any volunteers?
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091206/eac16194/attachment.htm>
More information about the vtkusers
mailing list