Class ViewJComponentLUTTable

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class ViewJComponentLUTTable extends ViewJComponentBase
Component LUT - the vertical or horizontal bar that gives a visual representation of the lookup table.
Version:
0.1 Oct 29, 1997
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

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

      public static final int HORIZONTAL
      Create horizontal LUT.
      See Also:
    • VERTICAL

      public static final int VERTICAL
      Create vertical LUT.
      See Also:
    • offsetX

      protected int offsetX
      Offset to draw the tick mark and value label.
    • offsetY

      protected int offsetY
      DOCUMENT ME!
    • x

      protected float[] x
      control points coordinate of LUT transfer function .
    • xN

      protected int[] xN
      DOCUMENT ME!
    • y

      protected float[] y
      DOCUMENT ME!
    • yN

      protected int[] yN
      DOCUMENT ME!
    • z

      protected float[] z
      DOCUMENT ME!
    • zN

      protected int[] zN
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • LUT

      private ModelLUT LUT
      DOCUMENT ME!
    • LUTDims

      private Dimension LUTDims
      DOCUMENT ME!
    • LUTIndexBuffer

      private int[] LUTIndexBuffer
      DOCUMENT ME!
    • orientation

      private int orientation
      DOCUMENT ME!
  • Constructor Details

    • ViewJComponentLUTTable

      public ViewJComponentLUTTable(ModelImage _image, ModelLUT _LUT, Dimension _LUTDims, int _orientation)
      Creates new component LUT.
      Parameters:
      _image - DOCUMENT ME!
      _LUT - Model that the image will be filter through to produce a viewable image
      _LUTDims - The LUT dimensions
      _orientation - Flag for the orientation, HORIZONTAL or VERTICAL.
  • Method Details

    • dispose

      public void dispose()
      Sets the variables to null and gets rid of the frame.
    • getModelLUT

      public ModelLUT getModelLUT()
      Returns the model LUT.
      Returns:
      The LUT
    • paintComponent

      public void paintComponent(Graphics g)
      Paints the image and border.
      Overrides:
      paintComponent in class ViewJComponentBase
      Parameters:
      g - Graphics handle
    • show

      public void show(ModelLUT lut)
      Filters the model LUT through the LUT and produces an int array (aRGB) that can be convert to a java image for display purposes.
      Parameters:
      lut - LUT to filter with
    • update

      public void update(Graphics g)
      Calls paintComponent - reduces flicker.
      Overrides:
      update in class ViewJComponentBase
      Parameters:
      g - Graphics
    • drawLine

      private void drawLine(Graphics g, int x, int y)
      DOCUMENT ME!
      Parameters:
      g - DOCUMENT ME!
      x - DOCUMENT ME!
      y - DOCUMENT ME!
    • drawString

      private void drawString(Graphics g, String str, int x, int y)
      Draw the string with the given position.
      Parameters:
      g - Graphics
      str - String
      x - int
      y - int