Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sorry Mark, I was wrong, the 64-bit PC build machine has Scipy 0.8.0 …

…and can't upgrade so easily without breaking Ilastik
  • Loading branch information...
commit ae64b2313eb1a80f9fa8d103df8ff9208c719383 1 parent 863c493
@LeeKamentsky LeeKamentsky authored
Showing with 16 additions and 2 deletions.
  1. +16 −2 cellprofiler/modules/measureobjectintensity.py
View
18 cellprofiler/modules/measureobjectintensity.py
@@ -441,8 +441,22 @@ def run(self, workspace):
#
qmask = (~qmask) & (areas > 0)
dest[lindexes[qmask]-1] = limg[order[qindex[qmask]]]
- mad_intensity[lindexes-1] = fix(nd.median(limg - median_intensity[llabels-1],
- llabels, lindexes))
+ #
+ # Once again, for the MAD
+ #
+ madimg = limg - median_intensity[llabels-1]
+ order = np.lexsort((limg, llabels))
+ qindex = indices.astype(float) + areas / 2.0
+ qfraction = qindex - np.floor(qindex)
+ qindex = qindex.astype(int)
+ qmask = qindex < indices + areas-1
+ qi = qindex[qmask]
+ qf = qfraction[qmask]
+ mad_intensity[lindexes[qmask]-1] = (
+ madimg[order[qi]] * (1 - qf) +
+ madimg[order[qi + 1]] * qf)
+ qmask = (~qmask) & (areas > 0)
+ mad_intensity[lindexes[qmask]-1] = madimg[order[qindex[qmask]]]
m = workspace.measurements
for category, feature_name, measurement in \
Please sign in to comment.
Something went wrong with that request. Please try again.