Merging Coloc2 & JACoP?

@chalkie666 @oburri

I am a new developer at the LOCI group. In fact - I’m a new developer period… I am a microbiologist by training - so new to the computational world. Part of my work here at LOCI will be working on Coloc2. As such - I have been pouring over all available docs … and I found a past discussion that proposes a merging of Coloc2 and JACoP. I think it is just a fantastic idea and just wanted to check with you both - to see if this still stands today as a possibility… and if so - would love to discuss this as soon as possible.

Many thanks!


Yes. It’s a thing that needs to be thought through and done right. Code can’t really be merged but ideas for gui certainly.

@chalkie666 precisely.

Hi, sorry for the late arrival.
AFAIK, JACoP is supposed to get an overhaul at some point soon. I had spoken to Fabrice Cordelières a while back about merging the small JACoP Tools ActionBar I had made to circumvent some of the current limitations of JACoP and offered that the JACoP code be put to GitHub. Unfortunately I have not had any news on this front.

I will be happy to help once we have access to the source code, and I would be happy to have a unified tool to show to our users so this idea really goes in the right direction for me.

As @chalkie666 pointed out, code cannot be merged, and the math behind coloc is simple enough. However GUI ideas and merging of functionality can definitely improve people’s Colc pipeline.

1 Like

The JaCoP source? I noticed it is GPL, and available from within the JAR file.

And of course, Coloc 2 is available on GitHub. And also GPL.

From my perspective, there should be two distinct components: colocalization-related math functions in ImageJ Ops, and a fancy schmancy flagship UI with the goodies of JaCoP + Coloc 2, which calls the Ops functions as needed. Maybe we could call it JaColoc2P. :wink:


@ctrueden - you hit the nail on the head!! @oburri - if you are interested… we can combine/refine the GUIs/functionality. Just keep in touch - and we can figure out how to create one amazing, monster-of-a-coloc-plugin from both JACoP and Coloc2. It makes sense to combine efforts - and will benefit the community most in the end if we do so. I am just starting to move coloc algorithms into Ops… So at least that aspect is starting (slowly - as I’m new to this…). I’ll keep you posted on this front as well.


Hi @etarena,

if I may also add my 2 cents to this conversation (even if late). I also think that the combination of both makes sence while I really like the GUI of JACoP and think adding the functionality of some Coloc2 would definitely add value to JACoP.
I am also writing because on the user list Phillip Carl asked for a cytofluorogram with a reverse “memory” on the imageregarding colocalizing pixels. Here is a snapshot of what I have hacked together some time ago. Potentially, you want to consider adding something like this as additional functionality during the joining of the two plugins.

The plot is a standard scatter plot as used for the calculation of the PCC. In this case it does not use the normal plot window of IJ. It is actually also just an image. As soon as a ROI is selected (also supports multi location ROIs) in the plot it marks the pixels in the image inside this ROI. Since for bit ROIs and images this needs quite some calculation the perfomance is currently not the best but I think there might be a possibility to improve this.

Currently, this function is still not public/online but I was planning in the following week to add it as a standalone version to the BioVoxxel Toolbox. Nevertheless, it would make much more sende in combination with other algorithms checking for colocalization.

Let me know what you think. I’ll try making it available asap.


@biovoxxel - this is great! Actually - we have some collaborators here at LOCI that have requested exactly this to be implemented into Coloc2… it would add a lot to this plugin. would be great to discuss this a bit more with you! Thank you!

@etarena - I uploaded the current first version of the “Interactive Correlation Plot”. It is part of the BioVoxxel toolbox as a standalone plot option.
If you find some time, could you please check if it works as intended. Currently, it has a dependency on apache common-math3 because of the statistical values in the upper part of the plot. This might create problems and it would be good to know if this is the case.

The premise currently is, that it works only on the red and the green channel of an RGB image. No higher bit depth or composite image so far. This is intensity precision wise potentially not the best but when I was thinking about it it came to my mind that a higher precision would not help for the scatter plot nor for the display and as such the restriction on R and G of an RGB should not be a massive limitation.
To test is you can take for example the following image:

