Many thanks for this great plugin accompanied by such good usage instructions! I was able to nicely segment objects in multiple channels across hundreds of images in minutes using the batch tool on the Colocalization Image Creator, I am very grateful! I have a couple of questions about using the Object Counter for analysis: I have nuclei outlined as a binary element (validated with greyscale element) in output channel 1, binary elements of telomere and DNA damage puncta stains in different colours in output channel 2, and a binary element of co-localisation for these two stains in output channel 3. In each image, I would like to treat each nucleus as an independent object and count the number of objects within each area outlined/masked i.e. for each nucleus there would be 3 category counts - telomeres, damage, and co-localisation. I would then like to batch process all the images. Manually drawing round a nucleus I have already defined, setting inclusion region, and counting multipoints for each category, then repeating ad nauseam is not something I look forward to. Is there a way to A) set independent nucleus object ROIs, and B) batch process the counts? Cheers!
Hello and thanks for the comment! There is no stratightforward way to do what u ask. However, keep in mind that you can write your own custom macros to detect objects and output multipoints. Then, you can use the counter tool to use those multipoints. If that makes sense. For example, you could write a macro that isolates 1 and 1 nucleus and outputs multipoint onto that nucles. Or maybe you define some rule that if points are really close together they belong to the same nucleus. Its not easy for me to say without understanding your problem a bit better. You may consider sending me a few sample images if u want.
@@anlu2 Many thanks for your reply. I am still a FIJI novice, and macro writing is yet a daunting task. After some playing around with the default FIJI tools, I found a way to use ‘Threshold’ > ‘Create Mask’ > ‘Analyse Particles’ > ‘ROI Manager’ to create discrete objects to measure (e.g. if I have an image with 4x cells, I can use the DAPI channel to define individual nuclei as 4x discrete ROIs to be measured independently.) By doing similar for other channels (e.g. the telomere channel), I can combine objects (e.g. nucleus 1 and the telomere object) using the ROI Manager ‘AND’ function to create an object that is only the telomeres located within nucleus 1. By extension, I could then do this for additional channels to create an object that is nucleus 1 AND telomeres AND damage. However, although ROI Manager allows me to measure useful things like the area of each object and the co-ordinates of the centre point, unlike your plugin, there is not a way (that I have found yet) to output a count of particles that comprise the object (e.g. if my nucleus 1 telomeres object actually has 46 discrete particles it can tell me the area they take up as a group but not how many there are). I can use the multipoint tool to count them manually, but the whole point is to automate the count to save time and standardise object identification. I am able to use ROI Manager ‘Properties’ to set a colour fill for each object (e.g. nucleus 1 telomeres can be made red, while the rest remain white). I then load your Colocalization Object Counter plugin, set the colour to detect (e.g. to red), and press ‘Find 2D maxima’. The plugin creates multipoints, but for some reason it reverts to the original channel mask, marks all the telomeres (not just the ones that were highlighted red), and when I press ‘Convert multipoint to overlays’ nothing happens and no count is generated. So close! Can you think how this might be resolved? I want to avoid having to manually ‘set inclusion region’ for each nucleus, as this shouldn’t be necessary after having done all the object identifying work. Happy to send a few example images if useful.
@@Mo11usq Im not sure i fully understand, but just a quick reply: " am able to use ROI Manager ‘Properties’ to set a colour fill for each object (e.g. nucleus 1 telomeres can be made red, while the rest remain white). I then load your Colocalization Object Counter plugin, set the colour to detect (e.g. to red), and press ‘Find 2D maxima’. The plugin creates multipoints, but for some reason it reverts to the original channel mask, marks all the telomeres (not just the ones that were highlighted red), and when I press ‘Convert multipoint to overlays’ nothing happens and no count is generated. So close!" The reason the plugin detects more than red things could be because either 1) the image is not actually an RGB image, but with overlays/fill colors you have created that show up as red, but that is just for the human. Maybe you have to convert the fill to "burn" it onto the image. I think this is done (if we are talking about red selections) by setting the background or foreground color in imageJ to e.g. red, then making selection, then Edit>draw. Make sure your image is RGB first. If 2) It detecs other things than red it may be that simply you have to put the noise threshold much higher. For 8 bit images max i 255. For 16 bit and RGB images you may have to put it much higher.
@@anlu2 difficult to describe this kind of thing clearly, my apologies. As you said, the red highlighting of the telomere subgroup turned out to be an overlay for the eyes of the user, but not the computer. Clicking 'Flatten' in ROI Manager "burnt" the overlay into the image. Subsequently, 'Find 2D maxima' in your plugin placed points only on the red telomeres. However, 'Convert multipoint to overlays' still did nothing, and no count was produced. I note that the multipoints generated by this process are small and white '+' with a cyan square centre, different from the large fully cyan '+' the plugin normally generates. Not sure why this should be, but it would seem this interferes with the ability to convert the points. I will soldier on. Any further insights are welcome! Thank you for your time. I hope my comments at least bump up your video for the TH-cam algorithm!
@@Mo11usq try to remove and clear ANY selections, overlays or Rois from any potential source (e.g. roi manager) before clicking Find 2d maxima and/or convert multipoints
Hello, I am trying to incorporate this imagej plugin into an fiji macro, in order to apply it to a large batch of images. But since I can't operate on multi channel images well with a macro, I have to run the commmand Split... The plugin does not work well on single channel images, however. How can I make this plugin work on two single channel images (instead of a single image with two channels)? Or alternatively, how can I call this plugin from inside a macro without splitting the channels? Thank you!
@@anlu2 Thank you for the quick reply! I am using Colocalization_Object_Counter-1.2.0.jar from the github. I could record every command and implement it in my macro, but I struggle with the channel picking... I have a 4 channel picture, and I want to compare structures in channels 3 and 4. It works beautifully when I do it by hand, but my macro doesn't work because once the 4-channel image is split into 4 separate images the plugin does not seem to operate well... i'm probably doing something very wrong?
Do you know that you can change the active channel with macro? See here: imagej.nih.gov/ij/developer/macro/functions.html For example Stack.setChannel(n) or Stack.setPosition(channel, slice, frame) - Displays the specified channel, slice and frame.
Hi, Anders, thank you very much for this very important image analysis plugin. I was tried to add the plugin to FIJI but it says the link is not updated. Could you please help me how to add this plugin to my FIJI software? my image is stained with zihel Neelsen staining and Sudan black My plan is to count/enumerate the Mycobacterium tuberculosis cells that has no lipid droplet, that has 1-2 lipid droplets, and that has >3 lipid droplets. So that I will calculate the mean Lipid droplet content of each bacteria isolated from patients. Thank you inadvance
Hi Daniel! I just tested it and the update site still works (sites.imagej.net/ObjectColocalizationPlugins/). Make sure you follow the instructions starting at 1:25 of the video, and make sure there are no spaces in the beginning or end when you add the update site.
Hi, Anders, thank you very much. Now I managed to install the plugin and I am enjoying with your video and checking whether my image can be analyzed with this plugin.
Thank you for such a detailed explanation of this plugin. I will need to optimize my nuclear segmentation (my 10um tissue slices can be very densely population) but my main question is about the counter (part II). We count atherosclerotic lesions and sometimes we like to exclude regions from counting and/or look at hyperlocalized regions. Does the contouring feature of the counter accomplish this? Or is there another method you would recommend? When hand counting we visually exclude regions, but I am trying to figure out how to incorporate into this workflow.
The countour feature would not help with this. I think I would delete every image signal from outside the region you are interested in before counting: mark the area with freehand -> edit -> clear outside.
Hi, I'm a student at Imperial College London and I would love to cite your paper in my project but just to confirm whether my images could be analysed using your pipeline, could i send you a few of my images to your email? My acquired images are overlapped (2 channels) and and the intensity is not quite uniform :(
Many thanks for this great plugin accompanied by such good usage instructions!
I was able to nicely segment objects in multiple channels across hundreds of images in minutes using the batch tool on the Colocalization Image Creator, I am very grateful!
I have a couple of questions about using the Object Counter for analysis:
I have nuclei outlined as a binary element (validated with greyscale element) in output channel 1, binary elements of telomere and DNA damage puncta stains in different colours in output channel 2, and a binary element of co-localisation for these two stains in output channel 3.
In each image, I would like to treat each nucleus as an independent object and count the number of objects within each area outlined/masked i.e. for each nucleus there would be 3 category counts - telomeres, damage, and co-localisation. I would then like to batch process all the images.
Manually drawing round a nucleus I have already defined, setting inclusion region, and counting multipoints for each category, then repeating ad nauseam is not something I look forward to. Is there a way to A) set independent nucleus object ROIs, and B) batch process the counts?
Cheers!
Hello and thanks for the comment! There is no stratightforward way to do what u ask. However, keep in mind that you can write your own custom macros to detect objects and output multipoints. Then, you can use the counter tool to use those multipoints. If that makes sense. For example, you could write a macro that isolates 1 and 1 nucleus and outputs multipoint onto that nucles. Or maybe you define some rule that if points are really close together they belong to the same nucleus. Its not easy for me to say without understanding your problem a bit better. You may consider sending me a few sample images if u want.
@@anlu2 Many thanks for your reply. I am still a FIJI novice, and macro writing is yet a daunting task.
After some playing around with the default FIJI tools, I found a way to use ‘Threshold’ > ‘Create Mask’ > ‘Analyse Particles’ > ‘ROI Manager’ to create discrete objects to measure (e.g. if I have an image with 4x cells, I can use the DAPI channel to define individual nuclei as 4x discrete ROIs to be measured independently.)
By doing similar for other channels (e.g. the telomere channel), I can combine objects (e.g. nucleus 1 and the telomere object) using the ROI Manager ‘AND’ function to create an object that is only the telomeres located within nucleus 1. By extension, I could then do this for additional channels to create an object that is nucleus 1 AND telomeres AND damage.
However, although ROI Manager allows me to measure useful things like the area of each object and the co-ordinates of the centre point, unlike your plugin, there is not a way (that I have found yet) to output a count of particles that comprise the object (e.g. if my nucleus 1 telomeres object actually has 46 discrete particles it can tell me the area they take up as a group but not how many there are). I can use the multipoint tool to count them manually, but the whole point is to automate the count to save time and standardise object identification.
I am able to use ROI Manager ‘Properties’ to set a colour fill for each object (e.g. nucleus 1 telomeres can be made red, while the rest remain white). I then load your Colocalization Object Counter plugin, set the colour to detect (e.g. to red), and press ‘Find 2D maxima’. The plugin creates multipoints, but for some reason it reverts to the original channel mask, marks all the telomeres (not just the ones that were highlighted red), and when I press ‘Convert multipoint to overlays’ nothing happens and no count is generated. So close!
Can you think how this might be resolved? I want to avoid having to manually ‘set inclusion region’ for each nucleus, as this shouldn’t be necessary after having done all the object identifying work. Happy to send a few example images if useful.
@@Mo11usq Im not sure i fully understand, but just a quick reply: " am able to use ROI Manager ‘Properties’ to set a colour fill for each object (e.g. nucleus 1 telomeres can be made red, while the rest remain white). I then load your Colocalization Object Counter plugin, set the colour to detect (e.g. to red), and press ‘Find 2D maxima’. The plugin creates multipoints, but for some reason it reverts to the original channel mask, marks all the telomeres (not just the ones that were highlighted red), and when I press ‘Convert multipoint to overlays’ nothing happens and no count is generated. So close!" The reason the plugin detects more than red things could be because either 1) the image is not actually an RGB image, but with overlays/fill colors you have created that show up as red, but that is just for the human. Maybe you have to convert the fill to "burn" it onto the image. I think this is done (if we are talking about red selections) by setting the background or foreground color in imageJ to e.g. red, then making selection, then Edit>draw. Make sure your image is RGB first. If 2) It detecs other things than red it may be that simply you have to put the noise threshold much higher. For 8 bit images max i 255. For 16 bit and RGB images you may have to put it much higher.
@@anlu2 difficult to describe this kind of thing clearly, my apologies.
As you said, the red highlighting of the telomere subgroup turned out to be an overlay for the eyes of the user, but not the computer. Clicking 'Flatten' in ROI Manager "burnt" the overlay into the image. Subsequently, 'Find 2D maxima' in your plugin placed points only on the red telomeres. However, 'Convert multipoint to overlays' still did nothing, and no count was produced.
I note that the multipoints generated by this process are small and white '+' with a cyan square centre, different from the large fully cyan '+' the plugin normally generates. Not sure why this should be, but it would seem this interferes with the ability to convert the points. I will soldier on. Any further insights are welcome!
Thank you for your time. I hope my comments at least bump up your video for the TH-cam algorithm!
@@Mo11usq try to remove and clear ANY selections, overlays or Rois from any potential source (e.g. roi manager) before clicking Find 2d maxima and/or convert multipoints
Hello,
I am trying to incorporate this imagej plugin into an fiji macro, in order to apply it to a large batch of images.
But since I can't operate on multi channel images well with a macro, I have to run the commmand Split... The plugin does not work well on single channel images, however. How can I make this plugin work on two single channel images (instead of a single image with two channels)? Or alternatively, how can I call this plugin from inside a macro without splitting the channels?
Thank you!
Which version of the plugin do you use? Latest with macro support?
@@anlu2 Thank you for the quick reply! I am using Colocalization_Object_Counter-1.2.0.jar from the github. I could record every command and implement it in my macro, but I struggle with the channel picking... I have a 4 channel picture, and I want to compare structures in channels 3 and 4. It works beautifully when I do it by hand, but my macro doesn't work because once the 4-channel image is split into 4 separate images the plugin does not seem to operate well... i'm probably doing something very wrong?
Do you know that you can change the active channel with macro? See here: imagej.nih.gov/ij/developer/macro/functions.html For example Stack.setChannel(n) or Stack.setPosition(channel, slice, frame) - Displays the specified channel, slice and frame.
@@anlu2 Huh. I did not know that! Thank you for being so helpful, and for replying so fast!
(And thank you for making this plugin!)
Hi, Anders, thank you very much for this very important image analysis plugin. I was tried to add the plugin to FIJI but it says the link is not updated. Could you please help me how to add this plugin to my FIJI software? my image is stained with zihel Neelsen staining and Sudan black My plan is to count/enumerate the Mycobacterium tuberculosis cells that has no lipid droplet, that has 1-2 lipid droplets, and that has >3 lipid droplets. So that I will calculate the mean Lipid droplet content of each bacteria isolated from patients. Thank you inadvance
Hi Daniel! I just tested it and the update site still works (sites.imagej.net/ObjectColocalizationPlugins/). Make sure you follow the instructions starting at 1:25 of the video, and make sure there are no spaces in the beginning or end when you add the update site.
@@anlu2 Thank you very much for the confirmation. I will try it again!
Hi, Anders, thank you very much. Now I managed to install the plugin and I am enjoying with your video and checking whether my image can be analyzed with this plugin.
Thank you for such a detailed explanation of this plugin. I will need to optimize my nuclear segmentation (my 10um tissue slices can be very densely population) but my main question is about the counter (part II). We count atherosclerotic lesions and sometimes we like to exclude regions from counting and/or look at hyperlocalized regions. Does the contouring feature of the counter accomplish this? Or is there another method you would recommend? When hand counting we visually exclude regions, but I am trying to figure out how to incorporate into this workflow.
The countour feature would not help with this. I think I would delete every image signal from outside the region you are interested in before counting: mark the area with freehand -> edit -> clear outside.
UPDATE 1.2.0: You can now control the plugin with ImageJ Macros. Update to latest version to learn more.
Hi, I'm a student at Imperial College London and I would love to cite your paper in my project but just to confirm whether my images could be analysed using your pipeline, could i send you a few of my images to your email? My acquired images are overlapped (2 channels) and and the intensity is not quite uniform :(
Yes please send and let me know what your goal for quantifcation is. Lunde.anders@gmail.com