[Insight-developers] clearing the output image in a filter
Damion Shelton
dmshelto@andrew.cmu.edu
Wed, 15 May 2002 17:57:47 -0400
> Note that Image has a FillBuffer() method that can be used to clear or
> empty an image. Can you use FillBuffer() to set all your lists to a
> default list?
Good suggestion.... I don't think a straight implementation of FillBuffer
would work, because it wouldn't destroy the existing objects on the list.
But I was able to copy the FillBuffer() code and modify it slightly to call
EmptyList() on each pixel. This seems to have solved the crashing problem.
My original approach was to create an iterator, and use this iterator to
access each pixel in the image. Any idea why the straightforward buffer
increment design works and the iterator didn't?
Thanks for the help,
-Damion-