[Insight-users] simple ITK App keeps crashing - what do I do wrong?

Henning Meyer tutmann at gmail.com
Sun May 14 05:27:56 EDT 2006


Hello Luis,

I think I got it so far. My problem seems to be solved. Still I'm
unsure about two points:

As far as I understood an image is owned by the filter it was produces from.
Can I pass an Image::Pointer res = filter.GetOutput() as result of my
function and destroy the filter afterwards? res should then be the
owner of the image, shouldn't it?

> the GetOutput() method of a filter does not give you a filter, it gives
> you an image. The syntax of SmartPointer is the same as raw pointers.

Why not? Why can't my image know it has to be produced from an filter.
The filter could be stored in an SmartPointer inside the image. This
seems inconsequent to me.

Henning


More information about the Insight-users mailing list