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

David Gobbi david.gobbi at gmail.com
Fri Mar 9 21:35:15 EST 2012


Yeah, looking through vtkAlgorithm and vtkExecutive, I can see how the
situation with inputs is different from e.g. Set/GetOutputData() where
the data object is just stored in and retrieved from an information
object.

 - David


On Fri, Mar 9, 2012 at 6:46 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
> 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
>
>



More information about the vtk-developers mailing list