Package com.xinapse.dynamic
Class AbstractDynamicFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
com.xinapse.util.ImageOrganiserFrame
com.xinapse.util.MultiContrastAnalysisFrame
com.xinapse.dynamic.AbstractDynamicFrame
- All Implemented Interfaces:
MessageShower
,PreferencesSettable
,ImageObserver
,MenuContainer
,Serializable
,Accessible
,RootPaneContainer
,WindowConstants
AbstractDynamicFrame - a GUI for performing general image dynamic analysis.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The Preference name for whether to apply a spatial smoothing filter.static final int
The default number of steady state images, if not set in user preferences.protected final JPanel
The JPanel that contains the analysis setup.protected final com.xinapse.util.XinapseFormattedTextField
A JFormattedTextField to set the FWHM of the smoothing filter.protected final com.xinapse.dynamic.DynamicMaskSelectorWorker.Panel
A JPanel for selecting an image mask.protected static final int
The maximum number of time points that can be selected in various spinners.static final String
The Preference name for the number of steady-state images.ImageSelectionPanel used to select the output images basename.protected final JCheckBox
A check box to turn on registration.static final String
The Preference name for whether to perform registration.protected final JCheckBox
A check box to turn on spatial filtering.static final String
The Preference name for smoothing filter FWHM in mm.static final String
The Preference name for the intensity threshold.static final String
The Preference name for the time between images.protected JTextField
The JTextField to set the time between images in seconds.Fields inherited from class com.xinapse.util.MultiContrastAnalysisFrame
imageInputPanel, ROAM_COMMAND, roamingResponseDialog
Fields inherited from class com.xinapse.util.ImageOrganiserFrame
bottomPanel, doItButton, doneButton, imageDisplayer, loadResultButton, outputPanel, quitMe, saveToDiskButton, statusText
Fields inherited from class javax.swing.JFrame
accessibleContext, 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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractDynamicFrame
(com.xinapse.displayer.ImageDisplayer parent, String frameTitle, List<Image> iconImages, String preferencesNodeName) Creates new DynamicFrame for use with Jim.protected
AbstractDynamicFrame
(String frameTitle, List<Image> iconImages, String preferencesNodeName) Creates a new DynamicFrame for a stand-alone image dynamic analysis application. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Call this method to indicate that theImageOrganiserFrame
is busy processing.com.xinapse.apps.mask.BinaryMask
Returns the mask image if masking by an image has been selected.getBT()
Returns the threshold fraction to use with the Brain Finder, if this option has been set in the GUI.float
For the purposes of plotting data, returns the step between values of the independent variable.Returns the mask ROI file if masking by a ROIs has been selected.Returns the mask ROIs if masking by a ROIs has been selected.int
Returns the number of pre-steady-state images set in the GUI.Returns the basename for the output images.float
Returns the full-width-at-half-maximum for the smoothing filter.Returns the intensity threshold for pixel processing.float
Returns the time between images set in the GUI.boolean
Returns whether the Brain Finder option has been set in the GUI.For the purposes of plotting data, returns the x-axis label.float
For the purposes of plotting data, returns the starting value of the independent variable.void
Call this method to indicate that theImageOrganiserFrame
is ready to do further processing.void
savePreferences
(Preferences prefs) Save the current setting to the user preferences.void
Put the default settings to thisMultiContrastAnalysisFrame
.void
setThreshold
(Double thr) Sets the intensity threshold for pixel processing.void
setTimeBetweenImages
(Float timeBetweenImages) Sets the time between images in the GUI.void
setVisible
(boolean b) Shows or hides thisImageOrganiserFrame
depending on the value of parameterb
.void
showStatus
(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, getVolumePix, isSingleInputImage, putSlicePix, removeChangeListener, setNContrasts, showRoamingResponseDialog, unloadImage, updateRoamingResponse
Methods inherited from class com.xinapse.util.ImageOrganiserFrame
addActionWorker, doIt, getDisplayer, getJFrame, getParentWindow, 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, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, 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 Details
-
TIME_BETWEEN_IMAGES_PREFERENCE_NAME
The Preference name for the time between images.- See Also:
-
THRESHOLD_PREFERENCE_NAME
The Preference name for the intensity threshold.- See Also:
-
REGISTRATION_PREFERENCE_NAME
The Preference name for whether to perform registration.- See Also:
-
APPLY_SPATIAL_FILTER_PREFERENCE_NAME
The Preference name for whether to apply a spatial smoothing filter.- See Also:
-
SPATIAL_FILTER_FWHM_PREFERENCE_NAME
The Preference name for smoothing filter FWHM in mm.- See Also:
-
N_STEADY_STATES_PREFERENCE_NAME
The Preference name for the number of steady-state images.- See Also:
-
DEFAULT_N_STEADY_STATES
public static final int DEFAULT_N_STEADY_STATESThe default number of steady state images, if not set in user preferences.- See Also:
-
MAX_N_TIMES
protected static final int MAX_N_TIMESThe maximum number of time points that can be selected in various spinners.- See Also:
-
timeBetweenImagesField
The JTextField to set the time between images in seconds. -
registerCheckBox
A check box to turn on registration. -
smoothingFilterCheckBox
A check box to turn on spatial filtering. -
fwhmTextField
protected final com.xinapse.util.XinapseFormattedTextField fwhmTextFieldA JFormattedTextField to set the FWHM of the smoothing filter. -
maskSelectorPanel
protected final com.xinapse.dynamic.DynamicMaskSelectorWorker.Panel maskSelectorPanelA JPanel for selecting an image mask. -
dynamicModelPanel
The JPanel that contains the analysis setup. Components for the analysis model should be added to this JPanel. -
outputImageSelectionPanel
ImageSelectionPanel used to select the output images basename.
-
-
Constructor Details
-
AbstractDynamicFrame
protected AbstractDynamicFrame(String frameTitle, List<Image> iconImages, String preferencesNodeName) Creates a new DynamicFrame for a stand-alone image dynamic analysis application.- Parameters:
frameTitle
- the title for the frame.iconImages
- List of icon images to set for the frame.preferencesNodeName
- the Preferences node name from which the initial settings will be loaded.
-
AbstractDynamicFrame
protected AbstractDynamicFrame(com.xinapse.displayer.ImageDisplayer parent, String frameTitle, List<Image> iconImages, String preferencesNodeName) Creates new DynamicFrame for use with Jim.- Parameters:
parent
- the ImageDisplayer that this frame is connected to.frameTitle
- the title for the frame.iconImages
- List of icon images to set for the frame.preferencesNodeName
- the Preferences node name from which the initial settings will be loaded.
-
-
Method Details
-
showStatus
Shows a status message in the GUI.- Specified by:
showStatus
in interfaceMessageShower
- Specified by:
showStatus
in classcom.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.
-
getBT
Returns the threshold fraction to use with the Brain Finder, if this option has been set in the GUI.- Returns:
- the threshold fraction to use with the Brain Finder, or null.
- Throws:
InvalidArgumentException
- if the bT value is outside the range (0..1) exclusive.
-
getBinaryMask
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:
InvalidArgumentException
- if masking by an image has been selected, but the mask image has not been set or cannot be opened.
-
getMaskROIs
Returns the mask ROIs if masking by a ROIs has been selected.- Returns:
- the mask ROIs if masking by a ROIs has been selected, or null if masking by a ROIs has not been selected.
- Throws:
InvalidArgumentException
- if masking by ROIs has been selected, but the mask ROI File has not been set or cannot be opened.
-
getMaskROIFile
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:
InvalidArgumentException
- if masking by ROIs has been selected, but the mask ROIs File has not been set or cannot be opened.
-
getThreshold
Returns the intensity threshold for pixel processing.- Returns:
- the intensity threshold or null if no threshold has been set.
- Throws:
InvalidArgumentException
- if the threshold value cannot be interpreset from what has been set in the GUI.
-
setThreshold
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 classMultiContrastAnalysisFrame
- Returns:
- 1 which is the scan number of the first image.
-
getDeltaX
For the purposes of plotting data, returns the step between values of the independent variable.- Specified by:
getDeltaX
in classMultiContrastAnalysisFrame
- Returns:
- 1 which is the step between scans.
- Throws:
NumberFormatException
- if the step between values cannot be determined.
-
getXAxisLabel
For the purposes of plotting data, returns the x-axis label.- Specified by:
getXAxisLabel
in classMultiContrastAnalysisFrame
- Returns:
- "scan number".
-
getTimeBetweenImages
Returns the time between images set in the GUI.- Returns:
- the time (in seconds) between images.
- Throws:
NumberFormatException
- 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
Sets the time between images in the GUI.- Parameters:
timeBetweenImages
- the time between images. If null, this method has not effect.
-
getSmoothingFWHMmm
Returns the full-width-at-half-maximum for the smoothing filter.- Returns:
- the full-width-at-half-maximum for the smoothing filter.
- Throws:
InvalidArgumentException
- if the FWHM has not been set by the user, or the FWHM cannot be interpreted, or is not positive.
-
getOutputImagesBaseName
Returns the basename for the output images.- Returns:
- the basename for the output images.
- Throws:
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 class:MultiContrastAnalysisFrame
Put the default settings to thisMultiContrastAnalysisFrame
.- Specified by:
setDefaults
in interfacePreferencesSettable
- Overrides:
setDefaults
in classMultiContrastAnalysisFrame
-
savePreferences
Description copied from class:MultiContrastAnalysisFrame
Save the current setting to the user preferences.- Specified by:
savePreferences
in interfacePreferencesSettable
- Overrides:
savePreferences
in classMultiContrastAnalysisFrame
- Parameters:
prefs
- thePreferences
node to which to save the settings.- Throws:
InvalidArgumentException
- if the current settings are not valid.
-
busyCursors
public void busyCursors()Description copied from class:com.xinapse.util.ImageOrganiserFrame
Call this method to indicate that theImageOrganiserFrame
is busy processing.- Specified by:
busyCursors
in interfaceMessageShower
- Overrides:
busyCursors
in classMultiContrastAnalysisFrame
-
readyCursors
public void readyCursors()Description copied from class:com.xinapse.util.ImageOrganiserFrame
Call this method to indicate that theImageOrganiserFrame
is ready to do further processing.- Specified by:
readyCursors
in interfaceMessageShower
- Overrides:
readyCursors
in classMultiContrastAnalysisFrame
-
setVisible
public void setVisible(boolean b) Description copied from class:com.xinapse.util.ImageOrganiserFrame
Shows or hides thisImageOrganiserFrame
depending on the value of parameterb
. Ifb
isfalse
, then the user will be asked if any Threads the were generated by thisImageOrganiserFrame
should be stopped. If the user indicates to stop the Threads, then the threads are stopped at the next available opportunity. If, after these checks, no Threads are running, then thequitMe
flag is set, and thisImageOrganiserFrame
is hidden.- Overrides:
setVisible
in classMultiContrastAnalysisFrame
- Parameters:
b
- iftrue
, shows thisImageOrganiserFrame
; otherwise, hides thisImageOrganiserFrame
.
-