Package gov.nih.mipav.view
Class ViewJComponentLUTTable
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- gov.nih.mipav.view.ViewJComponentBase
-
- gov.nih.mipav.view.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
-
-
Field Summary
Fields Modifier and Type Field Description static int
HORIZONTAL
Create horizontal LUT.private ModelImage
image
DOCUMENT ME!private ModelLUT
LUT
DOCUMENT ME!private java.awt.Dimension
LUTDims
DOCUMENT ME!private int[]
LUTIndexBuffer
DOCUMENT ME!protected int
offsetX
Offset to draw the tick mark and value label.protected int
offsetY
DOCUMENT ME!private int
orientation
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.static int
VERTICAL
Create vertical LUT.protected float[]
x
control points coordinate of LUT transfer function .protected int[]
xN
DOCUMENT ME!protected float[]
y
DOCUMENT ME!protected int[]
yN
DOCUMENT ME!protected float[]
z
DOCUMENT ME!protected int[]
zN
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.view.ViewJComponentBase
ANNOTATION, BOTH, CENTER_VOI, CUBE_BOUNDS, DEFAULT, DELETE_POINT, DROPPER_PAINT, ELLIPSE, ERASER_PAINT, IMAGE_A, IMAGE_B, imageDim, img, imgB, interpMode, INTERPOLATE_A, INTERPOLATE_B, INTERPOLATE_BOTH, lastMouseX, lastMouseY, LEVELSET, LINE, LIVEWIRE, MAG_REGION, memImageA, memImageB, MOVE, MOVE_INTERSECTION_POINT, MOVE_POINT, MOVE_VOIPOINT, NEAREST_BOTH, NEW_POINT, NEW_VOI, OUT_OF_BOUNDS, PAINT_CAN, PAINT_VASC, PAINT_VOI, POINT_VOI, POLYLINE, POLYLINE_SLICE_VOI, PROBE, PROTRACTOR, QUICK_LUT, RECTANGLE, RECTANGLE3D, resolutionX, resolutionY, RETRACE, ROTATE, SELECT, showSliceNumber, sliceString, SMOOTH, SPLIT_VOI, textColor, TRANSLATE, VOI_3D, WAND, WIN_REGION, ZOOMING_IN, ZOOMING_OUT, zoomX, zoomY
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description ViewJComponentLUTTable(ModelImage _image, ModelLUT _LUT, java.awt.Dimension _LUTDims, int _orientation)
Creates new component LUT.
-
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 gov.nih.mipav.view.ViewJComponentBase
dispose, disposeLocal, finalize, getImage, getInterpMode, getLastMouseX, getLastMouseY, getPreferredSize, getResolutionX, getResolutionY, getScaledX, getScaledY, getSelectedPaintColor, getShowMagIntensityEnabled, getSize, getZoomX, getZoomY, importImage, importImageB, LocalToScreen, makePaintBitmapBorder, makePaintImage, paintCursorBoxComponent, paintWindowComponent, paintWindowComponent, ScreenToLocal, setInterpolationMode, setResolutions, setShowSliceNumber, setSliceString, setTextColor, setZoom, setZoomExact
-
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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
HORIZONTAL
public static final int HORIZONTAL
Create horizontal LUT.- See Also:
- Constant Field Values
-
VERTICAL
public static final int VERTICAL
Create vertical LUT.- 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!
-
image
private ModelImage image
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 classViewJComponentBase
- 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 classViewJComponentBase
- 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
- Graphicsstr
- Stringx
- inty
- int
-
-