File Formats + memory

First of all, thank you for making such a brilliant program. So far I’ve been working on making an ImageJ macro and this just blows all those attempts away.

My goal is to analyze images generated by our ScanScope FL scanner to get a count of GFP positive neurons. A scan has DAPI (blue), GFP (green) and an additional red channel I use for determining background fluorescence in the Red spectrum. A single Slide (preview jpg attached) has a resolution of about 100,000 x 40,000 pixels.

Compressed with JPEG2000 and embedded in an svs wrapper, each channel is thus about 1gb+ each. Ignoring the DAPI channel which is irrelevant for this use, it’s still about 2GB (compressed) per slide - therefore I realize it’s probably a pipe dream to process a whole slide at once. Each slide contains approx 12 sections, composed of 2 hemispheres - representing a single unit. Therefore ideally I would like to get the count of the # of positive cells in each hemisphere of each cell. I realize at this point that probably the only way to get this is to separate each hemisphere by hand - which is fine. Doing this manually and saving as TIF with LZW produces files about 50mb - which took CellAnalyzer about 20min to say it can’t load. Reducing the resolution to 25% of original (3kx5k) is still 25MB with LZW. However when I try to open this file with CellAnalyzer - it comes out rather garbled. I tried attaching a file that shows this but when i crop it down to 10MB the problem is no longer there -Here’s a link: … MUN4dnc9PQ (55MB)

Does cell Analyzer support tiled tif? I have so far only gotten good results on a small scale (1.2x1.2k) how high can I go and still have it work?
some details about the computer: interl core i7 process 2.66 Ghz, 8GB RAM. Tried both OS 10.6 and Windows 7.
If it matters; Programs like Photoshop, Preview, Photoviewer open the files in 1-2 seconds. Image J and imageanalyzer take ages - makes me think it’s a file compatibility issue rather than actual resource usage.

Any advice on how to proceed is much appreciated

(additionally, I have some questions about the optimal method of object id: currently I am subtracting the Red channel from the green channel, then using manual thresholding because none of the others give good result, but first I need the program to even load a decent size dataset)


In case anyone else encounters this problem of garbled images from an Aperio Slide scanner - simply resave the TIF file as an untiled tif image - this seems to make CellProfiler actually load it in a matter of a minute or so.
DIsplay of each processing step is still very timely and the only way I can deal with it is to turn of preview of every step and simply do a save image at each step - these save and open in no time, best of all - No CellProfiler Crash!

Processing these images is another story though, I’ve been trying to measure object size shape then use area and form factor to remove some of the background signal but no matter how much I tweak the filter I get the same nonsense results … e.g. identify primary objects sees many objects, but then when I try to filter them I get none left over, even if I leave the area from 1pixel to 10000 pixels (just to see if it works) I know it’s probably something I’m doing wrong but any tips would be greatly appreciated.
Sample image and pipeline posted: … MnZ2Wmc9PQ

many many thanks to anyone who can point me in the right direction here


I’m taking a look at a cropped version of your image plus your pipeline, but I’m not seeing anything for the output of IdentifyPrimaryObjs. It’s not clear to me how you are identifying the cells from your images using the settings as given. Could you clarify where the positive cells are in the TrimPaste image that you uploaded?


Hi Mark,

Thanks for your reply and my apologies for the lack of clarity. Below is a jpeg of the trimpaste file with the neurons circled in red. These should be recognized and counted.

Although I am having pretty good luck identifying true positives using only a diameter and a manual threshold (~0.25 or so) after subtracting 1.2xred from the green and multiplying the product by 4. False Positives are quite rampant in many images.
These false positives are sometimes due to nerve bundles which have the GFP signal but aren’t cells. Sometimes the edges of bubbles on the epithelia (due to my clumsy hands when mounting) lead to a signal that is also recognized as cells. I tried dealing with these in a number of ways: filtering for size and form factor. and more recently I started using the DAPI staining as primary or secondary objects (my thinking is that only cell somas should have a dapi signal right?) however no matter how much i fiddle with these settings (including making the blue range quite limited for the dapi detection) I seem to be getting rid of True Positive cells and only sometimes the False positives. I have posted 4 example images with the DAPI channel included - if you could please offer any advice on what configuration might work I would be extremely grateful

Sample images with DAPI: … Y3J2Wmc9PQ



I think you’re on the right track. The one recommendation that comes to mind is rather than subtracting the red from the green, you might have better luck with dividing the two. Since the red channel seems almost identical to t he green with the exception of the neurons, dividing should yeild an image which is >> 1 around the neurons and ~1 elsewhere. Since IdentifyPrimObjs expects the input to between 0 and 1, add -1 to the result and clamp to 0 and 1 in ImageMath for the final ratio image.

This also means the noise is within the same range and might accidentally be detected so another step you can do is detect the tissue itself (IdentifyPrimObjs with no declumping and no exclusion criteria) and then mask the ratio image with the tissue object. However, since your images are so big, this may cause additional memory issues, so you can skip this step and tweak the neuron detection accordingly.

Lastly, since the neuron areas are bright spots in a sea of background, you probably best off with using RobustBackground for the neuron detection.

I’m attaching a sample pipeline and some output windows so you can better see what I mean.


2010_08_02.cp (6.36 KB)