com.xinapse.dynamic
Class AbstractDynamicFrame

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 com.xinapse.util.ImageOrganiserFrame
                          extended by com.xinapse.util.MultiContrastAnalysisFrame
                              extended by com.xinapse.dynamic.AbstractDynamicFrame
All Implemented Interfaces:
MessageShower, PreferencesSettable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public abstract class AbstractDynamicFrame
extends com.xinapse.util.MultiContrastAnalysisFrame

AbstractDynamicFrame - a GUI for performing general image dynamic analysis.

See Also:
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String APPLY_SPATIAL_FILTER_PREFERENCE_NAME
          The Preference name for whether to apply a spatial smoothing filter.
static int DEFAULT_N_STEADY_STATES
          The default number of steady state images, if not set in user preferences.
protected  javax.swing.JPanel dynamicModelPanel
          The JPanel that contains the analysis setup.
protected  com.xinapse.util.XinapseFormattedTextField fwhmTextField
          A JFormattedTextField to set the FWHM of the smoothing filter.
protected  com.xinapse.dynamic.DynamicMaskSelectorWorker.Panel maskSelectorPanel
          A JPanel for selecting an image mask.
protected static int MAX_N_TIMES
          The maximum number of time points that can be selected in various spinners.
static java.lang.String N_STEADY_STATES_PREFERENCE_NAME
          The Preference name for the number of steady-state images.
 ImageSelectionPanel outputImageSelectionPanel
          ImageSelectionPanel used to select the output images basename.
protected  javax.swing.JCheckBox registerCheckBox
          A check box to turn on registration.
static java.lang.String REGISTRATION_PREFERENCE_NAME
          The Preference name for whether to perform registration.
protected  javax.swing.JCheckBox smoothingFilterCheckBox
          A check box to turn on spatial filtering.
static java.lang.String SPATIAL_FILTER_FWHM_PREFERENCE_NAME
          The Preference name for smoothing filter FWHM in mm.
static java.lang.String THRESHOLD_PREFERENCE_NAME
          The Preference name for the intensity threshold.
static java.lang.String TIME_BETWEEN_IMAGES_PREFERENCE_NAME
          The Preference name for the time between images.
protected  javax.swing.JTextField timeBetweenImagesField
          The JTextField to set the time between images in seconds.
 
Fields inherited from class com.xinapse.util.MultiContrastAnalysisFrame
imageInputPanel, roamingResponseDialog
 
Fields inherited from class com.xinapse.util.ImageOrganiserFrame
bottomPanel, defaultCursor, doItButton, doneButton, imageDisplayer, loadResultButton, outputPanel, quitMe, saveToDiskButton, statusText, waitCursor
 
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
protected AbstractDynamicFrame(com.xinapse.displayer.ImageDisplayer parent, java.lang.String frameTitle, java.awt.Image iconImage, java.lang.String preferencesNodeName)
          Creates new DynamicFrame for use with Jim.
protected AbstractDynamicFrame(java.lang.String frameTitle, java.awt.Image iconImage, java.lang.String preferencesNodeName)
          Creates new DynamicFrame for a stand-alone image dynamic analysis application.
 
Method Summary
 void busyCursors()
          Sets the cursor for this MessageShower to indicate that an operation is in progress.
 float getDeltaX()
          For the purposes of plotting data, returns the step between values of the independent variable.
 MultiSliceImage getMaskImage()
          Returns the mask image if masking by an image has been selected.
 int getNSteadyStates()
          Returns the number of pre-steady-state images set in the GUI.
 java.lang.String getOutputImagesBaseName()
          Returns the basename for the output images.
 java.io.File getROIMaskFile()
          Returns the mask ROI file if masking by a ROIs has been selected.
 float getSmoothingFWHMmm()
          Returns the full-width-at-half-maximum for the smoothing filter.
 java.lang.Double getThreshold()
          Returns the intensity threshold for pixel processing.
 float getTimeBetweenImages()
          Returns the time between images set in the GUI.
 boolean getUseBrainFinder()
          Returns whether the Brain Finder option has been set in the GUI.
 java.lang.String getXAxisLabel()
          For the purposes of plotting data, returns the x-axis label.
 float getXStart()
          For the purposes of plotting data, returns the starting value of the independent variable.
 void readyCursors()
          Sets the cursor for this MessageShower to indicate that it is ready for user input.
 void savePreferences(java.util.prefs.Preferences prefs)
          Save the current settings to the user Preferences at the given node name.
 void setDefaults()
          Set the default values.
 void setThreshold(java.lang.Double thr)
          Sets the intensity threshold for pixel processing.
 void setTimeBetweenImages(java.lang.Float timeBetweenImages)
          Sets the time between images in the GUI.
 void setVisible(boolean b)
           
 void showStatus(java.lang.String s)
          Shows a status message in the GUI.
 
