Seg2Dgel
Class Sg2showImage

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by Seg2Dgel.Sg2showImage
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class Sg2showImage
extends javax.swing.JFrame
implements java.awt.event.ItemListener, java.awt.event.ActionListener, java.awt.event.WindowListener

Class Sg2showImage implements a popup GUI to show images used in the 2D Gel Spot Segmenter.

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/.

Version:
$Date: 2005/10/23 12:44:54 $ $Revision: 1.33 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702
See Also:
Open2Dprot Home, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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
 java.awt.Checkbox allSpotsCB
          the "All spots" Checkbox
 boolean allSpotsFlag
          set from "All spots" checkbox
 java.lang.String baseImageFile
          base name of the image for use in the title
 boolean changeGuiFlag
          flag to indicating that the GUI may have changed and that it should be rebuilt.
 javax.swing.JPanel controlPanel
          Control panel for the main frame
 java.lang.String dataUnits
          Data type as fct of histogram data type
 java.lang.String dispName
          Name of image to display after a segmentation
 char[] dispPixC
          Picture buffer char[] of image to display after a segmentation.
 java.awt.Choice dispPixChoice
          Selector for image to display after a segmentation
 java.lang.String dispPixFile
          File of image to display after a segmentation.
 char[] dispPixWorking
          Picture buffer char[] of image to display after a segmentation.
(package private) static int DIST_THR
          Distance threshold in pixels from mouse (x,y) to spot centroid to find spot \
 boolean drawHorizSliceFlag
          menu CB item to display horizontal slice
 boolean drawVertSliceFlag
          menu CB item to display vertical slice
static boolean ENABLE_ZOOM
          Enable zoom of images
 java.awt.Menu fileMenu
          "File" pull down Menu list
 boolean filterGEQactiveBinFlag
          menu CB item to test spots for GEQ activeBin value, else LEQ activeBin value fromt the selected histogram bin for the histogram histType spot data.
 java.lang.String fontFamily
           
 boolean hasHistGUIflag
          flag to indicate that the GUI contains the Histogram sub-GUI
 Sg2drawHistogram hCanvas
          Histogram Canvas to hold the image
 int[] hist
          full input unscaled histogram data [0:nHist-1]
static int HIST_HEIGHT
          Height of the histogram
static int HIST_IMAGE_DENSITY
          types of histogram data allowed
static int HIST_NONE
          types of histogram data allowed
static int HIST_SPOT_AREA
          types of histogram data allowed
static int HIST_SPOT_MAX_DENSITY
          types of histogram data allowed
static int HIST_SPOT_MIN_DENSITY
          types of histogram data allowed
static int HIST_SPOT_MNBKGRD
          types of histogram data allowed
static int HIST_SPOT_MNDENSITY
          types of histogram data allowed
static int HIST_SPOT_SX_SY_RATIO_RANGE
          types of histogram data allowed
static int HIST_SPOT_TOT_DENSITY
          types of histogram data allowed
static int HIST_SPOT_TOT_DENSITY_PRIME
          types of histogram data allowed
static int HIST_SPOT_TOT_DENSITY_RANGE
          types of histogram data allowed
static int HIST_SPOT_VOLUME
          types of histogram data allowed
static int HIST_WIDTH
          Width of the histogram
 java.awt.Choice histChoice
          "Histogram" Choice list
 java.awt.Menu histMenu
          "Histogram" pull down Menu list
static java.lang.String[] histNames
          list of histogram data types
 int histType
          type of data to use with the histogram
static int IS_HEIGHT
          Height of the img scroller
static int IS_WIDTH
          Width of the img scroller
 boolean isVisibleFlag
          Set true if window is visible
 java.awt.Font largeFont
           
 java.awt.Checkbox logReportCB
          the "Log report" checkbox
 boolean logReportFlag
          set from "Log report" checkbox
 float maxDataValue
          Maximum value expected for current hist[] data
 int maxGrayPixel
          Maximum gray value for pixel
(package private)  java.awt.MenuBar mbar
          menu bar for the frame
 java.awt.Font mediumFont
           
 float minDataValue
          Minimum value expected for current hist[] data
 MenuSupport ms
          Menu support functions using Hashtables to tack what is active
 java.awt.TextArea msgTextArea
          Text area GUI for message rporting
 int nbrPassedFilter
          # of spots passing filter
