[vtk-developers] No api for vtkAlgorithm::SetInputData()
Pat Marion
pat.marion at kitware.com
Thu Apr 12 18:29:25 EDT 2012
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120412/6d73a98d/attachment.html>
More information about the vtk-developers
mailing list