|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel de.desy.acop.video.displayer.ImageDisplayer
public class ImageDisplayer
ImageDisplayer
implements basic, but versatile display of video
images. Five guidelines were set at development startup:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
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 |
Field Summary | |
---|---|
static java.lang.String |
INVALID_CAMERA_PORT_NAME
|
static java.lang.String |
PROPERTY_AOI_ZOOM
|
static java.lang.String |
PROPERTY_COLOR_MAP
|
static java.lang.String |
PROPERTY_HISTOGRAM_EQUALISATION
|
static java.lang.String |
PROPERTY_HISTOGRAM_MAX
|
static java.lang.String |
PROPERTY_HISTOGRAM_MIN
|
static java.lang.String |
PROPERTY_IMAGE_ZOOM
|
static java.lang.String |
PROPERTY_KEEP_ASPECT_RATIO
|
static java.lang.String |
PROPERTY_OVERLAY_STATE
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ImageDisplayer()
Constructs class |
Method Summary | |
---|---|
boolean |
exportToPNG(java.lang.String fileNamePath)
Exports the currently displayed image as exported PNG file. |
ImageCLUT |
getCLUT()
returns the currently used color lookup table. |
ColorMap |
getColorMap()
returns the currently used false color map to outside world. |
java.beans.ExceptionListener |
getExceptionListener()
Gets the ExceptionListener object for this ImageDisplayer. |
int |
getHistogramMax()
returns histogram max value |
int |
getHistogramMin()
returns histogram min value |
de.desy.tine.types.IMAGE |
getIMAGE()
Returns current Tine image |
ImageZoom |
getImageZoom()
Returns image zoom. |
OverlayState |
getOverlayState()
Returns overlay information state. |
java.awt.image.BufferedImage |
getSnapshotImage()
Takes a snapshot of the currently displayed image. |
boolean |
isAOIZoom()
returns whether out zooming of AOI (no black border around AOI which depicts full frame) is currently enabled. |
boolean |
isHistogramEqualisation()
returns whether histogram equalization (normalization) is currently enabled. |
boolean |
isKeepAspectRatio()
returns whether 'aspect ratio is kept' is currently enabled. |
protected void |
paintComponent(java.awt.Graphics g)
|
void |
resetForReceiving()
resets important internal parameters. |
boolean |
saveAsPNGImage(java.lang.String fileNamePath)
Saves the currently displayed image as archival PNG file. |
void |
setAOIZoom(boolean aoiZoom)
Switches 'AOI zoom' on or off. |
void |
setCLUT(ImageCLUT newValue)
Sets color lookup table. |
void |
setColorMap(ColorMap newValue)
Updates the currently used false color map. |
void |
setExceptionListener(java.beans.ExceptionListener exceptionListener)
Sets an exception listener for this ImageDisplayer. |
void |
setHistogramEqualisation(boolean newValue)
Sets whether or not the histogram equalization (normalization) is enabled. After new assignment, drawing as well as repainting is enforced to update all involved parts of code so that Histogram Equalization is immediately applied to image. |
void |
setHistogramMax(int newValue)
Sets histogram max value |
void |
setHistogramMin(int newValue)
Sets histogram min value |
void |
setImageZoom(ImageZoom newValue)
Sets image zoom |
void |
setKeepAspectRatio(boolean keepAspectRatio)
Switches 'aspect ratio is kept' on or off. |
void |
setLiveTransfer(boolean aLive)
informs the displayer that a lot of frames are constantly to be drawn(true) or it is not very likely that a lot of frames are drawn (timeout on transfer or stop mode). |
void |
setOverlayState(OverlayState newValue)
Sets overlay state mode |
void |
updateValue(de.desy.tine.types.IMAGE ti)
passes/injects a new image into image processing, drawing and redrawing pipeline. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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, update |
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, transferFocusBackward, 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, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INVALID_CAMERA_PORT_NAME
public static final java.lang.String PROPERTY_KEEP_ASPECT_RATIO
public static final java.lang.String PROPERTY_AOI_ZOOM
public static final java.lang.String PROPERTY_OVERLAY_STATE
public static final java.lang.String PROPERTY_IMAGE_ZOOM
public static final java.lang.String PROPERTY_HISTOGRAM_EQUALISATION
public static final java.lang.String PROPERTY_HISTOGRAM_MIN
public static final java.lang.String PROPERTY_HISTOGRAM_MAX
public static final java.lang.String PROPERTY_COLOR_MAP
Constructor Detail |
---|
public ImageDisplayer()
Method Detail |
---|
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public de.desy.tine.types.IMAGE getIMAGE()
public ImageCLUT getCLUT()
public void setCLUT(ImageCLUT newValue)
newValue
- new color lookup tablepublic void setColorMap(ColorMap newValue)
newValue
- - new color map to usepublic ColorMap getColorMap()
public void setImageZoom(ImageZoom newValue)
newValue
- - new image zoom valuepublic ImageZoom getImageZoom()
public void setOverlayState(OverlayState newValue)
newValue
- - new overlay state valuepublic OverlayState getOverlayState()
public void setHistogramEqualisation(boolean newValue)
newValue
- - switch histogram equalization on (true) or off (false)public boolean isHistogramEqualisation()
true
if histogram equalization is enabled, otherwise
false
public void setHistogramMin(int newValue)
newValue
- - histogram min valuepublic int getHistogramMin()
public void setHistogramMax(int newValue)
newValue
- - histogram max valuepublic int getHistogramMax()
public void setAOIZoom(boolean aoiZoom)
aoiZoom
- - enable (true) or disable (false) AOI zoomingpublic boolean isAOIZoom()
public void setKeepAspectRatio(boolean keepAspectRatio)
keepAspectRatio
- - enable (true) or disable (false) keeping of aspect ratiopublic boolean isKeepAspectRatio()
public void setLiveTransfer(boolean aLive)
aLive
- public void resetForReceiving()
resetForReceiving
in interface TineImageReceiver
public void updateValue(de.desy.tine.types.IMAGE ti)
updateValue
in interface TineImageReceiver
ti
- new TINE imagepublic java.awt.image.BufferedImage getSnapshotImage()
public boolean saveAsPNGImage(java.lang.String fileNamePath)
fileNamePath
- Filename of PNG file with extension, may include path
false
if an error occurs during writing, otherwise
true
public boolean exportToPNG(java.lang.String fileNamePath)
fileNamePath
- Filename of PNG file with extension, may include path
false
if an error occurs during writing, otherwise
true
public void setExceptionListener(java.beans.ExceptionListener exceptionListener)
exceptionListener
- - the exception listenerpublic java.beans.ExceptionListener getExceptionListener()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |