runImageJ doesn't accept color image


Hi, i’ve been struggling to utilize runImageJ module. I finally gave up on installing CP 2.1.1 on Ubuntu workstation and decided to work on my Windows PC. So easy to install CP 2.1.1 and make runImageJ module run the desired ImageJ plugin. But it seems that CP doesn’t allow runImageJ module to accept color image! but the input has to be color, because the plugin is supposed to count positively stained cells (brown color) from IHC images.

is it just an error or runImageJ modules is designed that way so that it does not accept color images? if the latter is true, then I don’t have to stick to runImageJ module anymore…


From the code for the runImageJ module:

input_image_name = self.current_input_image_name.value
            img = image_set.get_image(input_image_name,
                                      must_be_grayscale = True)```

So yeah, looks like the way pixels are passed back and forth, CP restricts you to only using grayscale images.  You could tinker with the code to see what happens if you set that to False and try to use it on a color image, but my guess is it won't actually work.  Sorry!

FWIW, work is [actively ongoing]( for reintegrating the two pieces of software in future versions- if you want to find out if/request that it'll include compatibility for color images, you should check out the GitHub issue I just linked to.

ImageJ module problem on MacBook Pro