Problem with RunImageJ module

Hi, Im trying to use a plugin from ImageJ (Tubeness) in an existing workflow which does a nicer job of processing mitochondrial networks in my images (segmentation is much better than with either a tophat, or the enhance neurites feature of ‘enhanceOrSupressFeatures’), so I really do need this plugin (or to re-code it in python)…

But… Its been very intermittent getting it to work, and now its not working at all. Im sure its a Java environment problem an not a cellprofiler issue per se, but perhaps someone has a solution…

Let me explain my setup. On my winXP 64 workstation, at first, as the Tubeness plugin is not in the imageJ version provided with cellprofiler, I changed the path in the cellprofiler preferences for imagej plugins to point to the FIJI plugins folder (tubeness is in the VIB_.jar in /plugins in FIJI).

On my workstation this got things working for a while, I could load up cellprofiler with the macro below in the runImageJ module:

run(“Tubeness”,“sigma=1.0000 use”);

and get back the output of Tubeness ready for further steps in Cellprofiler. I could also execute Tubeness manually through the imageJ interface (open IJ interface with show button in the cellprofiler module, open an image, and execute tubness plugin).

So this was intially looking good, during a few days I had run on a few images and cleaned up the rest of the workflow. I had even shut down the workstation, installed cellprofiler analyst, done some other updates etc.

However, my attempts to get the same exact CP workflow to run on a different machine has failed - eg on windows server 2003. On the other machine, I could see the plugins in the plugin menu, I could run the plugin on an image, and get the first menu to set the Tubeness parameters, but after ok there is the error:

'Plugin or class not found: “Tubeness_”
(java.lang.ClassNotFoundException: Tubeness_)

Now, I also got a bit fancier with IJ macro batch mode and tried to clear memory (I’m describing everything incase it has an impact…)

run(“Tubeness”,“sigma=1.0000 use”);

However, today I started running into various problems.
First I was getting back a weird image from the ‘runImageJ’ step, the image was dark with only about 4 grey levels, so subsequent segmentation with CP was really off. The imageJ macro was running though… Now, I got around this problem when I chose not to ‘hide all windows on run’, & removed from the macro the lines ‘BatchMode’, and the GC step.

As I wanted the results, I started running over a full experiment (45 images) - closing IJ windows as I could - I got 90% through then IJ was out of memory.

Now the worst part. Since the out of memory, I have completely lost the ability to run the tubeness plugin from the CP imageJ on my workstation. I’m now in the same situation as on the windows 2003 server. I tried many many things, rebooting, re-point8ing to the Fiji/plugins folder, runing Fiji at the same time, copying the plugins folder from Fiji to /cellprofiler/plugins , copying also the plugins to /cellprofiler/imageJ/plugins nothing has worked…

the classpath from the IJ|plugins|utilities|ImageJ properties is:

java.class.path: C:\Program Files (x86)\CellProfiler\bioformats\loci_tools.jar;C:\Program Files (x86)\CellProfiler\imagej\ij.jar;C:\Program Files (x86)\CellProfiler\imagej\imglib.jar;C:\Program Files (x86)\CellProfiler\imagej\javacl-1.0-beta-4-shaded.jar

but that classpath was the same before when Tubeness worked!

thanks in advance if any one can help!

Hi Keith,

Sorry for the trouble. RunImageJ is a little temperamental, we realize, at least the released version. Let me take a guess first, and then offer a potentially better solution going forward.

  • Try adding a space after “Tubeness” in your macro, so that it reads

I had run into this quirk myself, and honestly, never followed up on its cause.

As an aside – Glad you found the Tubeness plugin, which I have also found to be very useful for a number of phenotypes (which I plan to include in some assay development papers in the not-too-distant future).

Because of these sorts of issues, we have been implementing some ImageJ 2.0 features (along with lots of interactions with the ImageJ 2.0 folks, of course). I am using what we are calling “tubeness 2.0” myself, and so it can (ok, should) work for you. If you are still running into issues after the above hack, try this file instead of the original Tubeness plugin (I recommend replacing it, as they may conflict in the same plugin folder):

The implementation has been totally rewritten in a more CP-compatible format by our lead programmer, Lee Kamentsky. Use these tips as a guide:
*Use “Command” instead of Macro, and choose Tubeness2 0 from the long drop-down next to “Command:”
*Input Image and Sigma should be obvious
*Name the “Output image”
*For most uses, uncheck both “Set the current image?” and “Get the current image?”
*Leave the rest default

Though you don’t need them to do the above, there are lots more updates to CP to be found here:
Developer’s Wiki:

and if you are less adventurous and don’t want to compile the python code yourself right now, you can run these bleeding-edge compiled versions:
Trunk builds:

Let us know how it goes!

Hi David,
Thanks to your suggestions I got the java tubeness 2.0 plugin working inside a beta build of cellprofiler2.0 (beta 2.0.0 b2638e9), I can set ‘command’ and the ‘tubeness2.0’ and then the parameters for this plugin. This is a very useful addition to cellprofiler!

However, I also tried putting the tubeness2.0.jar in my current prod r11710 version, but I can’t seem to get it to work in the older version.
I tried doing this, as in my installed version of the beta above, I can’t read Cellomics .C01 files that I can open just fine in the r11710 (in the beta they don’t show up in the list of files in the bottom left) - perhaps the beta is missing something in the way of the bioformats libraries?

I’m thus wondering if there is a build that 1) works with tubeness2.0 & 2) can read .C01 files.

many thanks again, and best regards,


Hi Keith,

I’ve just committed an addition tothe source code which will enable .c01 files to show up in the directory panel. You can grab the latest trunk build (which incorporates the change) from the webpage that David pointed to earlier. Also, you can always select the .c01 image for display using File > Open image and change the selection from “Images” to “All files”.


Thanks Mark! This will help.