1. A method comprising the steps of: receiving an image having at least one marked region, each marked region of the image having a plurality of pixels; generating a source window, the source window enclosing at least one of the marked regions of the image; selecting a pixel from within one of the at least one marked regions enclosed by the source window; generating a fill window around the selected pixel; generating a search window around each pixel outside the at least one marked region of the image and inside the source window, each search window having approximately the same size as the fill window; comparing the intensity distribution of at least a portion of the fill window with the intensity distribution of the corresponding portion of each search window; selecting a search window based on the comparison of the intensity distribution of the fill window with the intensity distribution of each search window; and filling at least a portion of the pixels in the fill window with corresponding pixels in the selected search window.