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.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe Preference name for whether to apply a spatial smoothing filter.static final intThe default number of steady state images, if not set in user preferences.protected final JPanelThe JPanel that contains the analysis setup.protected final com.xinapse.util.XinapseFormattedTextFieldA JFormattedTextField to set the FWHM of the smoothing filter.protected final com.xinapse.dynamic.DynamicMaskSelectorWorker.PanelA JPanel for selecting an image mask.protected static final intThe maximum number of time points that can be selected in various spinners.static final StringThe Preference name for the number of steady-state images.ImageSelectionPanel used to select the output images basename.protected final JCheckBoxA check box to turn on registration.static final StringThe Preference name for whether to perform registration.protected final JCheckBoxA check box to turn on spatial filtering.static final StringThe Preference name for smoothing filter FWHM in mm.static final StringThe Preference name for the intensity threshold.static final StringThe Preference name for the time between images.protected JTextFieldThe JTextField to set the time between images in seconds.Fields inherited from class com.xinapse.util.MultiContrastAnalysisFrame
imageInputPanel, ROAM_COMMAND, roamingResponseDialogFields inherited from class com.xinapse.util.ImageOrganiserFrame
bottomPanel, doItButton, doneButton, imageDisplayer, loadResultButton, outputPanel, quitMe, saveToDiskButton, statusTextFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields 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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractDynamicFrame(com.xinapse.displayer.ImageDisplayer parent, String frameTitle, List<Image> iconImages, String preferencesNodeName) Creates new DynamicFrame for use with Jim.protectedAbstractDynamicFrame(String frameTitle, List<Image> iconImages, String preferencesNodeName) Creates a new DynamicFrame for a stand-alone image dynamic analysis application. -
Method Summary
Modifier and TypeMethodDescriptionvoidCall this method to indicate that theImageOrganiserFrameis busy processing.com.xinapse.apps.mask.BinaryMaskReturns 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.floatFor 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.intReturns the number of pre-steady-state images set in the GUI.Returns the basename for the output images.floatReturns the full-width-at-half-maximum for the smoothing filter.Returns the intensity threshold for pixel processing.floatReturns the time between images set in the GUI.booleanReturns whether the Brain Finder option has been set in the GUI.For the purposes of plotting data, returns the x-axis label.floatFor the purposes of plotting data, returns the starting value of the independent variable.voidCall this method to indicate that theImageOrganiserFrameis ready to do further processing.voidsavePreferences(Preferences prefs) Save the current setting to the user preferences.voidPut the default settings to thisMultiContrastAnalysisFrame.voidsetThreshold(Double thr) Sets the intensity threshold for pixel processing.voidsetTimeBetweenImages(Float timeBetweenImages) Sets the time between images in the GUI.voidsetVisible(boolean b) Shows or hides thisImageOrganiserFramedepending on the value of parameterb.voidshowStatus(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, updateRoamingResponseMethods inherited from class com.xinapse.util.ImageOrganiserFrame
addActionWorker, doIt, getDisplayer, getJFrame, getParentWindow, getScrollPane, hasActionWorkers, removeActionWorker, setActionDescription, setEnabled, setScrollableContent, showError, showError, showStatus, showSuppressibleError, showSuppressibleError, showWarning, stopActionWorkersMethods 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, updateMethods 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, setUndecoratedMethods 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, toFrontMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
showStatusin interfaceMessageShower- Specified by:
showStatusin 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:
getXStartin 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:
getDeltaXin 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:
getXAxisLabelin 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:MultiContrastAnalysisFramePut the default settings to thisMultiContrastAnalysisFrame.- Specified by:
setDefaultsin interfacePreferencesSettable- Overrides:
setDefaultsin classMultiContrastAnalysisFrame
-
savePreferences
Description copied from class:MultiContrastAnalysisFrameSave the current setting to the user preferences.- Specified by:
savePreferencesin interfacePreferencesSettable- Overrides:
savePreferencesin classMultiContrastAnalysisFrame- Parameters:
prefs- thePreferencesnode 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.ImageOrganiserFrameCall this method to indicate that theImageOrganiserFrameis busy processing.- Specified by:
busyCursorsin interfaceMessageShower- Overrides:
busyCursorsin classMultiContrastAnalysisFrame
-
readyCursors
public void readyCursors()Description copied from class:com.xinapse.util.ImageOrganiserFrameCall this method to indicate that theImageOrganiserFrameis ready to do further processing.- Specified by:
readyCursorsin interfaceMessageShower- Overrides:
readyCursorsin classMultiContrastAnalysisFrame
-
setVisible
public void setVisible(boolean b) Description copied from class:com.xinapse.util.ImageOrganiserFrameShows or hides thisImageOrganiserFramedepending on the value of parameterb. Ifbisfalse, then the user will be asked if any Threads the were generated by thisImageOrganiserFrameshould 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 thequitMeflag is set, and thisImageOrganiserFrameis hidden.- Overrides:
setVisiblein classMultiContrastAnalysisFrame- Parameters:
b- iftrue, shows thisImageOrganiserFrame; otherwise, hides thisImageOrganiserFrame.
-