[Insight-developers] handling of filter regions

Damion Shelton dmsst59+@pitt.edu
Sat, 19 May 2001 11:12:31 -0400


Although I haven't played around much with regions (other than using them to
set the size of an image), I have a few questions on how RequestedRegion
fits into the filtering/processing scheme.

I presume the intent of a code fragment such as:

image->SetRequestedRegion(aregion);
filter->SetInput(image);
filter->Update()

would be to run the filter only on the requested region of the image. Now,
my question is how the output of the filter should be interpreted. Is it:

1) The original image, with the filtered region modified but the
non-filtered area unchanged (by "original" I mean that the output pointer is
the input pointer)
2) A new image, the same size as the filtered region.
3) A new image, the same size as the input image, with the filtered region
modified but the non-filtered area unchanged: i.e., passing through the
unfiltered portion

Obviously some filtering algorithms *must* generate new images
(shrinking/subsampling for example).

So, is there a standard approach to determining how regions behave, or is
this left up to the filter's designer? And, if I wanted versions of a filter
that do both (2) and (3), would I need to implement them separately, or just
write one and have a "behavior" flag.

Thanks,

-Damion-