diff --git a/2c_fibertyping.py b/2c_fibertyping.py index d57919d9450c73bd818db8cbb742b7c074dac5bc..8b68e71a9cc1b3d10ae7906c1395a50d11110418 100644 --- a/2c_fibertyping.py +++ b/2c_fibertyping.py @@ -114,20 +114,21 @@ def measure_mean_of_rois(imp, channel, rm): The channel on which to measure. starts at 1. rm : ij.plugin.frame.RoiManager A reference of the IJ-RoiManager. - min_intensity : int - The selection criterion (here: intensity threshold). Returns ------- - list - A selection of ROIs which passed the selection criterion (are above the threshold). + list of float + A list of mean intensity values for each ROI in the specified channel. """ imp.setC(channel) all_rois = rm.getRoisAsArray() + mean_intensities = [] for i, roi in enumerate(all_rois): imp.setRoi(roi) stats = imp.getStatistics() + mean_intensities.append(stats.mean) + return mean_intensities