[vtk-developers] No api for vtkAlgorithm::SetInputData()

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Sep 12 12:26:44 EDT 2012


I just pushed a topic to gerrit that addresses this issue:
http://review.source.kitware.com/#/t/1267

Also, I've added extra logic to SetInputDataObject(...) to ensure that
the algorithm is not changed unless the data object has changed.

Utkarsh

On Fri, Apr 13, 2012 at 11:59 AM, Berk Geveci <berk.geveci at kitware.com> wrote:
> It is not possible to bring back GetProducerPort(). Data objects can no
> longer point to pipeline/algorithm related classes because we decoupled
> them.
>
> On Fri, Apr 13, 2012 at 10:22 AM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Why not reactivate GetProducerPort()? And do not add a new Set method.
>>
>> On Fri, Apr 13, 2012 at 9:18 AM, Berk Geveci <berk.geveci at kitware.com>
>> wrote:
>> > I am fine with making this change with the exception of calling it
>> > "SetInputData". The moment you did that, you will start seeing hidden
>> > method
>> > warning in all subclasses that define SetInputData with another type as
>> > input. SetInputDataObject? SetInputDataAsDataObject?
>> >
>> > -berk
>> >
>> > On Thu, Apr 12, 2012 at 6:29 PM, Pat Marion <pat.marion at kitware.com>
>> > wrote:
>> >>
>> >> Here is a example, which may not be very common, but I had it in my
>> >> code...
>> >>
>> >> void foo(vtkAlgorithm* aFilter, vtkDataObject* aData)
>> >> {
>> >>   vtkDataObject* aDataCopy = copyData(aData);
>> >>   aFilter->SetInputConnection(aDataCopy->GetProducerPort());
>> >>   ...
>> >> }
>> >>
>> >> In VTK 6, I can't find a generic way to connect a data object to an
>> >> algorithm.
>> >> I have to create a trivial producer (reimplement
>> >> vtkAlgorithm::SetInputDataInternal)
>> >>
>> >> I'm curious if there is a reason not to change protected
>> >> SetInputDataInternal to public SetInputData?
>> >>
>> >> Most subclasses define SetInputData as:
>> >>
>> >> void vtkPolyDataAlgorithm::SetInputData(int index, vtkDataObject*
>> >> input)
>> >> {
>> >>   this->SetInputDataInternal(index, input);
>> >> }
>> >>
>> >>
>> >> Pat
>> >>
>> >> _______________________________________________
>> >> Powered by www.kitware.com
>> >>
>> >> Visit other Kitware open-source projects at
>> >> http://www.kitware.com/opensource/opensource.html
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://www.vtk.org/mailman/listinfo/vtk-developers
>> >>
>> >>
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtk-developers
>> >
>> >
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list