Package ij.gui

Class HistogramWindow

All Implemented Interfaces:
RoiListener, ImageListener, Measurements, ClipboardOwner, ActionListener, FocusListener, MouseWheelListener, WindowListener, WindowStateListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible

public class HistogramWindow extends ImageWindow implements Measurements, ActionListener, ClipboardOwner, ImageListener, RoiListener, Runnable
This class is an extended ImageWindow that displays histograms.
See Also:
  • Field Details

    • stats

      protected ImageStatistics stats
    • histogram

      protected long[] histogram
    • lut

      protected LookUpTable lut
    • frame

      protected Rectangle frame
    • list

      protected Button list
    • save

      protected Button save
    • copy

      protected Button copy
    • log

      protected Button log
    • live

      protected Button live
    • rgb

      protected Button rgb
    • value

      protected Label value
    • count

      protected Label count
    • defaultDirectory

      protected static String defaultDirectory
    • decimalPlaces

      protected int decimalPlaces
    • digits

      protected int digits
    • newMaxCount

      protected long newMaxCount
    • plotScale

      protected int plotScale
    • logScale

      protected boolean logScale
    • cal

      protected Calibration cal
    • yMax

      protected int yMax
    • nBins

      public static int nBins
  • Constructor Details

    • HistogramWindow

      public HistogramWindow(ImagePlus imp)
      Displays a histogram using the title "Histogram of ImageName".
    • HistogramWindow

      public HistogramWindow(String title, ImagePlus imp, int bins)
      Displays a histogram using the specified title and number of bins. Currently, the number of bins must be 256 expect for 32 bit images.
    • HistogramWindow

      public HistogramWindow(String title, ImagePlus imp, int bins, double histMin, double histMax)
      Displays a histogram using the specified title, number of bins and histogram range. Currently, the number of bins must be 256 and the histogram range range must be the same as the image range expect for 32 bit images.
    • HistogramWindow

      public HistogramWindow(String title, ImagePlus imp, int bins, double histMin, double histMax, int yMax)
      Displays a histogram using the specified title, number of bins, histogram range and yMax.
    • HistogramWindow

      public HistogramWindow(String title, ImagePlus imp, ImageStatistics stats)
      Displays a histogram using the specified title and ImageStatistics.
  • Method Details

    • showHistogram

      public void showHistogram(ImagePlus imp, int bins)
      Draws the histogram using the specified title and number of bins. Currently, the number of bins must be 256 expect for 32 bit images.
    • showHistogram

      public void showHistogram(ImagePlus imp, int bins, double histMin, double histMax)
      Draws the histogram using the specified title, number of bins and histogram range. Currently, the number of bins must be 256 and the histogram range range must be the same as the image range expect for 32 bit images.
    • showHistogram

      public void showHistogram(ImagePlus imp, ImageStatistics stats)
      Draws the histogram using the specified title and ImageStatistics.
    • setup

      public void setup()
    • mouseMoved

      public void mouseMoved(int x, int y)
      Description copied from class: ImageWindow
      This method is called by ImageCanvas.mouseMoved(MouseEvent).
      Overrides:
      mouseMoved in class ImageWindow
      See Also:
    • drawHistogram

      protected void drawHistogram(ImageProcessor ip, boolean fixedRange)
    • getResultsTable

      public ResultsTable getResultsTable()
      Returns the histogram values as a ResultsTable.
    • showList

      protected void showList()
    • copyToClipboard

      protected void copyToClipboard()
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • lostOwnership

      public void lostOwnership(Clipboard clipboard, Transferable contents)
      Specified by:
      lostOwnership in interface ClipboardOwner
    • getHistogram

      public int[] getHistogram()
    • getXValues

      public double[] getXValues()
    • imageOpened

      public void imageOpened(ImagePlus imp)
      Specified by:
      imageOpened in interface ImageListener
    • imageUpdated

      public void imageUpdated(ImagePlus imp)
      Specified by:
      imageUpdated in interface ImageListener
    • roiModified

      public void roiModified(ImagePlus img, int id)
      Specified by:
      roiModified in interface RoiListener
    • imageClosed

      public void imageClosed(ImagePlus imp)
      Specified by:
      imageClosed in interface ImageListener
    • run

      public void run()
      Specified by:
      run in interface Runnable