VolumeJ
Class VJUserInterface

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 ij.plugin.frame.PlugInFrame
                      extended by VolumeJ.VJUserInterface
All Implemented Interfaces:
ij.plugin.PlugIn, java.awt.datatransfer.ClipboardOwner, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible
Direct Known Subclasses:
OF3DUserInterface, VJSurfaceJ

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

This class links the VJ classes to the ImageJ interface.
Copyright (c) 1999-2005, Michael Abramoff. All rights reserved.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
VJUserInterface()
          Open a new VJUserInterface.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          React to action e.
 boolean getLUT(VJClassifier classifier, java.lang.String path)
          Set the LUT of a classifier from an ImageJ or NIH LUT file.
 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.
 void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
           
static Volume resetVolume(VJRenderer renderer, ij.ImagePlus imp, ij.ImagePlus impindex, double aspectx, double aspecty, double aspectz)
          Change the volume to be rendered, based on the stack in window imp.
 void showDialog()
          Sets up the dialog window with all (dynamic) elements filled in.
 void windowClosing(java.awt.event.WindowEvent e)
          VJUserInterface has been 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, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, 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, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, 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, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

VJUserInterface

public VJUserInterface()
Open a new VJUserInterface.

Method Detail

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
VJUserInterface has been closed. Set the instance back to null.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Overrides:
windowClosing in class ij.plugin.frame.PlugInFrame
Parameters:
e - a WindowEvent containing the type of event that caused closing.

showDialog

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


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
React to action e.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - an ActionEvent.

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

keyReleased

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

resetVolume

public static Volume resetVolume(VJRenderer renderer,
                                 ij.ImagePlus imp,
                                 ij.ImagePlus impindex,
                                 double aspectx,
                                 double aspecty,
                                 double aspectz)
Change the volume to be rendered, based on the stack in window imp. Make a new volume from the imp window, which should contain a stack.

Parameters:
renderer - a VJRenderer that will render the volume.
imp - an Imageplus, which should contain a stack.
impindex - an ImagePlus, which can contain an index stack. If null no index is used.
aspectx - the aspect ratio x-dimension for the volume.
aspecty - the aspect ratio y-dimension for the volume.
aspectz - the aspect ratio z-dimension for the volume.

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
                          java.awt.datatransfer.Transferable contents)
Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner

getLUT

public boolean getLUT(VJClassifier classifier,
                      java.lang.String path)
Set the LUT of a classifier from an ImageJ or NIH LUT file.

Parameters:
classifier, - a VJClassifier for which you want to read the LUT.
path - a filename to be read. Get from defaultpath, if defaultpath == "", ask user for filename.
Returns:
true if LUT of classifier was sucessfully set, false otherwise.