Class ViewJComponentLUTTable

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.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:
    JFrameHistogram, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Sets the variables to null and gets rid of the frame.
      private void drawLine​(java.awt.Graphics g, int x, int y)
      DOCUMENT ME!
      private void drawString​(java.awt.Graphics g, java.lang.String str, int x, int y)
      Draw the string with the given position.
      ModelLUT getModelLUT()
      Returns the model LUT.
      void paintComponent​(java.awt.Graphics g)
      Paints the image and border.
      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.
      void update​(java.awt.Graphics g)
      Calls paintComponent - reduces flicker.
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • 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!
      • LUT

        private ModelLUT LUT
        DOCUMENT ME!
      • LUTDims

        private java.awt.Dimension LUTDims
        DOCUMENT ME!
      • LUTIndexBuffer

        private int[] LUTIndexBuffer
        DOCUMENT ME!
      • orientation

        private int orientation
        DOCUMENT ME!
    • Constructor Detail

      • ViewJComponentLUTTable

        public ViewJComponentLUTTable​(ModelImage _image,
                                      ModelLUT _LUT,
                                      java.awt.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 Detail

      • 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​(java.awt.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​(java.awt.Graphics g)
        Calls paintComponent - reduces flicker.
        Overrides:
        update in class ViewJComponentBase
        Parameters:
        g - Graphics
      • drawLine

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

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