Update of the Colour Deconvolution plugin

I have some some updates for the Colour Deconvolution plugin which I would like to apply to the Fiji version.

Some time ago, that plugin source was split into two separate files by a contributor to make some methods public and to generate a single file which holds the colour vector matrices which makes them easier to edit and maintain.
One drawback is that now I cannot compile that source in IJ1 anymore.
I will have to move from using just a text editor (yep!) and use Eclipse instead.

I tried to find a step by step instruction on how to do this but the instructions are somewhat circular and perhaps understandable for experienced programmers.

I have installed eclipse, maven, git, gitk and Fiji (but never used maven before). I am using linux if that makes any difference.
(I have cloned the IJ source code long time ago, but I currently cannot access that machine and do not recall exactly how I did it and now I am not sure if there is a specific place in Eclipse where I should place the repository.) So, sorry to ask these basic questions…

  1. How do I clone just the Colour Deconvolution plugin and use the current working Fiji install for testing?

  2. Do I need to clone the whole Fiji to work with Eclipse and update the plugin?

  3. Can somebody please suggest how to set up Eclipse to do the above?

Many thanks

Hi @gabriel

This is not an instruction to setup a full FIJI development environment.
Also it does not explain how to contribute modifications to the existing GitHub project.

I only want to explain a simple workaround to be able to modify and compile the ‘FIJI Color Deconvolution’ code.

Maybe this helps.

  1. From
    download ZIP

  2. Assuming you have a working Eclipse setup for ImageJ (not FIJI)
    FIJI and other dependencies are not necessary.

  3. Create a new package folder in PluginSourceFiles with the name

  4. From the unpacked zip file from the subfolder \src\main\java\sc\fiji\colourDeconvolution copy the two files
    by drag&drop them to the new package folder (from step 3) in Eclipse

Now you should be able to compile them.

(FIJI and other dependencies are not necessary.)

To make the plugin visible in ImageJ started from Eclipse you can (temporarily) rename the package folder from
(ImageJ can not handle the points.)

Don’t forget your vector definition file colourdeconvolution.txt.
Copy this file to the plugins folder of your Eclipse project (!).


1 Like

Hi Peter, I was able to sort all out now. Many thanks for your help.

you can compile both files inside ImageJ1 (without Eclipse)!

Comment out or delete the line

package sc.fiji.colourDeconvolution;

in both files.
Then first Compile&Run


After that you can Compile&Run

1 Like

Yes! thanks. That was causing the errors. Much appreciated!

I want to start my comment by telling you that I find it great that you have some updates for the Colour Deconvolution plugin. I’m not sure about applying it to the Fiji version, but I admire your interest a lot. I am happy that you’ve managed to sort out your issue because sometimes we have a problem which we can’t solve and we can’t find the solution to it, but fortunately, we can get some help from places like this one.

1 Like

Hi @NewmanOlivia
nice that you found the way to this forum.

Not sure if this helps @NewmanOlivia

In Fiji you can just use “the Colour Deconvolution2 update site”.

" The new command should appear under the menu structure in Image>Color>Colour_Deconvolution2"

1 Like