Measuring the length of tight junctions



I am new to CellProfiler and I was hoping that someone could give me some tips on a pipeline that I am working on. I aim to calculate the length of tight junctions in an image. In this particular experiment, the cells were stained for Occludin (a tight junction protein). I started the project but I am having trouble identifying the objects in my image (i.e the threadlike structures). I have attached the project to this post. I look forward to your feedback.


occlengthprep.cpproj (402.3 KB)


Neat! Beautiful images. Can you clarify what length means in this context? From where to where?


Thank you for your swift reply. I am trying to measure the total length of each branch (thread-like structure) in this image (in other words, the combined length of all the white lines in the picture). There is not a specific start and end point. I hope this explanation is clearer. Thanks.



Perhaps you could try the following to get a rough estimate for total length without skeletonizing the image:
(1) enhance edge/ridge information such as median filtering to reduce level of noise specks in image (NB this should eliminate the small specks but not large dots shown)
(2) apply thresholding to binarise the image (for automatic global threshold e.g. otsu method)
(3) apply dilation and erosion to reduce branches to single pixel thickness
(4) count the number of pixels above threshold in processed binary image
(5) to estimate length, multiply total count of pixels by spatial dimension of each pixel (assuming dx=dy)

By first applying this approach to a random sample of subimages and comparing the estimates to hand tracing you can then check whether this rough approach will accurate enough for your needs.


Indeed, I was going to suggest EnhanceOrSuppressFeatures then Morph (using the skeleton option), but you’ve nicely spelled out the full strategy. But I’m curious why do you suggest to avoid skeletonizing?


Great! I was able to incorporate components of both suggestions in my pipeline and had results that were fairly similar to previous analysis done with a different software. Thank you for the help.



You really made a wonderful images. Recently, I also want to measure the length of mitochondrial in the cells. They are thread like, and it is difficult for me to calculate. Could you please show me how you solve this problem? Thx. Or can you send the .cpprope file to my mailbox?

Best regards,



You should find the pipeline attached below. I would try to hand-trace the
mitochondrial structures first and find their length in order for you to
see if your results are comparable with the one given by this pipeline. Feel free to let me know if you have any other question.

ZO-1length927.cppipe (7.68 KB)



Thank you for your reply.

I just use your image and try the pipeline. Your measurement is excellent. We can get the total length of the treads.

I only have one question. In fact I am more interested in the length/area and other shape feature for each thread. Or to be more precise, the length of thread among the connection point. It is impossible for me to use cellprofiler to identify them. Do you have any suggestion?

Thank you.

Best regards,



I am not really sure I follow what you are asking. If you are referring to
the length of one specific area in the image. I think there is a way on CP
where you manually select your area of interest. Could you possibly use a
picture to demonstrate which area/shape of interest you want to measure.


Hello jnarlyv:

I attach the image here. I use different colors to label the different objects I want to measure. That is, the thread between two connection points.

Please find it in the dropbox (maybe you cannot see anything here, but please click and get the right image):

Thank you.


You can try to identify the objects manually and measure their length
individually but this will be very time consuming since you will have to
repeat the procedure for every object you selected.


I wonder if MeasureObjectSkeleton (formerly known as MeasureNeurons) might be useful? It certainly does not do exactly what you want but one useful property is that it will export X Y locations for branchpoints in the image. I could imagine then writing a script outside CP that would follow the white paths between branchpoints and measure their distance. You could also just measure the straight-line distance between X Y points if you wanted an approximation just to make it easier - because you could do this in a spreadsheet program no problem!

Admittedly this proposal would be a weird usage of MeasureObjectSkeleton - I actually don’t know how you would define objects prior to using it. Perhaps just identify the entire interconnected network as a single object?

This would certainly be more pleasant than measuring everything by hand assuming you have more than a few images… but this definitely requires some effort and thinking to get it to work!


Thank you for your reply. In fact, it is an important application.

Please find this article “Colloidal Gold Nanoparticles Induce Changes in Cellular and Subcellular Morphology”, ACS NANO, 2017, 7807-7820.

In the Figure 5, the author analyze the Form factor and Zernke 0th order of mitochondrial (Figure 3


I have a lot of question to ask. But first, let it be simple;

  1. Why choose Zernke 0th? not 1st, 2nd?
  2. You can see the mitochondrial is quite thread like in HUV cells and they are getting overlap. Thus, it is difficult to analyze it.

I know the author use Cellprofiler to analyze this data. My question is, how to define those mitochondrials? And I am also interested in their length.