|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
Seg2Dgel.Sg2viewImage
public class Sg2viewImage
Class Sg2viewImage implements a popup GUI to show images used in the 2D Gel Spot Segmenter and an associated histogram GUI.
Refactored from Sg2viewImage By Greg Thornwall, SAIC.
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Open2Dprot Mozilla and Legal files are available on http://Open2Dprot.sourceforge.net/.
| 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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
CalibrateOD |
cal
instance of calibrate |
(package private) int |
cHeight
canvas height |
(package private) int |
cWidth
canvas width |
Roi |
cwRoi
ROI for computing window |
Roi |
dbRoi
Debugging window for -debug: window |
DbSample |
dbSample
instance of current sample |
(package private) static int |
DIST_THR
Distance threshold in pixels from mouse (x,y) to spot centroid to find spot |
DrawOverlays |
dol
instance of DrawOverlays |
Roi |
dpRoi
Debugging window for -pixdump: window |
static boolean |
ENABLE_ZOOM
Enable zoom of images |
static int |
HIST_HEIGHT
Height of the histogram |
static int |
HIST_WIDTH
Width of the histogram |
static int |
IS_HEIGHT
Height of the img scroller |
static int |
IS_WIDTH
Width of the img scroller |
int |
MAX_ROI
max roi |
int |
maxRoi
|
(package private) static int |
NCOLS
|
int |
nPixels
The pixWidth*pixHeight |
(package private) static int |
NROWS
size of the text area in characters |
int |
paintCtr
for debugging |
int |
pixHeight
pixel height |
int |
pixWidth
pixel width |
int |
ROI_CW
|
int |
ROI_DBUG
|
int |
ROI_ND
|
int |
ROI_NONE
|
int |
ROI_PIXDUMP
|
int |
roiCode
code for specific ROI overlays |
RoiList |
roiList
list of ROIs for drawing |
java.lang.String |
roiName
name for show ROI CW overlay |
Roi |
roiND
""ND",ROI_ND instance |
(package private) static long |
serialVersionUID
frame id |
Seg2Dgel |
sg2
instance of main class |
ScrollableImage |
si
scroller for image display |
Sg2showImage |
sig
popup Image viewer GUI |
int |
VIEW_HEIGHT
Height of the frame with and without histogram |
int |
viewHeight
|
int |
viewWidth
|
int |
xImg
image address (x,y)+(xBase,yBase) |
int |
yImg
image address (x,y)+(xBase,yBase) |
| 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 | |
|---|---|
Sg2viewImage(Seg2Dgel sg2,
java.awt.Image img,
int cWidth,
int cHeight,
Roi cwRoi,
Roi roiND,
Roi dbRoi,
Roi dpRoi,
int roiCode)
Sg2viewImage() - Constructor |
|
| Method Summary | |
|---|---|
boolean |
checkHistActiveBinFilter(DbSpot s)
checkHistActiveBinFilter() - test if the histogram active bin is selected and histogram spot filtering is enabled. |
void |
close()
close() - close this popup and reset flags |
void |
createRoi(Roi cwRoi,
Roi dbRoi,
Roi dpRoi,
Roi roiND,
int roiCode)
createRoi() - Setup a list of ROIs to pass down to ScrollableImage The ROI assignments are: |
void |
drawOverLays(java.awt.Graphics g,
java.awt.Image imgToDraw,
int w,
int h)
drawOverLays() - paint the scrollable image canvas which includes the image, optional ROI's, overlay spots, optional histogram that is repainted in another class. |
java.awt.Dimension |
getPreferredSize()
getPreferredSize() - getPreferredSize, needed for sizing frame and ScrollPane correctly. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
mouseDragged() - display data |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
mousePressed() - display data, |
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
paintComponent(java.awt.Graphics g)
paintComponent() - paint the scrollable image |
boolean |
resetImage(java.awt.Image img)
resetImage() - set or reset images |
void |
resetRoiList(RoiList roiList)
resetRoiList() - set or reset roi list |
void |
setInternalCanvas(java.awt.Image pImage,
int w,
int h)
setInternalCanvas() - |
void |
setSingleROItoDisplay(int code)
setSingleROItoDisplay() - set one ROI to be displayed |
void |
setZoom(int zoomValue)
setZoom() - set the image size/zoom and create a new internalCanvas |
(package private) java.lang.String |
showImageMousePositions(int x,
int y,
java.awt.event.MouseEvent e,
java.lang.String msgs)
showImageMousePositions() - show the image mouse positions Only report if debugging... |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
windowClosing() - closing down the window, get rid of the frame. |
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
| 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, 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, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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 |
|---|
static final long serialVersionUID
public static final boolean ENABLE_ZOOM
public final int ROI_NONE
public final int ROI_CW
public final int ROI_ND
public final int ROI_DBUG
public final int ROI_PIXDUMP
public final int MAX_ROI
public final int VIEW_HEIGHT
public static final int HIST_WIDTH
public static final int HIST_HEIGHT
public static final int IS_WIDTH
public static final int IS_HEIGHT
static final int NROWS
static final int NCOLS
static final int DIST_THR
public Roi cwRoi
public Roi roiND
public Roi dbRoi
public Roi dpRoi
public java.lang.String roiName
public int roiCode
public Seg2Dgel sg2
public Sg2showImage sig
public CalibrateOD cal
public DbSample dbSample
public ScrollableImage si
public DrawOverlays dol
public int viewWidth
public int viewHeight
public int nPixels
int cWidth
int cHeight
public int paintCtr
public int pixHeight
public int pixWidth
public int xImg
public int yImg
public RoiList roiList
public int maxRoi
| Constructor Detail |
|---|
public Sg2viewImage(Seg2Dgel sg2,
java.awt.Image img,
int cWidth,
int cHeight,
Roi cwRoi,
Roi roiND,
Roi dbRoi,
Roi dpRoi,
int roiCode)
img - image to be displayedcWidth - canvas widthcHeight - canvas heightsg2 - instance of Seg2DgelcwRoi - computing window ROIcalCWroi - calibration wedge computing window ULHC coordinate xdbRoi - Debugging window for -debug: windowdpRoi - Debugging window for -pixdump: windowroiCode - code for specific ROI overlays| Method Detail |
|---|
public java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic void setSingleROItoDisplay(int code)
code - is the ROI_xxxx code found in Sg2showImage classpublic void resetRoiList(RoiList roiList)
roiList - roiList to set
public void createRoi(Roi cwRoi,
Roi dbRoi,
Roi dpRoi,
Roi roiND,
int roiCode)
No ROI code: ROI_NONE= 0 computing Window ROI code: ROI_CW= 1 Step Wedge ROI code: ROI_ND= 2 Debugging region ROI code: ROI_DBUG= 3 Picture dump region ROI code: ROI_PIXDUMP= 4 Working ROI code: ROI_WORKING= 5 The ROI_WORKING may then be copied to the CW, DBUG or PIXDUMP ROIs
cwRoi - computing window ROIcalCWroi - calibration wedge computing window ULHC coordinate xdbRoi - Debugging window for -debug: windowdpRoi - Debugging window for -pixdump: windowroiCode - which one to store for displaypublic boolean resetImage(java.awt.Image img)
new - image to use
public void setInternalCanvas(java.awt.Image pImage,
int w,
int h)
pImage - to useimage - withw - pixel widthh - pixel heightpublic void setZoom(int zoomValue)
zoomValue - public void close()
public void windowClosing(java.awt.event.WindowEvent e)
e - is window closing eventclose()public void windowOpened(java.awt.event.WindowEvent e)
public void windowActivated(java.awt.event.WindowEvent e)
public void windowClosed(java.awt.event.WindowEvent e)
public void windowDeactivated(java.awt.event.WindowEvent e)
public void windowDeiconified(java.awt.event.WindowEvent e)
public void windowIconified(java.awt.event.WindowEvent e)
public boolean checkHistActiveBinFilter(DbSpot s)
s - is spot to test
public void drawOverLays(java.awt.Graphics g,
java.awt.Image imgToDraw,
int w,
int h)
g - is graphics context.public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentg - is graphics context.
final java.lang.String showImageMousePositions(int x,
int y,
java.awt.event.MouseEvent e,
java.lang.String msgs)
e - is mouse eventmsgs - is message to displayx - is image object positiony - is image object positionpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenere - is MouseEventpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenere - is MouseEventpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||