[ITK] ImportImageFilter memory
Lowekamp, Bradley (NIH/NLM/LHC) [C]
blowekamp at mail.nih.gov
Mon Jul 24 14:09:54 EDT 2017
Hi Fijoy,
You are correct that the ImportImageFilter does not copy the buffer. It does provide options for who owns the memory i.e. who delete the buffer, with the flag LetImageContainerManageMemory.
You are use the ImageDuplicator to explicitly copy the image. Here is an example:
https://itk.org/ITKExamples/src/Core/Common/DuplicateAnImage/Documentation.html
Brad
From: Fijoy Vadakkumpadan <tofijoy at gmail.com>
Date: Monday, July 24, 2017 at 2:04 PM
To: "community at itk.org" <community at itk.org>
Subject: [ITK] ImportImageFilter memory
Hello,
From reading the ITK documentation & source code comments, it appears that the itk::ImportImageFilter does not allocate new pixel buffer for the image that it creates. It simply uses the buffer that's passed to it via SetImportPointer(). Is this correct?
If yes, is there a flag that I can set for the ImportImageFilter to allocate buffer for the output image? Or, should I use another filter to create a deep-copy of the image that's created by ImportImageFilter, to ensure that the final output image is independent of the buffer passed to the ImportImageFilter?
Thanks,
--Fijoy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170724/1f850876/attachment.html>
More information about the Community
mailing list