Methods inherited from class com.xinapse.util.MultiContrastAnalysisFrame
addChangeListener, drawRoamingResponseGraphs, getContiguousContrasts, getDynamicModel, getInputImages, getNContrasts, getNContrasts, getNSliceLocations, getNSliceLocations, getSliceDataType, getSlicePix, isSingleInputImage, putSlicePix, removeChangeListener, setNContrasts, showRoamingResponseDialog, unloadImage, updateRoamingResponse
 
Methods inherited from class com.xinapse.util.ImageOrganiserFrame
addActionWorker, doIt, getDisplayer, getJFrame, getParentComponent, getScrollPane, hasActionWorkers, removeActionWorker, setActionDescription, setEnabled, setScrollableContent, showError, showError, showStatus, showSuppressibleError, showSuppressibleError, showWarning, stopActionWorkers
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, 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, 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, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

TIME_BETWEEN_IMAGES_PREFERENCE_NAME

public static final java.lang.String TIME_BETWEEN_IMAGES_PREFERENCE_NAME
The Preference name for the time between images.

See Also:
Constant Field Values

THRESHOLD_PREFERENCE_NAME

public static final java.lang.String THRESHOLD_PREFERENCE_NAME
The Preference name for the intensity threshold.

See Also:
Constant Field Values

REGISTRATION_PREFERENCE_NAME

public static final java.lang.String REGISTRATION_PREFERENCE_NAME
The Preference name for whether to perform registration.

See Also:
Constant Field Values

APPLY_SPATIAL_FILTER_PREFERENCE_NAME

public static final java.lang.String APPLY_SPATIAL_FILTER_PREFERENCE_NAME
The Preference name for whether to apply a spatial smoothing filter.

See Also:
Constant Field Values

SPATIAL_FILTER_FWHM_PREFERENCE_NAME

public static final java.lang.String SPATIAL_FILTER_FWHM_PREFERENCE_NAME
The Preference name for smoothing filter FWHM in mm.

See Also:
Constant Field Values

N_STEADY_STATES_PREFERENCE_NAME

public static final java.lang.String N_STEADY_STATES_PREFERENCE_NAME
The Preference name for the number of steady-state images.

See Also:
Constant Field Values

DEFAULT_N_STEADY_STATES

public static final int DEFAULT_N_STEADY_STATES
The default number of steady state images, if not set in user preferences.

See Also:
Constant Field Values

MAX_N_TIMES

protected static final int MAX_N_TIMES
The maximum number of time points that can be selected in various spinners.

See Also:
Constant Field Values

timeBetweenImagesField

protected javax.swing.JTextField timeBetweenImagesField
The JTextField to set the time between images in seconds.


registerCheckBox

protected final javax.swing.JCheckBox registerCheckBox
A check box to turn on registration.


smoothingFilterCheckBox

protected final javax.swing.JCheckBox smoothingFilterCheckBox
A check box to turn on spatial filtering.


fwhmTextField

protected final com.xinapse.util.XinapseFormattedTextField fwhmTextField
A JFormattedTextField to set the FWHM of the smoothing filter.


maskSelectorPanel

protected final com.xinapse.dynamic.DynamicMaskSelectorWorker.Panel maskSelectorPanel
A JPanel for selecting an image mask.


dynamicModelPanel

protected final javax.swing.JPanel dynamicModelPanel
The JPanel that contains the analysis setup. Components for the analysis model should be added to this JPanel.


outputImageSelectionPanel

public ImageSelectionPanel outputImageSelectionPanel
ImageSelectionPanel used to select the output images basename.

Constructor Detail

AbstractDynamicFrame

protected AbstractDynamicFrame(java.lang.String frameTitle,
                               java.awt.Image iconImage,
                               java.lang.String preferencesNodeName)
Creates new DynamicFrame for a stand-alone image dynamic analysis application.


AbstractDynamicFrame

protected AbstractDynamicFrame(com.xinapse.displayer.ImageDisplayer parent,
                               java.lang.String frameTitle,
                               java.awt.Image iconImage,
                               java.lang.String preferencesNodeName)
Creates new DynamicFrame for use with Jim.

Method Detail

showStatus

public void showStatus(java.lang.String s)
Shows a status message in the GUI.

Specified by:
showStatus in interface MessageShower
Specified by:
showStatus in class com.xinapse.util.ImageOrganiserFrame
Parameters:
s - the status message to show.

getUseBrainFinder

public boolean getUseBrainFinder()
Returns whether the Brain Finder option has been set in the GUI.

Returns:
true of the Brain Finder option has been set; false otherwise.

getMaskImage

public MultiSliceImage getMaskImage()
                             throws com.xinapse.util.InvalidArgumentException
Returns the mask image if masking by an image has been selected.

Returns:
the mask image if masking by an image has been selected, or null if masking by an image has not been selected.
Throws:
com.xinapse.util.InvalidArgumentException - if masking by an image has been selected, but the mask image has not been set or cannot be opened.

