Author: Wayne Rasband; modified by Bob Dougherty to add the "live" feature and more display and control options. Installation: Download Live_Histogram.jar or Live_Histogram.java to the plugins folder. Description: As requested by Paulo Magalhães, this is a version of Wayne's HistogramWindow code that updates the display periodically to permit examination of stacks. In addition, it can monitor the histogram as the ROI is moved. Greg Joss also had input to the feature list. Paulo, Greg, Wayne, and Gary Chinga all contributed to the effort.
TextFields "Min Plot" and "Max Plot" adjust the vertical (count value) limits of the histogram display. The "manual" button must be selected to enable this control.
In the decibel display modes, Min Plot is always set by the plugin to be n dB down from Max Plot, n = 30, 40, or 50.
TextFields "Min Bin" and "Max Bin" can be used to limit the histogram in the horizontal direction. This makes it possible to exclude unwanted features, such as the image background, from the statistical calculation. These can only be adjusted for 8- and 16-bit images.
The Min Bin and Max Bin controls are not affected by the auto/manual buttons. The auto/manual buttons apply to Max Plot and Min Plot only.
In the latest version, 8, the Live Histogram automatically connects to the currently selected window. Paulo calls this "lazy mode" because it is easy to examine a series of windows without creating new Live Histograms.
The temptation to adjust the Live Histogram controls when no image window is open should be avoided. The plugin has not been tested for this mode of operation.
For 8-bit images, the limit sliders in Image-> Adjust ->Threshold... also adjust Min/Max Bin. This makes it possible to
observe the effect of the threshold on the image and on the statistics at the same time. Threshold/Live Histogram interaction was requested by Karl-Heinz Kunzelmann, and is new in Version 8.5.
Instructions Adjust the limits in Image-> Adjust ->Threshold... while watching the effect on the Live Histogram data.
Notes and limitations in the present state of development Pressing almost any button at the bottom of Image-> Adjust ->Threshold... window causes an exception in the Live Histogram. Don't do it.
Sixteen- and 32-bit images are not supported for this interaction
If the Image-> Adjust ->Threshold... window beeps when you try to adjust the sliders, it means the window is trying to take its data from the Live Histogram window. You need to click on the window with the image of interest and then return to the Threshold window.
Versions: 0: 5/24/2002
1: 5/25/2002 Fixed a bug that caused a division by zero when selection rectangle was removed.
2: 5/26/2002 Fixed a bug that afflicted non-rectangular ROIs.
3: 5/27/2002 Fixed a window manager issue and converted the log plot to a 30 dB scale.
4: 5/28/2002 Fixed a class caste problem with 8-bit color images. Changed the source packaging to one file.
5: 5/29/2002 Added more display options and thresholding. Changed the name from HistogramLive to LiveHistogram.
6: 5/29/2002 Added square root scale options. Improved the fixed-range scales to operate over the correct ranges.
7: 5/30/2002 Added focusListeners to the TextFields to remove the need for <return>. Made the plot blank when appropriate.
7.1: 5/30/2002 Corrected the default value of maxBin that is applied in case of input error.
8: 6/5/2002 Enabled "Min Bin" and "Max Bin" adjustments with 16-bit images. The plot now "adopts" the current image.
8.5: 6/15/2002. Interfaced Min/Max Bin with threshold setting from Adjust Threshold.
8.6: 6/23/2004. Fixed a bug in the source code that caused "no image." (Thanks to Harry Parker for noticing this.)
8.6: 6/26/2014. (Yes, 10 years later) Repackaged as a .jar file."
Open items: Enable "Min Bin" and "Max Bin" adjustments with 32-bit images.
Visually separate the "Min Bin" and "Max Bin" adjustments from the auto/manual controls.
Connect "Min Bin" and "Max Bin" with "Adjust Threshold" correctly for 16- and 32-bit images.
Performance with Macintosh OS X is unstable.
Copyright (c) 2005, OptiNav, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of OptiNav, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ImageJ: ImageJ can be freely downloaded from the ImageJ web site.