[vtkusers] How to get the input to a filter as algorithm output?
David Gobbi
david.gobbi at gmail.com
Tue Dec 15 21:23:40 EST 2009
On Tue, Dec 15, 2009 at 6:50 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
>> The main concern that I have is that the first thing that any beginner
>> will attempt to do is connect the filter's input directly to their
>> internal mini-pipeline, and that is the wrong way to do it.
>
> I totally agree. I had this concern for a while. If I didn't worry about
> backwards compatibility, I would recommend changing SetInput/AddInput
> such that it did not set pipeline connectivity. So if I did
>
> foo->SetInput(dataObject);
>
> foo's input port would not be connected to dataObject's producer port.
> Foo would simply process dataObject when it executes. This would allow
> creation of mini pipelines without the shallow copy. (It would also make
> it possible to get rid of the stupid trivial producer).
>
> -berk
This isn't such a bad idea. VTK 5 introduced the new pipeline, so
maybe VTK 6 could deprecate the old pipeline. Then data objects could
just be data objects, and not have any update methods at all. I'd be
willing to audit the Imaging filters that still do things the old way.
Too bad that I still have so much code from the VTK 4 days... though I
guess that it can be nice to clean house sometimes.
David
More information about the vtkusers
mailing list