Personally, I vote for using trivial producer as well.  That said, I think there are some problems with the trivial producer with structured grids with the extents.  I don't have an exact bug report for that but it should be replicatible by creating an image data, setting that as the input for the trivial producer, and then using vtkExtractVOI to reduce the whole extents.<br>
<br>Andy<br><br><div class="gmail_quote">On Fri, Apr 13, 2012 at 10:29 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">
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>
<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: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>
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>