// Get BorderExtender from renderHints if any.
BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);
MedianFilterShape maskType =
(MedianFilterShape)paramBlock.getObjectParameter(0);
int maskSize = paramBlock.getIntParameter(1);
RenderedImage ri = paramBlock.getRenderedSource(0);
if(maskType.equals(MedianFilterDescriptor.MEDIAN_MASK_SQUARE)) {
return new MedianFilterSquareOpImage(ri,
extender,
renderHints,
layout,
maskSize);
} else if(maskType.equals(MedianFilterDescriptor.MEDIAN_MASK_PLUS)) {
return new MedianFilterPlusOpImage(ri,
extender,
renderHints,
layout,
maskSize);
} else if(maskType.equals(MedianFilterDescriptor.MEDIAN_MASK_X)) {
return new MedianFilterXOpImage(ri,
extender,
renderHints,
layout,
maskSize);
} else if(maskType.equals(MedianFilterDescriptor.MEDIAN_MASK_SQUARE_SEPARABLE)) {
return new MedianFilterSeparableOpImage(ri,
extender,
renderHints,
layout,
maskSize);