// Get BorderExtender from renderHints if any.
BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);
KernelJAI unRotatedKernel =
(KernelJAI)paramBlock.getObjectParameter(0);
KernelJAI kJAI = unRotatedKernel.getRotatedKernel();
int dataType =
paramBlock.getRenderedSource(0).getSampleModel().getDataType();
boolean dataTypeOk = (dataType == DataBuffer.TYPE_BYTE ||
dataType == DataBuffer.TYPE_SHORT ||
dataType == DataBuffer.TYPE_INT);
if (kJAI.getWidth() == 3 && kJAI.getHeight() == 3 &&
kJAI.getXOrigin() == 1 && kJAI.getYOrigin() == 1 &&
dataTypeOk) {
return new Convolve3x3OpImage(paramBlock.getRenderedSource(0),
extender,
renderHints,
layout,
kJAI);
} else if (kJAI.isSeparable()) {
return new SeparableConvolveOpImage(paramBlock.getRenderedSource(0),
extender,
renderHints,
layout,
kJAI);