Uncertainty

Hi. My question may sound dumb. :smile: After getting a cassifer in ilastik and exporting to Cell Profiler for use in the classify pixel module, is it possible for Cell Profiler to on the exported spreadsheet to inculde uncertainty measurements of the measured parameters in the MeasureImageSize module?

Thanks

Hmm, I’m not sure I understand. Do you mean the uncertainty pixel maps as can be displayed in ilastik? (i.e. not the probability maps, per se.) If so, then no, not exactly – ClassifyPixels produces an “image” consisting of probabilities that the pixel belongs to the chosen class. The usual tactic after ClassifyPixels is to then segment the probablity map using IdentifyPromaryObjects, and then you could use MeasureObjectSizeShape, etc. Once the object has been segmented, the uncertainty/probability information about each pixel is lost and then you are left with a standard segmentation. So that means that there really is nothing like what you ask for, i.e. “uncertainty measurements of the measured parameters”.

Does that help?
David

hi David,

Thanks a lot for the reply. I think I figured out my problem. I just needed the uncertainties associated with the size measurements cell profiler churns out. And I got the information via the standard deviation it provides. I needed the uncertainties ( standard deviations) to enable me make a good fit and have a good estimate of my chisquare and reduced chisquare.

I have another question though. Something a bit different. I have this pipeline(find attached). It was working properly, that is, there were no errors of any sort. As soon as I created a CorrectIlluminationCalculate and CorrectIlluminationApply module and added to the pipeline, it popped up an error(see attached). I’m running on the latest version of Cell Profiler. Please what could be wrong?

Thank you as I look forward to hearing from you

Regards
Raphael

P.S u guys are doing a wonderful job. Cell Profiler rocks…especially for non-programmers like me. :smile:


hi David,

It’s working now. I made sure that the CorrectIlluminationCacluate module took input directly from the Legacy input modules. But I have another problem. Why do I have a blank image after correcting for illumination? Before I used the correct illumination module, I used to have objects identified by the identify objects module but the numbers where so low in some and very high in others because of intensity differences. Please what and where have I gone wrong?

Kindly find attached my pipeline, screenshot, the raw images, the raw images in gray scale and the identified blobs. The images are consecutive images (25 and 26) and I expect them both to have roughly the same amount of blobs/crystals.

Also, which will be better to use as input for the CorrectIlluminationCalculate module? The raw images or the gray scale images?

Thank you as I look forward to hearing from you.

Regards
Raphael












5_3.cppipe (17.9 KB)


Hi David,

I got another question. Please don’t get tired of my so many questions. This analysis I’m currently doing is driving me crazy and I really need to get it all sorted out :confused: . Why does Cell Profiler pick out background as blobs/crystals and counts them as blobs? Kindly find attached these two images. They are consecutive images. I have uploaded there gray scale version, the original image, blobs identified and the pipeline I used for the analysis.

Thanks a whole lot David. Looking forward to hearing from you.

Regards
Raphael.
5_3a.cppipe (16.4 KB)











Hi,

Maybe you figured this out already? There are a few issues here:
(1) You have color images. As such, a ColorToGray module must be used (almost always) as the first module. You had a Crop module which apparently looks odd when acting on a color image.
(2) With ColorToGray > Combine, you might as well just image in grayscale, if possible and save yourself some processing and memory.
(3) The ApplyThreshold (removing pixels brighter than 0.5) is not doing anything. The max pixel intensities are around 0.3.
(4) Morph - move the Scale down from 25 to a value just above the typical diameter of you objects, like 10. This may help the next issue a little…
(5) The main issue is in IdentifyPrimaryObjects. When you use a Tophat filter in Morph (which works well here), the pixel values for most all pixels get very depressed, right near 0, but this includes your foreground objects. So that means that many thresholding methods need their thresholds to be “turned up” so as to exclude the background. In your case, in IDPrimary I would change “Automatic” to “Background” method, and then move the Threshold Correction Factor from 1 to, say, 4. This will bump up the threshold but you will need to play with this factor to find a robust value across your images.

Hope that helps!
David

hi David,

Thanks for your reply. I’m gona try out your suggestions right away. Suppose one decides to use the correctillumination and correctilluminationapply module option for an analysis, should color to gray module still come first before cropping? Or should the correctillumination and correctilluminationapply modules come first?

Thanks alot. Looking forward to hearing from you.

Regards
Raphael

hi David,

