[Insight-users] Image data persistence
David Holmes
holmesd3 at yahoo . com
Fri, 30 May 2003 08:01:47 -0700 (PDT)
There is a way to keep your memory. Here is the call:
inITK->GetPixelContainer()->SetContainerManageMemory(false);
Thanks
david
--- Tim Rudge <tjr34 at cam . ac . uk> wrote:
> I have got ITK working with Amira for visualisation.
> So I get an Amira
> image, use ImportImageFilter to wrap the buffer as
> an ITK image. Then I
> apply some filter pipeline, and use
> Image::GetBufferPointer() to wrap the
> result data back as an Amira image. My code then
> exits and I pass on the
> amira image to the amira workspace.
> The problem is that the ITK Image destroys the data
> when the code exits and
> deletes the smartpointer. I tried using the new
> operator to create the
> smart pointer so that it persists and so does the
> image and image data.
> This works, however the whole itk::Image persists
> (and cannot be deleted by
> amira) but I just want the data in the image.
> Is there a neat way to do this without explicitly
> copying the data into
> another buffer and then deleting the itk::Image?
>
> Thanks,
> Tim
>
> Tim Rudge
> ---------
> Cellular Development Lab
> Dept. Plant Sciences
> Cambridge University
> _______________________________________________
> Insight-users mailing list
> Insight-users at public . kitware . com
>
http://public . kitware . com/mailman/listinfo/insight-users
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar . yahoo . com