CellProfiler / CellProfiler-plugins

Community-contributed and experimental CellProfiler modules.
http://plugins.cellprofiler.org/
58 stars 67 forks source link

change centers and recognize "missing" slices #43

Closed karhohs closed 6 years ago

karhohs commented 6 years ago

The MeasureRadialEntropy module was not running as detailed in #25. I identified the problem to be the number of slices an object was divided into was not guaranteed to equal the input parameter. If a slice had no pixels the module would "throw this slice away". An example failing case is if the center of the object is estimated to be outside an object, so far away that none of the labeled object pixels exist to one side. In this case there would be zero pixels for a range of slices.

There are two edits to address this issue. First, the centroid is used in place of the minimum bounding circle center. The minimum bounding circle can be far from from the centroid of the object when the object has "fingers that extend and curve away from the center". Second, when no pixels exist in a slice a place holder NAN value is used instead. This way the number of slices will always be the same.