(package private) static int NCOLS
           
 int nHist
          size of input unscaled histogram[] data
 int nPixels
          The pixWidth*pixHeight
 int nPixList
           
(package private) static int NROWS
          size of the text area in characters
 java.awt.Image pImg
          Image to display
 char[][] pixClist
          List of display pix associate char[] images
 java.lang.String[] pixFileList
           
 int[] pixGrayBits
          list of max gray pixel sizes of pixClist pixels
 int pixHeight
          The height of the image
 java.lang.String[] pixMenuList
          list of display picture menu commands for choices
 java.lang.String[] pixNameList
          list of display picture names for choices
 int pixWidth
          The width of the image
 java.awt.Dimension preferedCanvasSize
           
 int radix
          Code for winDump radix
 java.awt.Choice radixChoice
          Selector for windmp radix
 java.lang.String radixName
          Name winDump radix
 int ROI_CW
          Computing Window ROI code
 int ROI_DBUG
          Debugging region ROI code
 int ROI_ND
          Step Wedge ROI code
 int ROI_NONE
          No ROI code
 int ROI_PIXDUMP
          Picture dump region ROI code
 int ROI_WORKING
          Working ROI code.
 java.awt.Choice roiChoice
          Selector for show ROI CW overlay
 int roiCode
          code for show ROI CW overlay
 Roi roiCW
           
 Roi roiDBUG
          "DBUG",ROI_DBUG instance
 java.awt.Menu roiMenu
          "RegionOfInterest" pull down Menu list
 java.lang.String roiName
          name for show ROI CW overlay
 Roi roiND
          ""ND",ROI_ND instance
 Roi roiPIXDUMP
          "PIXDUMP",ROI_PIXDUMP instance
 Roi roiWORKING
          Internal "WORKING",ROI_WORKING instance that can be used to set the CW, DBUG or PIXDUMP (not the ND) Rois
 int selImgIdx
          image index
(package private) static long serialVersionUID
          frame id
 Seg2Dgel sg2
          instance of the main class
private  Sg2viewImage sg2Vi
          Sg2ViewImage to hold the image
 boolean showCWflag
           
 boolean showDbugCWflag
           
 boolean showNDCWflag
           
 boolean showPixdumpCWflag
           
 boolean showSpotNbrsFlag
          set from "View spot numbers" checkbox
 java.awt.Font smallFont
           
 boolean splitPanelFlag
          to use spiltPane or not
private  int textAreaFontSize
          font size
private  java.lang.String textFontFamily
          font family for message window
 java.awt.Checkbox useDragCB
          the "Use drag" checkbox
 boolean useDragFlag
          set from "Use drag" checkbox
 boolean useFilterByBinFlag
          menu CB item to filter spots by testing if the histogram active bin is selected and histogram spot feature meets the active bin test
 boolean useHistGUIflag
          flag to use simple ImageViewer w/o histogram or full GUI with the histogram
 int VIEW_HEIGHT
          Height of the frame with and without histogram
 int VIEW_WIDTH_NO_HIST
          Width of the frame without histogram
 int VIEW_WIDTH_WITH_HIST
          Width of the frame with histogram
 int viewHeight
           
 java.awt.Menu viewMenu
          "View" pull down Menu list
 int viewWidth
           
 int windmpSize
          Code for winDump size
 java.awt.Choice windmpSizeChoice
          Selector for winDump size
 java.lang.String windmpSizeName
          Name windump size
 java.awt.Choice zoomChoice
          "Zoom" Choice list
 int zoomVal
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Sg2showImage(Seg2Dgel sg2, boolean useHistGUIflag, java.lang.String baseImageFile)
          Sg2showImage() - Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed() - Handle button clicks
 void addHistogramGUI()
          addHistogramGUI() - Add the histogram GUI to the ImageViewer GUI
