Re: percentile calculation, ImageJ or otherwise?
Posted by
Steffen Dietzel on
URL: http://confocal-microscopy-list.275.s1.nabble.com/Live-cell-Imaging-with-fluoview-1000-tp2242987p2285787.html
Dear all,
thanks for all the replies on and off list. The latter included an e-mail
by Jerome Mutterer with a short macro that does the job. With his
permission, I post it here so that it gets included in the confocal
archive together with the question.
Cheers
Steffen
- The following ImageJ macro thresholds the upper 5% pixels in your
image:
- // threshold percentile
- p=0.05;
- getRawStatistics(nPixels, mean, min, max, std, h)
- sum=h[0];i=0;
- while (sum<(1-p)*nPixels) { i++; sum+=h[i]; }
- setThreshold(i,h.length-1);
- // end macro
--
---------------------------------------------------------------------------------------------------
Steffen Dietzel, PD Dr. rer. nat
Ludwig-Maximilians-Universität München
Walter-Brendel-Zentrum für experimentelle Medizin (WBex)
Head of light microscopy
Mail room (for letters etc.):
Marchioninistr. 15, D-81377 München
Building location and address for courier, parcel services etc:
Marchioninistr. 27, D-81377 München (Großhadern)