[vtkusers] Vtk 5/6 vs 4. Decouple filter output from pipeline

alethea alethea at anatomage.com
Mon Jan 27 18:41:54 EST 2014


No thoughts?


alethea wrote
> Say we have a vtk pipeline:
> 
> InputData -> Filter1 -> Filter2 -> OutputData
> 
> and we don't want to keep track of the inputs or filters once the
> outputdata has been produced, but would like to pass around OutputData as
> though it were an independent object. In the past, (vtk 4) we had used the
> following:
> 
> Filter2->Update();
> OuputData->Register(NULL); // increment reference count
> OutputData->SetSource(NULL); // remove old source (decrements reference
> count)
> Filter2->Delete();Filter1->Delete();
> InputData->Delete();
> 
> 
> It seems like the vtk 6 equivalent is the following?
> 
> Filter2->Update();
> OuputData = vtkDataSet::New(); // make new object of desired type
> OutputData->ShallowCopy(Filter2->GetOutputPort()); // shallow copy filter
> output
> Filter2->Delete();Filter1->Delete();
> InputData->Delete();
> 
> Is this correct? Are there any cases where DeepCopy would be needed?
> 
> thanks for your help!
> -Alethea
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers





--
View this message in context: http://vtk.1045678.n5.nabble.com/Vtk-5-6-vs-4-Decouple-filter-output-from-pipeline-tp5725531p5725654.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list