@Override public void addMeasurements(PathObject pathObject, String name, ParameterList params) { // Check if we have a median we can use if (histogram == null || histogram.length == 0) return; // Start from the end & update double total = 0; double[] proportions = new double[histogram.length]; for (int i = histogram.length-1; i >= 0; i--) { total += histogram[i] / (double)n; proportions[i] = total; } // Add the measurements MeasurementList measurementList = pathObject.getMeasurementList(); double binWidth = (maxBin - minBin) / (nBins - 1); NumberFormat formatter = GeneralTools.createFormatter(3); for (int i = 0; i < histogram.length; i++) { double value = minBin + i * binWidth; measurementList.putMeasurement(name + " >= " + formatter.format(value), proportions[i]); } }
if (server != null && server.hasPixelSizeMicrons()) { fwhm = getParameterList(imageData).getDoubleParameterValue("fwhmMicrons"); fwhmStringTemp = GeneralTools.createFormatter(2).format(fwhm) + " " + GeneralTools.micrometerSymbol(); fwhm /= server.getAveragedPixelSizeMicrons(); fwhmStringTemp = GeneralTools.createFormatter(2).format(fwhm) + " px";