[vtk-developers] filter within a filter

Vanmoer, Mark W mvanmoer at illinois.edu
Thu Mar 6 18:38:04 EST 2014


Hello, I'm trying to use a filter from within another filter. I found this discussion

http://www.vtk.org/pipermail/vtk-developers/2012-February/010946.html

that says "The only real trick is that you have to ShallowCopy the outer filter's input into the first filter in the internal pipeline and ShallowCopy the last filter's output into the outer filter's output."

I had been starting the internal pipeline by passing the data set I grab out of the information object into a trivial producer, but vtkTrivialProducer doesn't have ShallowCopy.

Am I understanding what "outer filter's input" is correctly?

vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);

// This is the outer filter's input, correct?
vtkDataSet *input = vtkDataSet::SafeDownCast(
  inInfo->Get(vtkDataObject::DATA_OBJECT()));

// tp is a vtkTrivialProducer ivar, but should I be ShallowCopying before SetOutput()?
tp->SetOutput(input);

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20140306/3a64a36d/attachment.html>


More information about the vtk-developers mailing list