va
Class VAInterface

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--ij.plugin.frame.PlugInFrame
                                |
                                +--va.VAInterface
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.MenuContainer, ij.plugin.PlugIn, java.io.Serializable, java.awt.event.WindowListener

public class VAInterface
extends ij.plugin.frame.PlugInFrame
implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.KeyListener

User interface for Video Angiography. Uses the IMAQ video API for controlling the video camera. Can acquire runs of a preset number of frames at two different frame rates (fast and slow) for early and late phases. Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Inner classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
protected  TimedAcquisition acquirer
           
protected  boolean acquiringFlag
           
protected  java.awt.Button buttonAcq
           
protected  java.awt.Button buttonClose
           
protected  java.awt.Button buttonRingAcq
           
protected  java.awt.Button buttonStart
           
protected  java.awt.Button buttonStop
           
protected static java.lang.String directory
           
(package private)  java.util.Vector frameBag
           
protected  int frameNumber
           
protected  int height
           
protected static java.awt.Frame instance
           
protected  java.awt.Label labelFrameRate
           
protected  java.awt.Label labelStatus
           
protected  java.awt.Label labelStatus1
           
protected  java.awt.TextField textFieldInitialFrameRate
           
protected  java.awt.TextField textFieldInitialFrames
           
protected  java.awt.TextField textFieldPostFrameRate
           
protected  java.awt.TextField textFieldPostFrames
           
protected  int timerPhase
           
protected static java.lang.String VERSION
           
(package private)  ij.ImagePlus videoImp
           
(package private)  ij.process.ImageProcessor videoProcessor
           
protected  VideoWatch watch
           
protected  int width
           
 
Fields inherited from class ij.plugin.frame.PlugInFrame
title
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
inputContext, OPENED, ownedWindowList, state, warningString, windowListener
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents
 
Fields inherited from class java.awt.Component
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
VAInterface()
          Open a new VAInterface.
 
Method Summary
 void acqFinished()
           
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  void activateButtons()
          Activate the buttons, depending on the flags.
protected  java.awt.TextField createTextField(java.awt.Panel p, java.lang.String label, java.lang.String defaultContents, int nrChars)
          Create a text field with default content of length i (in characters).
protected  float getFloatField(java.awt.TextField t)
          Get the value of a Textfield as a float.
protected  void initVideo()
           
 void itemStateChanged(java.awt.event.ItemEvent e)
          React to action e.
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
          React to action e.
protected  void perform(java.awt.AWTEvent e)
          Actual processing.
 void showGUI()
          Sets up the dialog window with all (dynamic) elements filled in.
protected  void streamToStack()
           
 void windowClosing(java.awt.event.WindowEvent e)
          VAInterface is being closed.
 
Methods inherited from class ij.plugin.frame.PlugInFrame
close, focusGained, focusLost, run, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.awt.Frame
, addNotify, addToFrameList, constructComponentName, finalize, getAccessibleContext, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, paramString, postProcessKeyEvent, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, processWindowEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
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

VERSION

protected static final java.lang.String VERSION

buttonStart

protected java.awt.Button buttonStart

buttonStop

protected java.awt.Button buttonStop

buttonClose

protected java.awt.Button buttonClose

buttonAcq

protected java.awt.Button buttonAcq

buttonRingAcq

protected java.awt.Button buttonRingAcq

labelFrameRate

protected java.awt.Label labelFrameRate

labelStatus

protected java.awt.Label labelStatus

labelStatus1

protected java.awt.Label labelStatus1

textFieldInitialFrameRate

protected java.awt.TextField textFieldInitialFrameRate

textFieldPostFrameRate

protected java.awt.TextField textFieldPostFrameRate

textFieldInitialFrames

protected java.awt.TextField textFieldInitialFrames

textFieldPostFrames

protected java.awt.TextField textFieldPostFrames

videoImp

ij.ImagePlus videoImp

videoProcessor

ij.process.ImageProcessor videoProcessor

frameBag

java.util.Vector frameBag

watch

protected VideoWatch watch

acquirer

protected TimedAcquisition acquirer

frameNumber

protected int frameNumber

timerPhase

protected int timerPhase

acquiringFlag

protected boolean acquiringFlag

directory

protected static java.lang.String directory

instance

protected static java.awt.Frame instance

width

protected int width

height

protected int height
Constructor Detail

VAInterface

public VAInterface()
Open a new VAInterface.
Method Detail

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
VAInterface is being closed. Set the instance back to null.
Overrides:
windowClosing in class ij.plugin.frame.PlugInFrame
Parameters:
e - a WindowEvent containing the type of event that caused closing.

showGUI

public void showGUI()
Sets up the dialog window with all (dynamic) elements filled in.

initVideo

protected void initVideo()

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
React to action e.
Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - an ItemEvent.

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
React to action e.
Specified by:
keyTyped in interface java.awt.event.KeyListener
Parameters:
e - a KeyEvent.

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

acqFinished

public void acqFinished()

activateButtons

protected void activateButtons()
Activate the buttons, depending on the flags.

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

perform

protected void perform(java.awt.AWTEvent e)
Actual processing.
Parameters:
e - an Event.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

streamToStack

protected void streamToStack()

createTextField

protected java.awt.TextField createTextField(java.awt.Panel p,
                                             java.lang.String label,
                                             java.lang.String defaultContents,
                                             int nrChars)
Create a text field with default content of length i (in characters).
Parameters:
p - the panel to which the text field will be added.
label - the label of the textfield.
defaultContents - the default contents of the text field.
nrChars - the length in characters of the text field.
Returns:
the Textfield that was created.

getFloatField

protected float getFloatField(java.awt.TextField t)
Get the value of a Textfield as a float.
Parameters:
t - a TextField.
Returns:
a float with the value of the text field, 0 if an error.