Image size


#1

Hi all,

Sorry if this has been answered previously.
But I’m wondering what would be a max image size CP can handle without needing to resize?

Thanks
tim


#2

Hi Tim,

Your question is more computer/OS-related than CellProfiler-related per se. The max image size CP can handle is determined largely by the memory constraints of your system and the limits MATLAB places on it.

If you are running CellProfiler from the MATLAB command window (i.e, developer version), take a look at the Mathworks Memory Management Guide.

If you are running the standalone version (i.e. compiled), take a look the subsection “How Do I Set the Swap Space for My Operating System?” on the same page.

Other than that, there are a few ways you can maximize memory so you can better able handle large images:

(1) Re-use the parameter names
Each image is associated with the unique name that you give it. If
you have many images, and many intermediate images created by the
modules you’ve added, the total space occupied by these images may cause
CellProfiler to run out of memory. In this case, a solution may be
to re-use names that you give to your parameters in later modules
in your pipeline.
For example, if you choose to resize your image and you know that you
don’t need the original image, you can give the resized image the same
name as the original. This will overwrite the original with the smaller,
resized image, thereby saving space.
Note: You must be certain that you have no use for the original image
later in the pipeline, since that data will be lost by this method.

(2) Running without display windows
When your images are being analyzed, the display windows created by
each module in your pipeline requires memory to create. If you are
not interested in seeing the intermediate output as it is produced,
you can deactivate the creation of display windows. Under File > Set
Preferences > Display Mode, you can specify which (if any) windows you
want displayed.
Note: The status and error windows will still be shown so you can see
the pipeline progress as your images are analyzed.

(3) Use the SpeedUpCellProfiler module.
The SpeedUpCellProfiler module permits the user to clear the images
stored in memory with the exception of those specified by the user.
Please see the help for the SpeedUpCellProfiler module for more details
and caveats.

Hope this helps!
-Mark


#3

Hi Mark,

Thanks for your advice. I am using compiled version under Mac OS X.

Just a follow-up question; Is there any difference with CP doing a better job with larger images versus smaller images in handling segmentation of nuclei, especially when they are clumped.

This may sound newbie-ish, but I guess for the human eye, the larger the image the better better/finer detail we will see.
Is this the same principle for CP and algorithms used?

Cheers


#4

Your understanding is perfect - yes, any automated image analysis will be of higher quality with a higher-resolution image (which usually means “larger” in terms of number of pixels for length and width). But, sometimes the decrease in quality is not SO substantial relative to the increase in speed. So, usually your best bet is to try the pipeline with and without the Resize module and just see whether it makes a big difference for your actual images (be sure to adjust the expected object size in IdentifyPrimAutomatic, because of course that will change between the resized image vs. the original).

And, the suggestions Mark describes above are constantly updated within the CellProfiler built-in help. Just go to Help > General Help > Memory and Speed, within the main window of CellProfiler, to read the latest suggestions for handling memory and speed issues, especially when working on large images.

Anne