Quantifying neuron blebbing with ImageJ

Hi, I have images (.tif) acquired from mouse neurons during calcium imaging after excitation with glutamate. I am trying to analyze the images to quantify blebbing under the effect of glutamate or some neuroprotective drugs. Since I am not an expert I am using a small macro to pre-process the image, after which I threshold the image. I need something like no. of blebs per fiber length.

My question is if someone could show me the right tools to use in image J. I can share some .tiff images if needed.

Below is what my macro looks like. It is doing a good job but not perfect.

After threshold, I use the "analyze particles’ and try to find the fibres being linear structures and blebs being more circular structures.

Not sure if I have explained my question well, but I think I could share some images if any one out there would like to help. Thanks!

run("Rename...", "title=Sequence");
run("Set Scale...", "distance=1 known=0.22 pixel=1 unit=um global");
run("Duplicate...", "title=Duplicate duplicate");
run("Gaussian Blur...", "sigma=1 scaled stack");
imageCalculator("Divide create 32-bit stack", "Sequence","Duplicate");
run("Duplicate...", "title=ForOverlay duplicate");
selectWindow("Result of Sequence");
run("Threshold...");  // open Threshold tool
  title = "WaitForUserDemo";
  msg = "Use the \"Threshold\" tool to\nadjust the threshold, then click \"OK\".";
  waitForUser(title, msg);
  getThreshold(lower, upper);
  setOption("BlackBackground", false);
run("Make Binary", "method=Default background=Default");
run("Options...", "iterations=1 count=3 do=Erode stack");
run("Dilate", "stack");

Hey @sia

Posting images is the best way to get solid feedback … so post one or more sample images - indicating the objects you want to properly segment/count - and I’m sure the community can help you.


1 Like

This is an example of a pre-blebbed (pre-glutamate) image where I am trying to delineate the nerve fibres. Ideally I would like to report the ‘length of nerve fibres’. The closest measure I could find was perimeter.

I can share the same analysis on blebbed images in my next post

Here I am trying to identify the blebs, so during analyze particles, I do Circularity 0.6-1 instead of 0-0.2 for the fibres in my previous post.

Is there a way to refine the pre-processing. I feel that the above analysis is doing a OK job but when I replicate the above parameters to other experiments, I run into difficulty with some biological variability and poor thresholding that identifies the fibres and blebs poorly. Please help. I can share any other information needed!

Instead of a thresholding i would try to do the segmentation with the Trainable Weka segmentation plugin. It should be easier to differentiate the ‘blebs’ from the nerve fibres. I just tried it on a couple of your images and seems to work alright… If you have multiple images, try to make a stack and then run the plugin by selecting the features you wish to measure.

Thats just a quick example of what the plugin did with one of your images -


Hi Praveen, thanks for pointing me towards the Trainable Weka. As I am beginning to use it, I understand that this requires differentiating between the fibres vs. blebs vs. background (or noise etc.) What drawing toools did you use, just the free hand and the cricle? Also "what was the third class you created. I assume the green class was the background but how did you train the plugin for finding the background. Thanks a lot. This sounds like a great tool.

Also, one more question Praveen. What filters would you suggest from the settings tab. I am trying random filters so as to see which one might work best.

Hello Sia,
I used just the free hand tool to make my selections but you can also use the circle tool, it works fine. You can create as many classes as you want based on how which features you would like to differentiate and measure in your images. In my previous post, I think i differentiated your images based on small round blebs, big bright blebs and fiber length (if thats what they are called, sorry i am a plant scientist :wink:)

To answer your second post. Here is a screen shot of the filters i used.

And what the segmentation did:

Here is a better example with just the Hessian filter

And the segmentation:

1 Like

Thanks a lot for shaing!

Hi Praveen, Sorry to bug you again. How can I do something like “analyze particles” after I have done the segmentation?

The “Get probability” button will create an image with one slice per class, corresponding to the computed probability of each pixel being that class. You can then threshold those probability maps as normal to create masks, as described in the flexible segmentation workflow. And then you can apply your final mask as a selection to your original image and then run Analyze Particles on it! :trophy: