[vtkusers] pipelines connections

David Gobbi david.gobbi at gmail.com
Sun Dec 6 07:35:27 EST 2009


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



More information about the vtkusers mailing list