In my opinion, it would not pollute the api, since the method is already defined by most (all?) subclasses of vtkAlgorithm.<br><br><br>$ grep "void SetInputData(int" Common/ExecutionModel/*h<br><br>Common/ExecutionModel/vtkAnnotationLayersAlgorithm.h:  void SetInputData(int index, vtkDataObject* obj);<br>

Common/ExecutionModel/vtkArrayDataAlgorithm.h:  void SetInputData(int index, vtkDataObject* obj);<br>Common/ExecutionModel/vtkCompositeDataSetAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkDataObjectAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>

Common/ExecutionModel/vtkDataSetAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkDataSetAlgorithm.h:  void SetInputData(int, vtkDataSet*);<br>Common/ExecutionModel/vtkDirectedGraphAlgorithm.h:  void SetInputData(int index, vtkDataObject* obj);<br>

Common/ExecutionModel/vtkGraphAlgorithm.h:  void SetInputData(int index, vtkDataObject* obj);<br>Common/ExecutionModel/vtkHierarchicalBoxDataSetAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkHyperOctreeAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>

Common/ExecutionModel/vtkImageAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkMultiBlockDataSetAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkPassInputTypeAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>

Common/ExecutionModel/vtkPiecewiseFunctionAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkPointSetAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkPointSetAlgorithm.h:  void SetInputData(int, vtkPointSet*);<br>

Common/ExecutionModel/vtkPolyDataAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkRectilinearGridAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkSelectionAlgorithm.h:  void SetInputData(int index, vtkDataObject* obj);<br>

Common/ExecutionModel/vtkStructuredGridAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>Common/ExecutionModel/vtkTableAlgorithm.h:  void SetInputData(int index, vtkDataObject* obj);<br>Common/ExecutionModel/vtkTemporalDataSetAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>

Common/ExecutionModel/vtkTreeAlgorithm.h:  void SetInputData(int index, vtkDataObject* obj);<br>Common/ExecutionModel/vtkUndirectedGraphAlgorithm.h:  void SetInputData(int index, vtkDataObject* obj);<br>Common/ExecutionModel/vtkUnstructuredGridAlgorithm.h:  void SetInputData(int, vtkDataObject*);<br>

<br><br><br>Pat<br><br><div class="gmail_quote">On Fri, Apr 13, 2012 at 10:45 AM, Chris Harris <span dir="ltr"><<a href="mailto:chris.harris@kitware.com">chris.harris@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Sorry Bill, I should have replied to Berk's message. This was in<br>
response to add another method SetInputDataXXX(....)<br>
<span class="HOEnZb"><font color="#888888"><br>
Chris<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, Apr 13, 2012 at 10:40 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>
> GetProducerPort() has been there for a long time and I have seen it<br>
> used frequently. Foe example in the VTK Wiki Examples it is used 165<br>
> times.<br>
><br>
> On Fri, Apr 13, 2012 at 10:29 AM, Chris Harris <<a href="mailto:chris.harris@kitware.com">chris.harris@kitware.com</a>> wrote:<br>
>> I am of the opinion that if this is a pretty uncommon use case lets<br>
>> not pollute the API with another method ( that we may struggle to find<br>
>> a decent name for ). We should just document the trivial producer<br>
>> approach.<br>
>><br>
>> My 2 cents<br>
>><br>
>> Chris<br>
>><br>
>> On Fri, Apr 13, 2012 at 10:22 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>
>>> Why not reactivate GetProducerPort()? And do not add a new Set method.<br>
>>><br>
>>> On Fri, Apr 13, 2012 at 9:18 AM, Berk Geveci <<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>> wrote:<br>
>>>> I am fine with making this change with the exception of calling it<br>
>>>> "SetInputData". The moment you did that, you will start seeing hidden method<br>
>>>> warning in all subclasses that define SetInputData with another type as<br>
>>>> input. SetInputDataObject? SetInputDataAsDataObject?<br>
>>>><br>
>>>> -berk<br>
>>>><br>
>>>> On Thu, Apr 12, 2012 at 6:29 PM, Pat Marion <<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>> wrote:<br>
>>>>><br>
>>>>> Here is a example, which may not be very common, but I had it in my<br>
>>>>> code...<br>
>>>>><br>
>>>>> void foo(vtkAlgorithm* aFilter, vtkDataObject* aData)<br>
>>>>> {<br>
>>>>>   vtkDataObject* aDataCopy = copyData(aData);<br>
>>>>>   aFilter->SetInputConnection(aDataCopy->GetProducerPort());<br>
>>>>>   ...<br>
>>>>> }<br>
>>>>><br>
>>>>> In VTK 6, I can't find a generic way to connect a data object to an<br>
>>>>> algorithm.<br>
>>>>> I have to create a trivial producer (reimplement<br>
>>>>> vtkAlgorithm::SetInputDataInternal)<br>
>>>>><br>
>>>>> I'm curious if there is a reason not to change protected<br>
>>>>> SetInputDataInternal to public SetInputData?<br>
>>>>><br>
>>>>> Most subclasses define SetInputData as:<br>
>>>>><br>
>>>>> void vtkPolyDataAlgorithm::SetInputData(int index, vtkDataObject* input)<br>
>>>>> {<br>
>>>>>   this->SetInputDataInternal(index, input);<br>
>>>>> }<br>
>>>>><br>
>>>>><br>
>>>>> Pat<br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>>><br>
>>>>> Visit other Kitware open-source projects at<br>
>>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>>><br>
>>>>> Follow this link to subscribe/unsubscribe:<br>
>>>>> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
>>>>><br>
>>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>><br>
>>>> Visit other Kitware open-source projects at<br>
>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>><br>
>>>> Follow this link to subscribe/unsubscribe:<br>
>>>> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Unpaid intern in BillsBasement at noware dot com<br>
>>> _______________________________________________<br>
>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>><br>
>>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>><br>
>>> Follow this link to subscribe/unsubscribe:<br>
>>> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
>>><br>
><br>
><br>
><br>
> --<br>
> Unpaid intern in BillsBasement at noware dot com<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br>