getROIMaskFile

public java.io.File getROIMaskFile()
                            throws com.xinapse.util.InvalidArgumentException
Returns the mask ROI file if masking by a ROIs has been selected.

Returns:
the ROI File if masking by a ROIs has been selected, or null if masking by a ROIs has not been selected.
Throws:
com.xinapse.util.InvalidArgumentException - if masking by ROIs has been selected, but the mask ROIs File has not been set or cannot be opened.

getThreshold

public java.lang.Double getThreshold()
                              throws com.xinapse.util.InvalidArgumentException
Returns the intensity threshold for pixel processing.

Returns:
the intensity threshold or null if no threshold has been set.
Throws:
com.xinapse.util.InvalidArgumentException - if the threshold value cannot be interpreset from what has been set in the GUI.

setThreshold

public void setThreshold(java.lang.Double thr)
Sets the intensity threshold for pixel processing.

Parameters:
thr - the intensity threshold or null if no threshold is to be set.

getXStart

public float getXStart()
For the purposes of plotting data, returns the starting value of the independent variable.

Specified by:
getXStart in class com.xinapse.util.MultiContrastAnalysisFrame
Returns:
1 which is the scan number of the first image.

getDeltaX

public float getDeltaX()
                throws com.xinapse.util.InvalidArgumentException
For the purposes of plotting data, returns the step between values of the independent variable.

Specified by:
getDeltaX in class com.xinapse.util.MultiContrastAnalysisFrame
Returns:
1 which is the step between scans.
Throws:
com.xinapse.util.InvalidArgumentException - never.

getXAxisLabel

public java.lang.String getXAxisLabel()
For the purposes of plotting data, returns the x-axis label.

Specified by:
getXAxisLabel in class com.xinapse.util.MultiContrastAnalysisFrame
Returns:
"scan number".

getTimeBetweenImages

public float getTimeBetweenImages()
                           throws com.xinapse.util.InvalidArgumentException
Returns the time between images set in the GUI.

Returns:
the time (in seconds) between images.
Throws:
com.xinapse.util.InvalidArgumentException - if the time between images has not been set by the user, or if the time between images cannot be interpreted, or is not positive.

setTimeBetweenImages

public void setTimeBetweenImages(java.lang.Float timeBetweenImages)
Sets the time between images in the GUI.

Parameters:
timeBetweenImages - the time between images. If null, this method has not effect.

getSmoothingFWHMmm

public float getSmoothingFWHMmm()
                         throws com.xinapse.util.InvalidArgumentException
Returns the full-width-at-half-maximum for the smoothing filter.

Returns:
the full-width-at-half-maximum for the smoothing filter.
Throws:
com.xinapse.util.InvalidArgumentException - if the FWHM has not been set by the user, or the FWHM cannot be interpreted, or is not positive.

getOutputImagesBaseName

public java.lang.String getOutputImagesBaseName()
                                         throws com.xinapse.util.InvalidArgumentException
Returns the basename for the output images.

Returns:
the basename for the output images.
Throws:
com.xinapse.util.InvalidArgumentException - if the basename has not been set by the user.

getNSteadyStates

public int getNSteadyStates()
Returns the number of pre-steady-state images set in the GUI.

Returns:
the number of pre-steady-state images set in the GUI.

setDefaults

public void setDefaults()
Description copied from interface: PreferencesSettable
Set the default values.

Specified by:
setDefaults in interface PreferencesSettable
Overrides:
setDefaults in class com.xinapse.util.MultiContrastAnalysisFrame

savePreferences

public void savePreferences(java.util.prefs.Preferences prefs)
                     throws com.xinapse.util.InvalidArgumentException
Description copied from interface: PreferencesSettable
Save the current settings to the user Preferences at the given node name.

Specified by:
savePreferences in interface PreferencesSettable
Overrides:
savePreferences in class com.xinapse.util.MultiContrastAnalysisFrame
Parameters:
prefs - the java.util.prefs.Preferences to which the current settings will be saved.
Throws:
InvalidArgumentException - if the current settings are invalid and cannot be saved to the preferences.

busyCursors

public void busyCursors()
Description copied from interface: MessageShower
Sets the cursor for this MessageShower to indicate that an operation is in progress.

Specified by:
busyCursors in interface MessageShower
Overrides:
busyCursors in class com.xinapse.util.MultiContrastAnalysisFrame

readyCursors

public void readyCursors()
Description copied from interface: MessageShower
Sets the cursor for this MessageShower to indicate that it is ready for user input.

Specified by:
readyCursors in interface MessageShower
Overrides:
readyCursors in class com.xinapse.util.MultiContrastAnalysisFrame

setVisible

public void setVisible(boolean b)
Overrides:
setVisible in class com.xinapse.util.MultiContrastAnalysisFrame


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.