[vtk-developers] filter within a filter
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Thu Mar 6 19:43:17 EST 2014
Mark,
That comment is no longer applicable (since VTK 6). You can directly
pass your input data object to an internal filter using
vtkAlgorithm::SetInputData(...) method. No need to shallow-copy. You
can directly pass the input dataset to the trivial producer you're
creating in your internal pipeline.
Utkarsh
On Thu, Mar 6, 2014 at 5:38 PM, Vanmoer, Mark W <mvanmoer at illinois.edu> wrote:
> 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
>
>
> _______________________________________________
> 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