[Insight-users] how to realease the memory of a filter?
Alberto Bert
bert at isi.it
Thu Mar 16 12:48:43 EST 2006
Hi all,
I'm working with big images (CTi and MRI) and I've got several filters in
a pipeline + some other processing classes I wrote (not with the ITK
organization, too bad... ).
As I've understood, most of the filters produce a new image, "doubling"
the memory. I would like to be able to release the memory as soon I
don't need it any more. For example:
...
itkFilter1->SetInput( InputImage );
itkFilter1->Update();
TmpImage = itkFilter1->GetOutput();
MyClassObject.SetInput( TmpImage );
OutputImage = MyClassObject.GetOutput();
// at this point I don't need any more InputImage
...
I tryed with: Delete() but at the end of the execution it gives me a
SegFault I guess cause itk is trying to release the memory I already
released...
What am I doing wrong?
Thank you,
cheers
Alberto
More information about the Insight-users
mailing list