[Insight-users] How to Define a Global Itk::Image?

David Doria daviddoria at gmail.com
Thu Jan 13 10:23:38 EST 2011


On Thu, Jan 13, 2011 at 10:22 AM, Ali Habib <ali.mahmoud.habib at gmail.com> wrote:
> the problem is that when i set the image for ex myImage= reader->GetOutput()
> it works well and is displayed correctly but when i reuse it in another
> function for ex change it's intensity the image seems to be corrupted.

I bet the reader is going out of scope. Try

myImage->Graft(reader->GetOutput());

instead of

myImage= reader->GetOutput()

Also, please keep the discussion on the list.

David


More information about the Insight-users mailing list