[Insight-users] Use of itk image in a function and return processed image

Kevin Keraudren kevin.keraudren10 at imperial.ac.uk
Thu Feb 9 05:06:09 EST 2012


Hi Melanie,

Try to replace this:
>         extractFilter->Update();
>         outimage = extractFilter->GetOutput();
>         ImageType::Pointer *kimg = (ImageType::Pointer *)pimg;
> *kimg = outimage.GetPointer();* *//NOT WORKING*
by:
extractFilter->Update();
ImageType::Pointer *kimg = (ImageType::Pointer *)pimg;
*kimg = extractFilter->GetOutput();

I pasted there:
http://www.itk.org/pipermail/insight-users/2012-January/043503.html
some code I had an issue with. The passing/returning an image part was 
not the issue, so you can have a look at it.

Kind regards,

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120209/7334826d/attachment.htm>


More information about the Insight-users mailing list