.nd2 images are not correctly recognized



Hi all!
Some time ago i developed a pipline to safely measure the CSA of muscle’s fibers.
The program work pretty fine, confirming that Cell Profiler is a powerful program, but i have problems with some .nd2 files.
I have two .nd2 files containing tritc and dapi channels; one is correctly running through the program, while the other is not correctly processed.
The two images are from the same sample and the only difference is that the first one is over-saturated, while the second one is far better.
Probably i’m overlooking something, but nonetheless i’m buffled by this problem.

This is the pipeline CSA_3.0.cpproj (706.3 KB)

This is the working image: CTRL

This is the not working one: PRDN

Thank you for the help!


In NamesAndTypes you selected image type as “Binary mask”. I’d go with Greyscale image instead.


it could work, but i’ll have to change the pipeline adding a treshold step to obtain the mask. What i don’t understand it’s why the same type of image, in the same format, taken on the same machine and with similar parameters are recognized differently. The first one work pretty fine as binary mask, while the other one doesn’t.


I’m surprised it worked in the first place! You are working with a greyscale image but treat it as a binary mask in CP. No idea how the image is converted in such a scenario. And obviously you ran into problems because your “PRDN” image has a shifted histogram, so whatever conversion CP did, it just worked differently because of shifted intensity levels. Explicit thresholding is a MUCH safer bet in your case.


@maciekd yeah, i understand what you mean and it’s what i’m doing now.
I followed your suggestion in the first comment and applied a tresholding step.
Nonetheless i’m curios about this difference. the fist image that was working was provided to me from another lab, while the other was taken by me. As you can see i was meticulous in setting the parameters to take all the range of values and avoid a “shifted” histogram.
Now, i just want to understand why it worked in the first case and why it didn’t in my case. Just to clear and understand the inner mechanism that give this abnormal behaviour.


Nice catch @maciekd! You’re right that explicit thresholding here is certainly always the way to go.

From the CP help from the NamesAndTypes- “Load as Binary Mask”-

For this option, the input image should be a binary image, i.e, foreground is white, background
is black. The module will convert any nonzero values to 1, if needed.

Looking at your images in ImageJ with the thresholding set to 1- aka showing which pixels are 0 and which are >0, it becomes clear why you saw a difference between the CTRL and PRDN.