Hi All,
We are working on a deconvolution plugin for IJ2 so we can use it also in KNIME.
It is based on de IJ1 deconvolution plugin.
The thing is we don’t understand what is happening with the images.
We have a working plugin but the result is different in IJ2, KNIME from the IJ1 plugin.
Original image:
The IJ1 deconvolution:
Loading the image in IJ2 results in a 3 channel image. After deconvolution the three resulting images also have 3 channels.
The IJ2 deconvolution:
Running the deconvolution in KNIME results in the same images with the show() function but when they are put in the KNIME table they seem different.
The code for the IJ2 plugin we have created is:
@Override
public void run() {
StainMatrix sm = new StainMatrix();
sm.init("Our stain", R1, G1, B1, R2, G2, B2, 0, 0, 0);
Img<ByteType> img = (Img<ByteType>) dataset.getImgPlus().getImg();
ImageStack[] imageStacks = sm.compute(false, true, ImageJFunctions.wrap(img, dataset.getName()));
ImagePlus imp = new ImagePlus("Image " + 0, imageStacks[0]);
imp.show();
ImagePlus imp1 = new ImagePlus("Image " + 1, imageStacks[1]);
imp1.show();
ImagePlus imp2 = new ImagePlus("Image " + 2, imageStacks[2]);
imp2.show();
deconvolutedImage1 = ImageJFunctions.wrap(imp);
deconvolutedImage2 = ImageJFunctions.wrap(imp1);
deconvolutedImage3 = ImageJFunctions.wrap(imp2);
}
The questions we have are.
- Why are the deconvoluted images in IJ1 different from the IJ2 images?
- Why do we get 3 channels in IJ2 (and KNIME)?
- Why is are the images “strange” when we put them in the table.
I hope you can help us with these questions.
Boudewijn