if (hasMask()) {
PlanarImage labImage = Functions.toColorSpace(back, new LCMS_ColorSpace(new LCMS.LABProfile()),
LCMSColorConvertDescriptor.RELATIVE_COLORIMETRIC, null);
// PlanarImage labImage = Functions.toColorSpace(back, JAIContext.labColorSpace, null);
RenderedImage redMask = new RedMaskOpImage(labImage, tolerance, null);
ParameterBlock pb;
KernelJAI morphKernel = new KernelJAI(3, 3, new float[] {1, 1, 1, 1, 0, 1, 1, 1, 1});
pb = new ParameterBlock();