private  void addMenuTree(java.awt.Frame f, java.awt.MenuBar mbar)
          addMenuTree() - create pull down menus in menu bar
 boolean buildImageGUI(java.awt.Image img)
          buildImageGUI() - Build the ImageViewer GUI from scratch
 boolean calcHistogram()
          calcHistogram() - compute histogram from image data.
 boolean calcSpotDataMaxMinValues()
          calcSpotDataMaxMinValues() - calc maxDataValue and minDataValue from the spotList[] data that is inside of the ROI if used.
 void close()
          close() - close this popup and reset flags
 void displayImageGUI()
          displayImageGUI() - show the Image Viewer, used only have already initialized before.
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - getPreferredSize, needed for sizing frame and ScrollPane correctly.
private  boolean initImageGUI(java.lang.String dName)
          initImageGUI() - init the image gui.
 void itemStateChanged(java.awt.event.ItemEvent e)
          itemStateChanged() - handle item state changed events NOTE: need to implement radio groups here since AWT only implements radio groups for Checkboxes, and CheckboxMenuItems.
 void positionImageWindow()
          positionImageWindow() - position image window on the screen
 void removeHistogramGUI()
          removeHistogramGUI() - Remove the histogram GUI from the ImageViewer GUI
 boolean setCurrentROI()
          setCurrentROI() - set the current ROI if both ULHC and LRHC are not -1
 boolean setHistDataGUI(int histDataType)
          setHistDataGUI() - set checkbox radio button and choice selected for histogram data type
 boolean setImageGUI(java.lang.String imgName)
          setImageGUI() - set checkbox radio button and choice selected for image to be displayed
 boolean setPixDatabase(java.lang.String[] pixNameList, java.lang.String[] pixMenuList, java.lang.String[] pixFileList, char[][] pixClist, int[] pixGrayBits, int nPixList, java.lang.String defaultPixName, int pixWidth, int pixHeight, boolean useHistGUIflag)
          setPixDatabase() - setup the list of predefined images available to the ImageViewer.
 void setRadixGUI(int r)
          setRadixGUI() - set checkbox radio button and choice selected for radix type
 void setROItypeGUI(int code)
          setROItypeGUI() - set checkbox radio button and choice selected for ROI type
 boolean setSg2ImageGUI(java.lang.String dName)
          setSg2ImageGUI() - reset the Image Viewer GUI window only
 void setWindmpSizeGUI(int size)
          setWindmpSizeGUI() - set checkbox radio button and Choice selected and process event for windmp size checkboxes
 void setZoom(int zoomValue)
          setZoom() - set the image size/zoom and create a new internalCanvas
 boolean showImageGUI(java.lang.String dName)
          showImageGUI() - show the Image Viewer GUI window
 void showImgMsg(java.lang.String msg)
          showImgMsg() - display the msg in text area window
 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.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

serialVersionUID

static final long serialVersionUID
frame id

See Also:
Constant Field Values

sg2

public Seg2Dgel sg2
instance of the main class


ENABLE_ZOOM

public static final boolean ENABLE_ZOOM
Enable zoom of images

See Also:
Constant Field Values

useHistGUIflag

public boolean useHistGUIflag
flag to use simple ImageViewer w/o histogram or full GUI with the histogram


baseImageFile

public java.lang.String baseImageFile
base name of the image for use in the title


changeGuiFlag

public boolean changeGuiFlag
flag to indicating that the GUI may have changed and that it should be rebuilt.


hasHistGUIflag

public boolean hasHistGUIflag
flag to indicate that the GUI contains the Histogram sub-GUI


VIEW_WIDTH_NO_HIST

public final int VIEW_WIDTH_NO_HIST
Width of the frame without histogram

See Also:
Constant Field Values

VIEW_WIDTH_WITH_HIST

public final int VIEW_WIDTH_WITH_HIST
Width of the frame with histogram

See Also:
Constant Field Values

VIEW_HEIGHT

public final int VIEW_HEIGHT
Height of the frame with and without histogram

See Also:
Constant Field Values

HIST_WIDTH

public static final int HIST_WIDTH
Width of the histogram

See Also:
Constant Field Values

HIST_HEIGHT

public static final int HIST_HEIGHT
Height of the histogram

See Also:
Constant Field Values

IS_WIDTH

public static final int IS_WIDTH
Width of the img scroller

See Also:
Constant Field Values

IS_HEIGHT

public static final int IS_HEIGHT
Height of the img scroller

See Also:
Constant Field Values

NROWS

static final int NROWS
size of the text area in characters

See Also:
Constant Field Values

NCOLS

static final int NCOLS
See Also:
Constant Field Values

DIST_THR

static final int DIST_THR
Distance threshold in pixels from mouse (x,y) to spot centroid to find spot \

See Also:
Constant Field Values

ROI_NONE

public final int ROI_NONE
No ROI code

See Also:
Constant Field Values

ROI_CW

public final int ROI_CW
Computing Window ROI code

