Measure fiber structures in individual cells


Good afternoon,

I am a very new Cell Profiler user and I was wondering if what I am trying to measure is possible using this program. My goal is to quantify actin stress fibers in cells expressing my protein of interest: this means that in my images only one or two cells would be of interest since they will be expressing the protein I am studying. I am acquiring confocal images and exporting data as multichannel tiff. Is there a way to load the multichannel tiff files in Cellprofiler and maybe it can recognize the different channels? and also can I first find my cells of interest based on the antigen I am looking, which will be in the blue channel, and measure only in this population the actin fibers? Is there a way to recognize this stress fibers as elongated structures? so far I was only able to recognize round objects in my images.

Your help will be really appreciated!!

Have a nice afternoon



Hi Guada,

On the face of it, CelllProfiler should be able to do what you want. But loading multiframe files can be tricky, partly because there are so many formats to account for :smile:

Have you looked at our tutorial on the subject?, under “Loading image stacks and movies”. If that doesn’t help, we can take a look if you’re willing to share an example file. Unfortunately, uploading attachments isn’t working right now, so you may have to use Dropbox or similar to post it.


Hi Mark,

Thank you so much for your fast reply! Sure! I am attaching a dropbox link for one of the images I typically work with: it consists of 2 color channels and is a z-stack from confocal microscope. This is the exported ,tif file but if it is better I also have the raw (.lsm) files. Since the stress fibers I am looking for are visible in one z-position I wonder if I will not have to extract the z-position of interest before analyzing the data? Or if you have any other suggestion it would be great!
Also for the identification of the stress fibers (red channel) specifically in the infected (green channel) so far I got to the point to select the primary object as the green cell and as secondary object I used as input image the red channel and as input object the green channel using the Watershed-gradient method to identify the objects. This way I can manage to see the infected cell in the red channel. At this point how can I differentiate the fibers in the selected cell? Sorry to ask so many questions! I would be really happy if I can make this work since I have many images to analyze! :smile:
Thank you again!!
Have a good day!


Here is the link to one image: … 7.tif?dl=0


Would you mind posting the original LSM file. The exported TIF seems odd; it’s as if all red slices are stacked together, then followed by all the green slices; CellProfiler is having a hard time interpreting it…


Hi Mark,

Thank you very much for your answer! and yes no problem here is a link to the lsm file. I am sorry the tiff did not work well.

Have a nice day!

Guada … 7.lsm?dl=0


Hi Guada,

Definitely use the LSM over the TIF. You can use the Metadata module to read the file, by selecting “Extract from image file headers” as the metadata extraction method, then press the “Update metadata” button. Then in NamesAndTypes, you can select the slices using [Metadata][Does][Have C matching][0] for one channel and [Metadata][Does][Have C matching][1] for the other. If you want to pick out one frame, you can add [Metadata][Does][Have Z matching]] to both of these rules. Then, also in NamesAndTypes, in “Image set matching method”, switch it from “Order” to “Metadata”, and select “FileLocation” for the top row for both channels, press the “+” button to add another row, and select “Z” for both.

The primary/secondary scheme works best when there is a nicely-separated sub-cellular compartments (e.g., nuclei) that can be used to serve as a cell “guide”. Without it, I’m running into the problem where one red cell begins and the neighbor ends becomes quite hard to determine. Is it possible to include a DNA stain as a channel?



Hi Mark,

Thank you very much for your help! I will try to extract the z-planes of interest using the metadata as you suggest! That would make the measurements so much easier!
Unfortunately these experiments have another viral protein in the blue channel so it was not possible to do the nuclei staining. So, I was wondering if to determine my cell of interest it would be possible to use the green channel? For my measurements I do not care about the surrounding cells I only care about the one that is expressing the green in it. For that reason I was thinking if I can select the area in the the green channel and use that area to measure the fibers intensity in the red channel that would be really great! I tried a very short combination of modules using greyscale images and it seems to determine the area of interest according to what I would like but I can no make it recognize the fibers instead of the total intensity of the whole cell of interest. I am probably doing something incorrect :blush: so I would really appreciate if you could take a look? I am sending you a link to the project and the 2 images that I used in this case (both in greyscale one for the green and the other for the red channel).

I really appreciate your help!

Have a nice Friday! :smile:

Guada … T39fa?dl=0


