[vtk-developers] GetInputData() versus GetInput()

Berk Geveci berk.geveci at kitware.com
Fri Mar 9 20:46:55 EST 2012


I don't think it is as simple as renaming GetInput() to GetInputData().
There is indeed an asymmetry to the way these classes behave:

SetInputData() - sets a data object as input without creating a pipeline a
connection to whatever might have produced the data object
SetInputConnection() - sets up a pipeline connection to an algorithm
GetInput() - returns the input data object that may result from either of
the above functions

So GetInput() does not simply pair with SetInputData(). It's not like
SetInputData() sets a data member and GetInput() returns it. This is why I
left GetInput() alone.

-berk

On Fri, Mar 9, 2012 at 3:04 PM, Marcus D. Hanwell <
marcus.hanwell at kitware.com> wrote:

> Hi David,
>
> On Fri, Mar 9, 2012 at 2:18 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> > Hi Marcus,
> >
> > There is an asymmetry in the naming of the new SetInputData() method:
> >
> > void SetInputData(vtkDataObject *);
> > vtkDataObject *GetInput();
> >
> > Why is it SetInputData(), but just GetInput()?  The reason that I'm
> > concerned is that some of my wrapping tools require symmetry in the
> > naming of Get/Set methods in order to infer class properties.
> >
> That is a good point, and wrapping or no I think it would be good to
> restore the symmetry. Berk made the changes, it seems like something
> that we could change.
>
> Thanks,
>
> Marcus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120309/e19a2866/attachment.html>


More information about the vtk-developers mailing list