See Also:
Constant Field Values

ROI_ND

public final int ROI_ND
Step Wedge ROI code

See Also:
Constant Field Values

ROI_DBUG

public final int ROI_DBUG
Debugging region ROI code

See Also:
Constant Field Values

ROI_PIXDUMP

public final int ROI_PIXDUMP
Picture dump region ROI code

See Also:
Constant Field Values

ROI_WORKING

public final int ROI_WORKING
Working ROI code. This ROI may then be copied to the CW, DBUG or PIXDUMP ROIs

See Also:
Constant Field Values

mbar

java.awt.MenuBar mbar
menu bar for the frame


fileMenu

public java.awt.Menu fileMenu
"File" pull down Menu list


roiMenu

public java.awt.Menu roiMenu
"RegionOfInterest" pull down Menu list


viewMenu

public java.awt.Menu viewMenu
"View" pull down Menu list


histMenu

public java.awt.Menu histMenu
"Histogram" pull down Menu list


histChoice

public java.awt.Choice histChoice
"Histogram" Choice list


zoomChoice

public java.awt.Choice zoomChoice
"Zoom" Choice list


controlPanel

public javax.swing.JPanel controlPanel
Control panel for the main frame


ms

public MenuSupport ms
Menu support functions using Hashtables to tack what is active


sg2Vi

private Sg2viewImage sg2Vi
Sg2ViewImage to hold the image


msgTextArea

public java.awt.TextArea msgTextArea
Text area GUI for message rporting


textAreaFontSize

private int textAreaFontSize
font size


textFontFamily

private java.lang.String textFontFamily
font family for message window


fontFamily

public java.lang.String fontFamily

smallFont

public java.awt.Font smallFont

mediumFont

public java.awt.Font mediumFont

largeFont

public java.awt.Font largeFont

dispPixChoice

public java.awt.Choice dispPixChoice
Selector for image to display after a segmentation


pixHeight

public int pixHeight
The height of the image


pixWidth

public int pixWidth
The width of the image


radixChoice

public java.awt.Choice radixChoice
Selector for windmp radix


radixName

public java.lang.String radixName
Name winDump radix


radix

public int radix
Code for winDump radix


windmpSizeChoice

public java.awt.Choice windmpSizeChoice
Selector for winDump size


windmpSizeName

public java.lang.String windmpSizeName
Name windump size


windmpSize

public int windmpSize
Code for winDump size


roiChoice

public java.awt.Choice roiChoice
Selector for show ROI CW overlay


roiName

public java.lang.String roiName
name for show ROI CW overlay


roiCode

public int roiCode
code for show ROI CW overlay


roiWORKING

public Roi roiWORKING
Internal "WORKING",ROI_WORKING instance that can be used to set the CW, DBUG or PIXDUMP (not the ND) Rois


roiCW

public Roi roiCW

roiND

public Roi roiND
""ND",ROI_ND instance


roiDBUG

public Roi roiDBUG
"DBUG",ROI_DBUG instance


roiPIXDUMP

public Roi roiPIXDUMP
"PIXDUMP",ROI_PIXDUMP instance


allSpotsCB

public java.awt.Checkbox allSpotsCB
the "All spots" Checkbox


allSpotsFlag

public boolean allSpotsFlag
set from "All spots" checkbox


showSpotNbrsFlag

public boolean showSpotNbrsFlag
set from "View spot numbers" checkbox


isVisibleFlag

public boolean isVisibleFlag
Set true if window is visible


drawHorizSliceFlag

public boolean drawHorizSliceFlag
menu CB item to display horizontal slice


drawVertSliceFlag

public boolean drawVertSliceFlag
menu CB item to display vertical slice


filterGEQactiveBinFlag

public boolean filterGEQactiveBinFlag
menu CB item to test spots for GEQ activeBin value, else LEQ activeBin value fromt the selected histogram bin for the histogram histType spot data.


useFilterByBinFlag

public boolean useFilterByBinFlag
menu CB item to filter spots by testing if the histogram active bin is selected and histogram spot feature meets the active bin test


nbrPassedFilter

public int nbrPassedFilter
# of spots passing filter


useDragCB

public java.awt.Checkbox useDragCB
the "Use drag" checkbox


useDragFlag

public boolean useDragFlag
set from "Use drag" checkbox


logReportCB

public java.awt.Checkbox logReportCB
the "Log report" checkbox


