Module ij

Class ContrastAdjuster

All Implemented Interfaces:
PlugIn, ActionListener, AdjustmentListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible

public class ContrastAdjuster extends PlugInDialog implements Runnable, ActionListener, AdjustmentListener, ItemListener
This plugin implements the Brightness/Contrast, Window/level and Color Balance commands, all in the Image/Adjust sub-menu. It allows the user to interactively adjust the brightness and contrast of the active image. It is multi-threaded to provide a more responsive user interface.
See Also:
  • Field Details

  • Constructor Details

    • ContrastAdjuster

      public ContrastAdjuster()
  • Method Details

    • run

      public void run(String arg)
      Description copied from interface: PlugIn
      This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.
      Specified by:
      run in interface PlugIn
      Overrides:
      run in class PlugInDialog
    • adjustmentValueChanged

      public void adjustmentValueChanged(AdjustmentEvent e)
      Specified by:
      adjustmentValueChanged in interface AdjustmentListener
    • actionPerformed

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

      public static int get16bitRangeIndex()
    • set16bitRange

      public static int set16bitRange(int index)
    • getSixteenBitRanges

      public static String[] getSixteenBitRanges()
    • recordSetMinAndMax

      public static void recordSetMinAndMax(double min, double max)
    • run

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

      public void close()
      Overrides close() in PlugInDialog.
      Overrides:
      close in class PlugInDialog
    • windowActivated

      public void windowActivated(WindowEvent e)
      Specified by:
      windowActivated in interface WindowListener
      Overrides:
      windowActivated in class PlugInDialog
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      Specified by:
      itemStateChanged in interface ItemListener
    • updateAndDraw

      public void updateAndDraw()
      Resets this ContrastAdjuster and brings it to the front.
    • update

      public static void update()
      Updates the ContrastAdjuster.