[vtk-developers] filter within a filter

Vanmoer, Mark W mvanmoer at illinois.edu
Fri Mar 7 15:50:44 EST 2014


Thanks Utkarsh, that gave me enough info to find the description of this on the wiki.

I'm getting a seg fault crash, but this actually with paraview_protobuf and vtkIntegrateAttributes so I'll move to the paraview list if I can't figure it out.

Mark

-----Original Message-----
From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] 
Sent: Thursday, March 06, 2014 6:43 PM
To: Vanmoer, Mark W
Cc: vtk-developers at vtk.org
Subject: Re: [vtk-developers] filter within a filter

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