od_lut_green = ColorDeconvolutionHelper.makeODLUT(stains.getMaxGreen());
od_lut_blue = ColorDeconvolutionHelper.makeODLUT(stains.getMaxBlue());
inverse = stains.getMatrixInverse();
for (int i = 0; i < buf.length; i++) {
pixels[i] = ColorTransformer.deconvolve(buf[i], inverse, od_lut_red, od_lut_green, od_lut_blue, 1);
od_lut_green = ColorDeconvolutionHelper.makeODLUT(stains.getMaxGreen());
od_lut_blue = ColorDeconvolutionHelper.makeODLUT(stains.getMaxBlue());
inverse = stains.getMatrixInverse();
for (int i = 0; i < buf.length; i++) {
pixels[i] = ColorTransformer.deconvolve(buf[i], inverse, od_lut_red, od_lut_green, od_lut_blue, 2);
od_lut_green = ColorDeconvolutionHelper.makeODLUT(stains.getMaxGreen());
od_lut_blue = ColorDeconvolutionHelper.makeODLUT(stains.getMaxBlue());
inverse = stains.getMatrixInverse();
for (int i = 0; i < buf.length; i++) {
pixels[i] = ColorTransformer.deconvolve(buf[i], inverse, od_lut_red, od_lut_green, od_lut_blue, 3);
od_lut_green = ColorDeconvolutionHelper.makeODLUT(stains.getMaxGreen());
od_lut_blue = ColorDeconvolutionHelper.makeODLUT(stains.getMaxBlue());
inverse = stains.getMatrixInverse();
for (int i = 0; i < buf.length; i++) {
pixels[i] = ColorTransformer.deconvolve(buf[i], inverse, od_lut_red, od_lut_green, od_lut_blue, 1);
od_lut_green = ColorDeconvolutionHelper.makeODLUT(stains.getMaxGreen());
od_lut_blue = ColorDeconvolutionHelper.makeODLUT(stains.getMaxBlue());
inverse = stains.getMatrixInverse();
for (int i = 0; i < buf.length; i++) {
pixels[i] = ColorTransformer.deconvolve(buf[i], inverse, od_lut_red, od_lut_green, od_lut_blue, 2);