Hi everyone,<br><br>I'm using the itk::ImportImageFilter to create an itk::Image from an existing buffer. I would like to make the itk:Image own the buffer so that it will be the itk:Image destructor to free the buffer.<br>
Reading the documentation I found that there's an option in the SetImportPointer(...) method of the itk::ImportImageFilter class, that allows the filter to own the buffer, but after the update the resulting image (I think as expected) is empty.<br>
If I set itk::ImportImageFilter not to own the buffer the itk:Image is not empty but it doesn't own the buffer (if I delete the itk::Image, the buffer is still allocated in memory).<br>Since I create an itk:Image and then I return it I would like to make the itk:Image own the buffer so that I can delegate the itk:Image destructor to free the buffer, without the needing to return also the buffer pointer and use it to free the buffer or to create the itk:Image by copy.<br clear="all">
<br>I am looking forward to an answer.<br>Thanks in advance.<br><br>-- <br>Stefano<br><br>