Basic Question

cellprofiler

#1

Hello there,

I am completely new to this forum. I intend to add a new function to CellProfiler. I will use Windows XP environment. I want to ask what do I need to install. In particular, do I need to buy MATLAB library?

Cheers,

Charles


#2

Hello,
If you would like to write your own modules, you will need to purchase Matlab and the Image Processing Toolbox. If you need to compile your code to use on other computers without a Matlab license, then you will also need to purchase the Matlab Compiler.

Good luck!
martha


#3

When you said “add a new function to CellProfiler” perhaps you just meant that you want to use CellProfiler and adapt it to your task by rearranging and configuring existing modules? If so, you don’t need MATLAB at all - just download CellProfiler from the website (cellprofiler.org) and use it according to the Getting Started instructions in the Examples page of the website.
Anne


#4

Hi Martha and Anne,

Thanks for your replies. Sorry that I did not repsonse because I was out of town and have just got back.

I need to count parasitised red blood cells. I think the existing methods to determine the cells to be counted may not be able to do this job. So I think I need to figure out a method to determine whether a parasite is inside a red blood cell. That’s why I think I need to write the program myself. I was a computer programmer but I do not have much experience in image processing other than taken a unit of study in image processing.

As suggested by Martha, I may need to buy MATLAB library and compiler (for XP?), shall I approach their website and ask for the prices? Is there discount for PhD student?

Cheers,

Charles


#5

Hi,
I think that Matlab has a discount for students - yes, you will have to ask them directly about the prices.
But perhaps you could post an image showing what you are looking for? Perhaps CellProfiler can already handle your project…
Cheers,
Anne


#6

Hi Anne,

I am attaching a typical photo we have. See if the existing CellProfiler is able to count the parasitised RBC.

Thanks,

Charles



#7

Hi Charles,

Sorry it’s taken a while to reply to your original request. Attached is a pipeline which attempts to identify the cells, then identify the parasites, save the images with cell/parasite outlines as well as an Excel file with the stats.

If you have further thoughts on the pipeline efficacy, we’d love to hear them!

Regards,
-Mark
2008_06_23_AnalysisPIPE.zip (1.72 KB)


#8

Hi Mark,

Thanks for your pipeline. I’ve just found it today. I’ll test it as soon as possible and get back to you.

Thanks,

Charles


#9

Hi Mark,

I have tried your pipeline but the results were not very promising. I am attaching my image file and the result of IdentifyPrimAutomatic for your reference. See if you have any idea about it.

Thanks,

Charles





#10

Hello,
It appears to met that your lower threshold in IdentifyPrimAutomatic is not set correctly for the image that is displayed in the module window. To figure out the pixel intensities, open the grayscale image, then go to CellProfiler Image Tools >> Show Hide Pixel Data. Then, mouse over various locations on the image to get a proper estimate of foreground and background of your cells.


#11

Hi Matha,

Thanks for your suggestion. I found that the level of the background is about 0.4 while the level of the red blood cells is over 0.5. I am not sure what values are to be entered into the threshold level. So I tried 0.4 and 0.5 in MeasureImageAreaOccupied and IdentifyPrimAutomatic steps. However, the red blood cells were still not recoginsed (see attachments).

See if you have any comments,

Charles




#12

Hi,

Are you using the pipeline on the same image that you uploaded on 6/03/08, or a different one? The pipeline I created was made tailored to the single example image your provided, but if you are using it on images that are different from that prototype, the pipeline may not work as well.

Regards,
-Mark


#13

Hi Mark,

I could not use your pipeline with the colour image. So I convert it into gray scale using Photoshop. Also, my computer is not powerful enough to run the image (I ran overnight but got nothing). So I changed the resolution to 1/4 of the original image (now it takes 15 minutes). I tried your pipeline with different nucleus sizes but failed.

So I changed to another image which contains better separated cells. Sorry for the changes. Would you please change the pipeline for me?

Regards,

Charles


#14

Hi Charles,

That explains things. The approached I used in designing the pipeline was to split the color channels apart to find the channel which best highlighted the infected regions. If you are now using grayscale, the approach needs to be different.

I would need a image which is representative of the new image set that you are using. Keep in mind that further changes to the images will most likely require changes to the pipeline. Could you upload a new image?

Regards,
-Mark


#15

Hi Mark,

Actually I attached the file in one of my previous posting. However, it did not appear properly (probably because it was the second attachment in a single posting). I am attaching it here for your convenience.

Cheers,

Charles


#16

Hi Mark,

It may be difficult to download the image file in .TIF format. I am attaching the same image in .GIF format as well.

Charles


#17

Hi Charles,

For this image, I would suggest using IdentifyPrimAutomatic on the image to find the red blood cells (RBCs) using Shape to distinguish clumped objects and Distance to draw dividing lines. Otsu Global will probably work, but you may need to explore other thresholding methods to see what works best for you.

Then use SmoothOrEnhance on the image with Enhance Bright Speckles (Tophat filter) as the smoothing method and the filter size set to a number that is smaller than the RBC diameter but larger than the average infection blob size. This will produce an image in which many of the RBCs are removed (or close to it) but the smaller, bright infection stains remain. You can then use IdentifyPrimAuto to identify the infection stains in this tophat-filtered image, probably by using the Mixture of Gaussian (MoG) method.

If the identified infection objects include RBC borders that weren’t removed by the tophat filter, you can use MeasureObjectintensity on the infection objects in the tophat-filtered image, and exclude the dimmer objects by using FilterByObjectMeasurement with the mean object intensity (Intensity, feature 2) as the measurement to filter by. Pick a minimum threshold value that captures as much of the infection stains as possible while excluding RBCs.

Finally, the Relate module can match the infection objects to the RBC objects, effectively telling you which RBCs are infected. Using the ExportToExcel module to export the RBC objects will give you an Excel file which contains a count of infection objects for each identified RBC. If this count is 0, then the cell is not infected; if it’s greater than 0, then you can consider the RBC to be infected.

Hope this helps!
-Mark


#18

Hi Mark,

Thanks for your notes. I have tried them. I am attaching my pipeline file for your reference.

As the speed is much faster this time, I increased the image resolution. Now I am using image of half of the original resolution.

At the moment, the cell count is quite accurate. The recognition of the stained object (parasite in RBC) is still not accurate. See if you have any comments on improving it.

Regards,

Charles
testPIPE 2.mat (1.18 KB)


#19

Hi Charles,

I took a look at your pipeline, and I noticed that you left out the second IdentifyPrimAuto that I mentioned you should use on the top-hat filtered image in order to identify the infection stain. You should place it after the SmoothOrEnhance module. The MeasureObjectIntensity module should then be used on the infection stain objects that are identified, not on the RBC objects.

Let us know if this works,
-Mark


#20

Hi Mark,

Thanks for your comments. I have included a second IdentifyPrimAutomatic function.

Initailly, I removed MeasureObjectIntensity and FilterByObjectMeasurement function and tried the pipeline. I got more than expected stained objects identified. I tried changing the filter size in the SmoothingOrEnhance function but the results were not satisfactory.

So I included the MeasureObjectIntensity and FilterByObjectMeasurement function. However, I am not sure how to feed the results of the output of FilterByObjectMeasurement into the second IdentifyPrimAutomatic function. I am attaching my latest pipeline for your reference. Please advice.

Thanks,

Charles
testPIPE1.mat (1.26 KB)