You can limit the plot to any ROI you want to make in the image. But this is not interactive, meaning that the ROI needs to be drawn before the plot is started (afterwards it is not constantly updated so far).

In the plot itself you can make all different type of ROIs and the corresponding pixels will be indicated in white in the image.

If there are any comments, questions or problems just let me know.

1 Like

@biovoxxel - I will try to look at it… but my programming skills (lack of them) are going to hold me back from being of much use to you… I’ll take a look - with no guarantees - eh? :smile:

Currently, its just about testing quickly if the functionality is of any use. Thereafter, I take suggestions and will try to include it into the plugin. If in future you want to add it in a new version of Coloc2 (plus JACoP) we might anyway re-write it from scratch as IJ2 plugin (which is currently unfortunately still not the case :pensive:

1 Like

There was an older imagej1 plugin that also did this. Colocalization Finder , I think it was called. It’s a good feature and we should think about how to do it in the new coloc GUI. The scatter plot needs to become interactive with imageJ2 ROIs in actin to segment out and display in an overlay on the input image or merge image the selected part of the scatterplot in image space.

1 Like

On Apr 28, 2016, at 3:41 AM, Philippe CARL philippe.carl@UNISTRA.FR wrote:

Dear Ellen,
I received your coordinates from Biovoxxel and I contact you about your project of Coloc 2 and JACoP combinaison.
Given that I have applications that are quite in parallel to colocalisation ones (actually N&B, i.e. intensity and brightness analysis) I took the colocalization_finder plugin that can be found under the following link:
and improved it with the help of Jérôme Muterrer (the original author of the plugin) to its last version that can be found under the following link:
Within this plugin, you can use pictures of whatever depth(i.e. even 32-Bit pictures) and define whatever kind of ROI and move it around and thus have the corresponding points being selected by the ROI showing up in white in the overlay picture.
By pressing the left mouse button you can generate a window with some analysis results that could be extended).
With a left double click you will draw the ROI with incrementing color within the plot and draw the selected points with the same color in the overlay picture.
When you move your mouse over the overlay picture and press the Ctrl key, the ROI within the plot will jump around in the plot, the center of the ROI in the plot corresponding to the position of the mouse in the overlay.
And when you are in the plot and press the numeric pad 2/8 or 4/6 keys you will generate the histograms of both pictures with a Gaussian fit of it and a copy of the center value in memory.
Given the functionalities of this plugin, you may want to use it as a starting point for the combinaison plugin you want to create.
Feel free to contact me for any additional question or purpose.
My best regards,

Philippe CARL
Laboratoire de Biophotonique et Pharmacologie
UMR 7213 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
Tel : +33(0)3 68 85 41 84


Hi all,

Rekindling this thread, I come with a couple of questions and Coloc Ops implementation suggestions

Coloc Ops

Should have each method (Pearsons, Manders, Li ICQ, etc…) implemented as a single op with the coloc namespace (i.e coloc.areas, coloc.pearsons, coloc.manders, coloc.fluorogram… )

Before calling these Ops, a coloc.setup Op can be called with the required parameters (dataset, channel_pair). (Does that make sense in the way Ops are imagined to being used?) and initializes a static class that contains the main information needed for whatever coloc pipeline.

We can then call the other Ops, one after the other, depending on what we need.

That way, new coloc algorithms or classes can simply call up on the static coloc class to get the raw data they need and run their processing.

Any thoughts on that? Is this a good direction?



@oburri Thanks for the suggestions.

One thing about Ops is that each op needs to be deterministic and stateless. Static fields, classes, etc., are by definition state, and incompatible with Ops, and actually ImageJ2 in general since they are the bane of reproducibility.

That said, we could implement your idea in a way that keeps ops stateless: just make a coloc.setup or coloc.create op which returns a ColocSettings object, which is basically a struct with the settings and parameters you want. Then all the other ops e.g. coloc.pearsons would take as their first argument a ColocSettings. In this way, each op would still be deterministic in its processing (same inputs in :arrow_right: same outputs out).


@ctrueden thanks! Indeed that’s one way to go at it. So would that idea for the organisation of the coloc Ops work for you? If so I’ll give it a shot and play with Coloc2’s classes to make that happen.