In the IdentifyPrimaryObjects module, I did as you suggested. I used Background thresholding method. I also used Global threshold strategy, and I got very good results. Thanks!! :smile: I’m a little bit confused about this. Been thinking about it for a while. From the documentation of the background threshold method, it says it works very well for images which have varying illumination. I was thinking, what then is the use of the correctillumination and correctilluminationapply module to a user who chooses to use the background thresholding method? Will one give a better result than the other?

Thank you. Looking forward to hearing from you.

Regards
Raphael

hi David,

I observed something else too. Find attached Caputre1. Capture1 is the gray scale and cropped image of RUN7-3_00006.tif. But when the pipeline is running, and it saves it in a folder of my choice, the gray scale image and the cropped image look different. Why is this so? See Capture 3 for how they look like when they are saved when the pipeline is running. I observed this too for other images like the thresholded images and the morph images the pipeline saves for me whilst it is running.

I have begun looking at how to use cell profiler to track objects and it is gray scale images like Capture 1 and want to use as input. How can I make cell proflier save it such that it looks like Capture1 and not Capture 3?

Thanks a lot for your help thus far. I highly appreciate.

Regards
Raphael.






hi David,

I want to remove dust particles from my blobs. I want cell profiler to be able to distinguish blobs from dust. The dust has approximately the same size as the blobs. So setting range of the size of objects I want to pick out is not working properly. Any ideas how to fix this?

Regards
Raphael

Hi Raphael,

Sorry, I lost track with all the questions :smile:
I’ll answer the last one - did you figure out the others?

You need to find some measurement which distinguishes the dust from the blobs. You can then use FilterObjects to remove the dust. Often using DisplayDataOnImage can help with the determination of what threshold to choose, but you need to determine a measurement that distinguishes them first.

However if you really cannot find a measurement or two that distinguish them, you could try Classifier from CellProfiler Analyst. Create two bins for dust and blobs. Then use Classifier iteratively until you are satisfied with its performance, and create a set of Rules. These Rules can then be output (look at the Rules… menu) and input back into a CellProfiler pipeline into the FilterObjects module. It’s a bit roundabout, but even inspecting the set of Rules can be instructive, and it may be that a single rule does the trick.

Best,
David

hi David,

Thanks for the reply. I have figured all out except for the last one which you’ve answered. I will give the Cell Profiler analyst a try. Will first go through some tutorials on it. A quick question though :smiley: … uhmm… why does Cell profiler insist that the input image for the identify module and measure intensity modules be gray scale image? If a color image is used, it pops an error. Why is that?

Thanks

Raphael

The Identify modules require a grayscale image because it would be ambiguous as to which color channel would be needed from an RGB image otherwise. This is especially true in the case of fluorescent images, where each channel can represent a distinct cellular sub-compartment; in that case, it is not clear what should be identified.
-Mark

hi all,

Compliments of the season! I need help on figuring out on how to use the correlation function. I have sets of images(249 of them) and I want to use the correlation function to determine the size of the particles in the images. I want to compare the results I got using the measure size module which I had earlier used to the results I will obtain using the correlation function.

Thanks

Raphael



hi all,

I thought maybe I should clarify a little more on what I want to do… I want to read images, convert images to data, calculate
spatial autocorrelations, convert autocorrelations to particle sizes and particle-size distributions,
and plot autocorrelation profiles.

Thanks.

Raphael

hi guys,

Please how can I make a correlation measurements on a batch of images? The data will then be used to plot corrrelation curve.

Thanks

Raphael

Hi Raphael,

Have you looked at the MeasureCorrelation module? You can make correlations between pairs of images, across the image and/or within objects only. Does that help?

Regards,
-Mark

hi Mark,

Thanks for the reply. It does help. I want to have spatial autocorrelation measurements across each image…Basically I want to build a pipleline to calculate equation 1 and use the result to calculate equation 2 given in this paper drive.google.com/file/d/0B6nj1d … sp=sharing. My images look exactly like those in the paper. I don’t know if the MeasureCorrelation module can help me calculate those equations. Is there some sort of pipeline you could suggest I build that will help me do this? Thanks a lot Mark.

Looking forward to hearing from you.
Regards
Raphael

Hi Raphael,

Unfortunately, MeasureCorrelation won’t work for this, nor would any other module currently. MeasureCorrelation produces a pair of scalar values as a measurement , whereas from Eqn 1 in the paper you post, you want not so much an image as output, but a function in (x,y) as output, for downstream use (i.e, Eqn 2). You might be better off using MATLAB or s similar package.

Regards,
-Mark

Hi Mark,

Thanks for the reply. I’m going to try to code it in python. I’m not very good with python yet (though my python skills are better than Matlab :smile: ), but I’m gona try. Thanks a lot.

Regards
Raphael.