Class ViewJComponentVolOpacity

All Implemented Interfaces:
MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener

public class ViewJComponentVolOpacity extends ViewJComponentVolOpacityBase
This class is used to coordinate how a histogram and LUT for an image are to be displayed to the screen. Note y inversion in transfer segment because graphical origin is in upper left corner.
             255     ^                __________
                     |               /
                     |              /
              O      |             /  invalid input: '<'------- Transfer function
              P      |            /
              A      |           /
              C      |          /
              I      |         /
              T      |        /
              Y      |       /
                     |______/
              0      |________________________________>

                      min                         max

                              Image intensity
 
Version:
0.1 Aug 1, 1997
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • myParent

      private RenderViewBase myParent
      DOCUMENT ME!
    • opacityCount

      private int opacityCount
      Opacity slider event count.
    • opacityEvents

      private MouseEventVector opacityEvents
      Opacity slider changed events, which is used by the mouse recorder.
  • Constructor Details

    • ViewJComponentVolOpacity

      public ViewJComponentVolOpacity(ViewJComponentVolOpacityListener parent, ModelHistogram _histo, ModelImage _image)
      Creates new component histogram LUT.
      Parameters:
      parent - Frame where histogram is to be displayed -- must implement ViewJComponentVolOpacityListener
      _histo - histogram model
      _image - image of the displayed histogram and associated LUT
    • ViewJComponentVolOpacity

      public ViewJComponentVolOpacity(JPanelVolOpacity renderOpacityPanel, ModelHistogram _histo, ModelImage _image)
      Deprecated.
      Creates new component histogram LUT.
      Parameters:
      renderOpacityPanel - Frame where histogram is to be displayed
      _histo - histogram model
      _image - image of the displayed histogram and associated LUT
  • Method Details

    • disposeLocal

      public void disposeLocal()
      Sets variables to null and gets rid of frame.
    • mousePressed

      public void mousePressed(MouseEvent mouseEvent)
      Checks for making new points or not.
      Specified by:
      mousePressed in interface MouseListener
      Overrides:
      mousePressed in class ViewJComponentVolOpacityBase
      Parameters:
      mouseEvent - event that triggered function
    • mouseReleased

      public void mouseReleased(MouseEvent mouseEvent)
      Updates image and shows it.
      Specified by:
      mouseReleased in interface MouseListener
      Overrides:
      mouseReleased in class ViewJComponentVolOpacityBase
      Parameters:
      mouseEvent - event that triggered this function
    • setMode

      public void setMode(int _mode)
      Accessor that sets the mode.
      Overrides:
      setMode in class ViewJComponentVolOpacityBase
      Parameters:
      _mode - the mode of the histogram
    • showHistogram

      public void showHistogram()
      Filters the histogram through the LUT and produces an int array (aRGB) that can be converted to a java image of the histogram for display purposes.
      Overrides:
      showHistogram in class ViewJComponentVolOpacityBase
    • showHistogram

      public void showHistogram(boolean repaint)
      Filters the histogram through the LUT and produces an int array (aRGB) that can be converted to a java image of the histogram for display purposes.
      Parameters:
      repaint - whether to repaint the histogram graph
    • showHistogram

      public void showHistogram(ModelLUT newLUT)
      Placeholder. Will go away.
      Specified by:
      showHistogram in class ViewJComponentVolOpacityBase
      Parameters:
      newLUT - histogram filter lut
    • finalize

      protected void finalize() throws Throwable
      Clean up some resources!
      Overrides:
      finalize in class ViewJComponentVolOpacityBase
      Throws:
      Throwable - DOCUMENT ME!
    • setupMinMax

      private void setupMinMax()
      Set the min max values for the opacity histogram.