Measuring dendritic lenght_problem with analysis in binary

Hello everybody,

I am having an issue with some images to analyze for dendritic length measurements. Basically I am able to analyze some images and not others, but all images (all with stacks) are apparently similar, same experiment, microscope, etc. all taken the same way.

I have .tif images. Some of them I can process them as binary, use the Simple Neurite Tracer tool and analyze them. Some others, despite doing the exact same process and inputs, once opened in binary, appear all black or all white. It seems like the program does no longer distinguish between white and black, but they are either all white or all black. We use the binary function called “max entropy”, but even trying all the other available I cannot solve the problem. I have also noticed that the images giving the problem have very complex dendrites.
I really hope someone knows how to help me.
Thanks,
Marta

@marta

Perhaps @tferr can help you in this issue with SNT? Would you be able to provide one of those ‘problem’ images and then the exact parameters/steps you use that reveal the issue? That will help us better help you.

Sure!

These are the steps I follow:

  • File > Import à Bioformats (it should be written Color mode: Composite, be sure that “use virtual stack” is not selected > OK

  • Image > Type >8bit

  • Image > Stacks > Reslice Z > OK

  • Edit > Invert > Yes

  • Image > Properties > 0.185 pixel width, pixel height and voxel depth

  • Be sure the image reports micron

  • Process > Binary > Make binary (Method > Max entropy, background > Dark; flag black background)

  • Reopen the original image (import > Bioformats > OK > Image > Stacks > Reslice Z, the number of stacks should be the same in both opened images)

  • Plugin > Segmentation > Simple Neurite Tracer

  • Select No 3D view and close Console

  • Select Hession based analysis

I have tried to upload images with no success, they are too heavy I guess

I have tried even zipping an image, no success, any idea on how I can upload one?
it is 636,069 KB

@marta

You can always share it via a link to a file sharing site - such as Dropbox…

Here is the links to two 2 images:
http://catechistismdg.altervista.org/archivio/B1N1.zip
http://catechistismdg.altervista.org/archivio/B1N6.zip

B1N1 works, I can analyze it
B1N6 has the issue that I mentioned

Also I uploaded here an image to show how I see the image that works (on the left - B1N1) and on the right the one that has the issue (B1N6 - I see all stacks like this)

@marta

In B1N6 you have a ‘gap’ on the side - perhaps the edge of the sample? This area is quite bright - which is why your workflow isn’t holding up with this particular example. You could consider cropping this extraneous region out? Try that… and see if it improves things. You are right to acquire everything together - same sample prep, microscope, settings, etc. But obviously - the field-of-view of this particular dataset includes this bright background area which is throwing things off.

1 Like

@etadobson
it worked! Thank you! However, I have noticed that in 5 out of 30 images if I crop the bright region out I can not analyze a little piece of the dendrite. Do you (or anyone else) think that if I analyze that piece without binary I introduce a huge mistake in my analysis?

A new issue has emerged: I have some images to be analyzed that are results of stitching because of a long dendrite. I have noticed that doing the exact same passages that I said in my previous post, the length results in pixels, not microns as instead is in the image not stitched, es. B1N1. Should I convert the length in pixels in some way to have it in microns? should I consider them the same? Sorry, but I am new to this analysis.
Thank you for the help

@marta

Ideally - you treat all images in your analysis the same… you shouldn’t modify anything in your workflow to accommodate an image here or there - basically you are then biasing your results.

Yes - you can Spatially Calibrate your stitched images… you can use Set Scale… to do so.

OK, I figured. I am going to just exclude those images from the analysis, then.
Thanks for the tips about conversion!

1 Like

@etadobson

I have tried what you recommended and I have used “Analyze -> Set Scale”, but I have noticed that the program gives me the same measures in pixel and in micron.
I have also tried the following getting the same results:
I opened a not-composite image (which shows measures in micron) and I used the Line Selection tool to draw a line. I measured the line with Roi Manager getting 52.944 um. Then I pasted the same line on a different image, a composite image (which shows measures in pixels) and I measured the line with Roi Manager again. The value of the measures I got was the same (i.e. 52.944) but pixels!

Then I have tried another method: using “Analyze -> Set Scale”, I have changed “Unit Length” from pixel to micron. I noticed that the report down below changes from “5.404 pixel/pixel” in “5.404pixel/micron”, but the value of the paths measured doesn’t change!
scale 2 scale 3

I have tried to do the aforementioned after reading it on this link https://imageJ.net/Spatial_Calibration, but I I do not have the parameters needed to calculate the line that I drew with the Line Selection tool: as written in the link above, they use a sort of “centimeter” to define how many microns the pixel measure line corresponds. I don’t have this “centimeter” and I don’t know another way to change the measure from pixel to micron. Do you know how can I get this “centimeter” on the image or if I need to use another parameter to convert the value?

According to the link above, I should change the “Know Distance” writing how many pixels long the line I draw is! But I don’t know this (dotted value in red)!

Given that the program measures the same value in the two different images (52.944 microns in the not-stitching image and 52.944 pixels in the stitching image), I wonder if the two measures are actually the same, and there is some kind of algorithm that is already doing the conversion, therefore I can consider as if 52.944 pixels were 52.944 microns when I analyze the stitching image (ultimately to measure dendrite length).

Let me know your thoughts on this, please
Thanks!
Marta

@marta

Ok. I’m not gonna lie… but I’m confused now. So we are in the same boat.

This was what I thought the situation was: You have a single field-of-view image that is calibrated in microns, but your stitched image (for whatever reason) loses the calibration so you need to reset it.

If this is the case - you can: 1) Go to Set Scale in your calibrated image and only note (do not change) the values. 2) In stitched image - which somehow loses the scaling information - adjust the values in Set Scale to match those in the calibrated image.

Does this work?

@etadobson

I have tried and it worked! Thank you so much for your help! I got confused too, trying to understand how to fix the issue.

Anyway, for your information, I have just analyzed a dendrite with the scale set as you suggested and the values that I get are exactly the same as the one I got when I analyzed it in pixels.

Thanks again, you saved me!

Marta

1 Like