[vtkusers] pick and update

Boris Avdeev borisaqua at gmail.com
Mon Jan 30 17:12:18 EST 2006


Okay, instead of "read.Delete()" I can use "del read". However it
still doesn't help.
What object are you supposed to pass to Register()?



On 1/30/06, Boris Avdeev <borisaqua at gmail.com> wrote:
> Thanks for your reply. I tried the second alternative. I guess
> Delete() method is not exported to Python (because of GC?). I tried to
> use the following code instead:
>
> data.Register(None)
> data.Update()
> read.UnRegister(None)
>
> It did not do any good and now I get seg.fault at the exit.
> I did not quite get the copy explanation. What is "make the copy of
> the data from the reader the start of your pipeline"?
> I tried the following with as much success as earlier:
> ...
> read.Update()
> data.DeepCopy(read.GetOutput())
> ...
>
> Thanks,
> Boris
>
>
> On 1/30/06, Tom Radcliffe <tradcliffe at predictivepatterns.com> wrote:
> >
> > The reader's output will be regenerated during the next Update, so your
> > changes will be wiped out.  You should pull the data out of the reader
> > and make a copy.  Then make the copy of the data from the reader the
> > start of your pipeline.
> >
> > To do this without copying you can do something like this (in C++,
> > something similar in Python):
> >
> > vtkPolyData* pData = pReader->GetOutput();
> > pData->Register(0);
> > pReader->Delete();
> >
> > This should drop the reader but keep the data around.
> >
> > --Tom
>



More information about the vtkusers mailing list