logReportFlag

public boolean logReportFlag
set from "Log report" checkbox


viewWidth

public int viewWidth

viewHeight

public int viewHeight

zoomVal

public int zoomVal

showCWflag

public boolean showCWflag

showNDCWflag

public boolean showNDCWflag

showDbugCWflag

public boolean showDbugCWflag

showPixdumpCWflag

public boolean showPixdumpCWflag

hCanvas

public Sg2drawHistogram hCanvas
Histogram Canvas to hold the image


hist

public int[] hist
full input unscaled histogram data [0:nHist-1]


nHist

public int nHist
size of input unscaled histogram[] data


histType

public int histType
type of data to use with the histogram


HIST_NONE

public static final int HIST_NONE
types of histogram data allowed

See Also:
Constant Field Values

HIST_IMAGE_DENSITY

public static final int HIST_IMAGE_DENSITY
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_AREA

public static final int HIST_SPOT_AREA
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_MNBKGRD

public static final int HIST_SPOT_MNBKGRD
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_MNDENSITY

public static final int HIST_SPOT_MNDENSITY
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_TOT_DENSITY

public static final int HIST_SPOT_TOT_DENSITY
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_TOT_DENSITY_PRIME

public static final int HIST_SPOT_TOT_DENSITY_PRIME
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_VOLUME

public static final int HIST_SPOT_VOLUME
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_MIN_DENSITY

public static final int HIST_SPOT_MIN_DENSITY
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_MAX_DENSITY

public static final int HIST_SPOT_MAX_DENSITY
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_TOT_DENSITY_RANGE

public static final int HIST_SPOT_TOT_DENSITY_RANGE
types of histogram data allowed

See Also:
Constant Field Values

HIST_SPOT_SX_SY_RATIO_RANGE

public static final int HIST_SPOT_SX_SY_RATIO_RANGE
types of histogram data allowed

See Also:
Constant Field Values

histNames

public static final java.lang.String[] histNames
list of histogram data types


dataUnits

public java.lang.String dataUnits
Data type as fct of histogram data type


minDataValue

public float minDataValue
Minimum value expected for current hist[] data


maxDataValue

public float maxDataValue
Maximum value expected for current hist[] data


maxGrayPixel

public int maxGrayPixel
Maximum gray value for pixel


dispPixC

public char[] dispPixC
Picture buffer char[] of image to display after a segmentation. Note this is read either from the pix? variable or from the file if the pix? variable is null.


dispName

public java.lang.String dispName
Name of image to display after a segmentation


nPixels

public int nPixels
The pixWidth*pixHeight


dispPixFile

public java.lang.String dispPixFile
File of image to display after a segmentation. Used if dispPixC is null.


dispPixWorking

public char[] dispPixWorking
Picture buffer char[] of image to display after a segmentation. Note this is read either from the pix? variable or from the file if the pix? variable is null.


selImgIdx

public int selImgIdx
image index


nPixList

public int nPixList

pixNameList

public java.lang.String[] pixNameList
list of display picture names for choices


pixMenuList

public java.lang.String[] pixMenuList
list of display picture menu commands for choices


pixFileList

public java.lang.String[] pixFileList

pixClist

public char[][] pixClist
List of display pix associate char[] images


pixGrayBits

public int[] pixGrayBits
list of max gray pixel sizes of pixClist pixels


pImg

public java.awt.Image pImg
Image to display


preferedCanvasSize

public java.awt.Dimension preferedCanvasSize

splitPanelFlag

public boolean splitPanelFlag
to use spiltPane or not

Constructor Detail

Sg2showImage

public Sg2showImage(Seg2Dgel sg2,
                    boolean useHistGUIflag,
                    java.lang.String baseImageFile)
Sg2showImage() - Constructor

Parameters:
sg2 - is an instance of the main class
useHistGUIflag - to bring up the histogram GUI as well.
baseImageFile - is the base name of the image
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
getPreferredSize() - getPreferredSize, needed for sizing frame and ScrollPane correctly.

Overrides:
getPreferredSize in class java.awt.Container
Returns:
frame size

setPixDatabase

public boolean setPixDatabase(java.lang.String[] pixNameList,
                              java.lang.String[] pixMenuList,
                              java.lang.String[] pixFileList,
                              char[][] pixClist,
                              int[] pixGrayBits,
                              int nPixList,
                              java.lang.String defaultPixName,
                              int pixWidth,
                              int pixHeight,
                              boolean useHistGUIflag)