I’m posting a modified version of your pipeline, given your above comment. The changes are the following, and I make a fair number of assumptionns:

  • Enabled size filtering to get rid of the smaller objects, which I assume are spurious.
  • Added EnhanceOrSupress to remove the background and acentuate the fibers.
  • MeasureObjectIntensity to measure the intensity within the cell from this enhanced image.

The pipeline is here:


Hi Mark,

Thank you very much for your answer! Your pipeline looks very nice and helpful! however I had a question about the results I am getting (sorry to bother you again!!): When you identify the secondary objects and use as thresholding strategy ‘per object’ what I understood is that it would threshold the image based on your region of interest which is indicated by the mask? but does it mean that in the following steps the program does not see the other areas in the image and so when you measure intensity it will only give you the intensity within this region? or the value that the measure intensity module gives me in the integrated intensity of the whole image using the ROI as a reference for the thresholding value?
I also have another question about this data set: would it be possible to recognize each actin fiber as an individual element? In this case I would not care about the red channel I am interested in differentiating the fibers from the background and measuring the length, count and intensity in different conditions. Is this possible using CP?

Thank you very much for your help! and sorry for the inconvenience!




It’s the latter. The MeasureObjectIntensity uses only the pixels within each object to compute the intensity statistics. This is the case, BTW, regardless of what thresholding strategy is applied to create the objects in the first place.

This might be possible by adding an IdentifyPrimary module using the output of the EnhanceOrSupress module as input.


Hi Mark,

Thank you very much for all your useful comments. I now modify the previous pipeline and it seems to be doing a good job in recognizing the fibers only inside the masked area, which is defined by the second channel. I am now finding some issues in the moment of the measurements: I would like to measure the intensity of the objects in the masked area and the total area in which this objects are contained which should be the mask. I am measuring the integrated intensity then adding a calculate math module to extract the line of interest. After that I am measuring the area of the masked area and adding a calculate math module to extract the line containing the information of the area. after this I am adding a final calculate math module to multiply the intensity and the area that I extracted in the previous calculate math modules. The problem is that I am not getting at the end the multiplication of the first 2 numbers I got but a different value and I can not understand why? I tried in many different ways and I am not so sure to understand what is happening :confused: .
I am attaching the pipeline and a link to the sample image in dropbox (I could not upload the extension .lsm).
Thank you very much!
Have a good afternoon.

Guada … 9.lsm?dl=0
Pipeline_finalSF.cpproj (80.5 KB)


Hi Guada,

I think what might be happening is that you want to measure the total area of the SFMasked objects, but that is not what you are measuring.

MeasureObjectSizeShape is measuring the morphology of each individual SFMasked object; the total area of all objects is not included. One way to do this is use MeasureImageAreaOccupied but that is a per-image area and wouldn’t work if you have more than 1 masked area. So I would recommend the following instead:

  • RelateObjects to establish a parent-child relationship between the SFMasked “children” and the enclosing InfectedCellObject “parent”.
  • ReassignObjectNumbers to unify the SFMasked children with “Per-parent” as the unification method and InfectedCellObject as the parent. This will produce a single object (call it UnifiedSFMasked) with all the original SFMasked objects. The nice thing here is that any measurements on the unified object are performed across all component objects. It also insures that any downstream calculations with the unified objects and the parents will be 1:1.
  • MeasureObjectIntensity, with SFOutlines as the input image and UnifiedSFMasked as the input objects.
  • MeasureObjectSizeShape with InfectedCellObject as the input object.
  • CalculateMath for the intensity ratio, with UnifiedSFMasked > Intensity > IntegratedIntensity > SFOutlines as the numerator, and InfectedCellObject > SizeShape > Area as the denominator. The result shown is just the averge of the object measurements, not the final answer; you need ExportToSpreadsheet for that.

Keep in mind, that if the parent InfectedCellObject consists of multiple fragments/pieces, the UnifiedSFMasked objects will be broken up similarly. Therefore, if you have 3 InfectedCellObjects in the field-of-view, then you will have 3 UnifiedSFMasked objects, and hence 3 ratios, one for each. If you want a single value per-image, then you are better off using MeasureImageIntensity with SFMasked and SFOutlines, and MeasureImageAreaOccupied with SFMasked.



Dear Guada
I am a new user and I would like to quantify actin stress fibers. Were you successful? I am not sure that CellProfiler is my best bet and would like to hear from a user who has used it before learning how it should be done. I need to distinguish cells with strong stress fibers from cells with more random F-actin, using phalloidin staining.