I’m using CellProfiler to make some measurements and use the ExportToDatabase module to export the results (as an sqlite database) for use with CellProfiler Analyst. I’ve found that the ExportToDatabase module will produce an “empty” (for lack of a better word) database if I check either or both of:
“Calculate the per-image median values of object measurements?”
“Calculate the per-image standard deviation values of object measurements”
By “empty” (see github.com/CellProfiler/CellPro … /issues/38) I mean that if I then open the database with CellProfiler Analyst using the generated *.properties file and try to fetch objects in the Classifier, I receive the following error:
[code]An error occurred in the program:
ValueError: empty range for randrange() (1,1, 0)
Traceback (most recent call last):
File “classifier.pyc”, line 581, in OnFetch
File “datamodel.pyc”, line 119, in GetRandomObjects
File “datamodel.pyc”, line 97, in GetRandomObject
File “random.pyc”, line 241, in randint
File “random.pyc”, line 217, in randrange[/code]
A ValueError is also raised if I use any of the other tools that are based on per-object measurements (ScatterPlot, Histogram, etc.). If both of those options are set to “No” then I get a database that I can use, and no ValueErrors are raised.
I’ve attached the pipeline file and two example images. I’m using the 2.1.2 64-bit Windows trunk build (r20150327144625) on Windows 8.1. I don’t need CellProfiler to calculate the per-image values, but in working with the program I spent a good amount of time tracking down why the exported databases didn’t contain any information so I figured I would share.
ExtractFeatures.cpproj (654 KB)