setPixDatabase() - setup the list of predefined images available to the ImageViewer. All images must be the same heightXwidth.

Parameters:
pixNameList - is the list of display picture names for choices/menus
pixMenuList - is the list of display picture menu cmds
pixFileList - is list of associated file names if any
pixClist - is list of the associate char[] images
nPixList - is size of the lists in case list contents is less than size
defaultPixName - is the default pix name
pixWidth - is width of all images
pixHeight - is height of all images
useHistGUIflag - to bring up the histogram GUI as well.
Returns:
true if succeed

initImageGUI

private boolean initImageGUI(java.lang.String dName)
initImageGUI() - init the image gui. This sets the dispName, dispPixWorking, dispPixFile, and selImgIdx.

Parameters:
dName - is the image to display
Returns:
true if succeed

displayImageGUI

public void displayImageGUI()
displayImageGUI() - show the Image Viewer, used only have already initialized before. Should leave everything the way it was before window was closed.


showImageGUI

public boolean showImageGUI(java.lang.String dName)
showImageGUI() - show the Image Viewer GUI window

Returns:
true if succeed

setSg2ImageGUI

public boolean setSg2ImageGUI(java.lang.String dName)
setSg2ImageGUI() - reset the Image Viewer GUI window only

Returns:
true if succeed

addHistogramGUI

public void addHistogramGUI()
addHistogramGUI() - Add the histogram GUI to the ImageViewer GUI


removeHistogramGUI

public void removeHistogramGUI()
removeHistogramGUI() - Remove the histogram GUI from the ImageViewer GUI


buildImageGUI

public boolean buildImageGUI(java.awt.Image img)
buildImageGUI() - Build the ImageViewer GUI from scratch


addMenuTree

private void addMenuTree(java.awt.Frame f,
                         java.awt.MenuBar mbar)
addMenuTree() - create pull down menus in menu bar

Parameters:
f - is frame
mbar - is MenuBar

showImgMsg

public void showImgMsg(java.lang.String msg)
showImgMsg() - display the msg in text area window

Parameters:
msg - to display

positionImageWindow

public void positionImageWindow()
positionImageWindow() - position image window on the screen


setCurrentROI

public boolean setCurrentROI()
setCurrentROI() - set the current ROI if both ULHC and LRHC are not -1


close

public void close()
close() - close this popup and reset flags


windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
windowClosing() - closing down the window, get rid of the frame.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - is window closing event
See Also:
close()

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

calcSpotDataMaxMinValues

public boolean calcSpotDataMaxMinValues()
calcSpotDataMaxMinValues() - calc maxDataValue and minDataValue from the spotList[] data that is inside of the ROI if used. This range is for ALL spots - not just VALID spots. Filtering for valid spots is done elsewhere.


calcHistogram

public boolean calcHistogram()
calcHistogram() - compute histogram from image data. The dynamic range is determined by the actual data.


setWindmpSizeGUI

public void setWindmpSizeGUI(int size)
setWindmpSizeGUI() - set checkbox radio button and Choice selected and process event for windmp size checkboxes

Parameters:
size - is the size X size window in the range of 5 to 21.

setROItypeGUI

public void setROItypeGUI(int code)
setROItypeGUI() - set checkbox radio button and choice selected for ROI type

Parameters:
code - is the ROI_xxxx code

setZoom

public void setZoom(int zoomValue)
setZoom() - set the image size/zoom and create a new internalCanvas

Parameters:
zoomValue -

setRadixGUI

public void setRadixGUI(int r)
setRadixGUI() - set checkbox radio button and choice selected for radix type

Parameters:
r - is the radix code

setImageGUI

public boolean setImageGUI(java.lang.String imgName)
setImageGUI() - set checkbox radio button and choice selected for image to be displayed

Parameters:
imgName - is the name name
Returns:
true if found image to be displayed

setHistDataGUI

public boolean setHistDataGUI(int histDataType)
setHistDataGUI() - set checkbox radio button and choice selected for histogram data type

Parameters:
r - is the radix code

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged() - handle item state changed events NOTE: need to implement radio groups here since AWT only implements radio groups for Checkboxes, and CheckboxMenuItems.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - is ItemEvent

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - Handle button clicks

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - is action evet