Counting labeled neurons in a Z-stack

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Counting labeled neurons in a Z-stack

MrScientistman2
Dear ImageJ list,

I want to count the number of retrogradely (using fluorescent
rhodamine-dextran amine) labeled mouse embryonic nerve cells in a
specific brainstem nuclei. From estimates we think its somewhere around
1000 cells in this group.

We have transversally sectioned the labeled cell-group in 50 micron
thick slices (cryostat) and stained the slice with a nuclear
counterstain (Hoechst). Then, on a Zeiss 510 Meta confocal microscope I
made a Z-stack of each section with a 40x 1.3 numerical aperture
objective with 1 micron thick optical slices (a total of about 20 slices
for each stack due to some shrinking and optical phenomena).
I then use the “RG2B Colocalization” plugin to extract only the
retrograde labeling signal that also overlaps with hoeckst, such that I
get only the nuclei of the rhodamine stained cells (using the macro
below to speed up the process). I use the “average of the red and green”
option in the RG2B Colocalization plugin as an output for the
colocalization result.

The resulting image-stack seems to be of usable quality to use for
counting cells. You may download the original confocal image and the
RG2B colocalization result (using 50 as hoeckst threshold and 30 as
retrograde labeling threshold) result from here
(forimagejforum.zip-file, 70 MB): http://www.filedropper.com/forimagejforum

However, there are some issues that I would love input and help on:

1) How do I best count the cells from the resulting stack? I’ve
experimented with the “3D viewer” plugin for ImageJ, and it seems to be
useful. Especially if I increase the voxel-depth (Ctrl+Shift+P) before
starting the 3D-viewer. However, when cell densities are particularly
high (as in my sample image), it is difficult to get a good view of the
3D-model. Are there any other free 3D-view programs that would do a
better job? The wiremesh also seem to change appearance when I rotate
the model and won’t return to original.

2) I would like to split the 3D-model into several smaller models to
facilitate counting. For example, I would draw a line in 2D mode across
the middle of the image, carefully avoiding any cells, and to the same
for every Z-stack. Then I would like some program or plugin to split the
image across the line in every stack such that no cell should be split
in half. Unfortunately I don’t think my scripting abilities are up to
this task. Anyone can give me some good pointer for this?

3) When counting the cells in a 3D model it would be useful to have the
possibility to mark some cells/areas with a color to indicate that it’s
been counted. Are there any good programs/plugins for this?

4) I also consider the option to count the cells in the 2D-view as a
stack. I would mark the cells that I’ve counted in every stack using the
paintbrush tool. However, this is very time consuming compared to
counting from a 3D-model. What do you guys think about this method?

5) Would it be a good idea to have some kind of
“object-shrinking”-method, to reduce the size of the nuclei? I can’t
seem to find a good plugin for this.

6) I’ve only added a “Remove outliers” step as filters. Any other good
methods?  run("Remove Outliers...", "radius=5 threshold=50 which=Bright
stack");

7) FYI I plan on counting all cells, then subtracting the number of
cells that touches the first Z-stack. This will statistically give the
correct result (same way as you would count with a hemocytometer). The
reason I want to do this in as large as a 50 micron section is to avoid
bias introduced by "cutting" cells in half like this.


Any help would be greatly appreciated!

Best regards
Anders






//OPEN FILE TO START ANALYZE AND GET FILE INFO

filepath = File.openDialog("Select a file to start to analyze");
open(filepath);
dir1 = File.directory;
Stack.getDimensions(width, height, channels, slices, frames);
filename = getTitle();
dotIndex = indexOf(filename, ".");
title = substring(filename, 0, dotIndex);

open(filepath);


//MANUALLY SET THRESHOLDS FOR LATER USE IN RG2B PLUGIN. JUST WRITE THE
CHOSEN VALUE IN THE TEXT-BOX AND CLICK OK TO CONVERT TO MASK

run("8-bit");
run("Split Channels");

selectWindow("C1-" + title + "-1.lsm");
Stack.setSlice(slices/2);
run("Threshold...");
waitForUser("Confirm that channel#1 threshold is set appropriate, or set
new in the following dialog");
Dialog.create("Ch1");
Dialog.addNumber("Threshold:", 40);
Dialog.show();
x = Dialog.getNumber();
setAutoThreshold("Default dark stack");
setThreshold(x, 255);
run("Convert to Mask");

selectWindow("C2-" + title + "-1.lsm");
Stack.setSlice(slices/2);
run("Threshold...");
waitForUser("Confirm that channel#2 threshold is set appropriate, or set
new in the following dialog");
Dialog.create("Ch2");
Dialog.addNumber("Threshold:", 40);
Dialog.show();
y = Dialog.getNumber();
setAutoThreshold("Default dark stack");
setThreshold(y, 255);
run("Convert to Mask");

selectWindow("Threshold");
run("Close");


//CLOSING MASK-WINDOWS

c1 = "C1-" + title + "-1.lsm"
c2 = "C2-" + title + "-1.lsm"

selectWindow(c1);
rename("hoechst");
run("Close");

selectWindow(c2);
rename("dextran");
run("Close");


//OPENING ORIGINAL FILE AGAIN AND RENAME CHANNELS

open(filepath);
run("Split Channels");

c1 = "C1-" + title + "-1.lsm"
c2 = "C2-" + title + "-1.lsm"

selectWindow(c1);
rename("hoechst");
selectWindow(c2);
rename("dextran");


//RUNNING RG2B COLOCALIZATION WITH CHOSEN THRESHOLDS (Dextran vs Hoe)

run("Merge Channels...", "c1=[dextran] c2=[hoechst] c3=*None* c4=*None*
c5=*None* c6=*None* create keep ignore");
run("Stack to RGB", "slices");
run("RG2B Colocalization", "minimum=0 red=x green=y set=[the average of
the red and green] display=[as an RGB image]");

//CLOSING UNWANTED WINDOWS

selectWindow("RG2B Colocalization - Composite");
close();
selectWindow(filename);
run("Close");
selectWindow("hoechst");
run("Close");
selectWindow("dextran");
run("Close");

//CHANGING Z-PIXEL DEPTH TO EASY VIEW IN 3D-VIEWER

selectWindow("Colocalization Data - Composite");
run("Remove Outliers...", "radius=5 threshold=50 which=Bright stack");
Stack.getDimensions(width, height, channels, slices, frames);
run("Properties...", "channels=1 slices=slices frames=1 unit=pixel
pixel_width=10 pixel_height=10 voxel_depth=30");

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html