[vtkusers] Shallow Copy: Easy Question

gcope at engin.umich.edu gcope at engin.umich.edu
Thu May 20 18:08:13 EDT 2004


All-

This should be an easy question for someone. I need an example of how to use
ShallowCopy to break a pipeline and let the second half use the copy as input
rather than having to re-compute the first half.

I have successfully done this by doing the following:

vtkPolyData *SavedData;
FilterA->Update();
SavedData->ShallowCopy(FilterA->GetOutput());
FilterB->SetInput(SavedData);

This works great when dealing with polydata, but when the type (and filter
types) are changed to vtkImageData, nothing works. It has caused infinite loops
and various runtime errors. What am I doing wrong?

Thanks in advance,
Jamie



More information about the vtkusers mailing list