Package gov.nih.mipav.view.dialogs
Class JDialogTimeFitting
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
gov.nih.mipav.view.dialogs.JDialogBase
gov.nih.mipav.view.dialogs.JDialogScriptableBase
gov.nih.mipav.view.dialogs.JDialogTimeFitting
- All Implemented Interfaces:
AlgorithmInterface,ScriptableActionInterface,DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKActionNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested 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 TypeFieldDescriptionprivate JCheckBoxprivate Stringprivate JTextFieldprivate JLabelprivate JCheckBoxprivate JCheckBoxprivate JCheckBoxprivate JCheckBoxprivate JCheckBoxprivate JCheckBoxprivate JCheckBoxprivate JButtonprivate JButtonprivate Stringprivate ModelImageprivate static final intprivate JRadioButtonprivate Stringprivate FileVOIprivate booleanprivate intprivate ButtonGroupprivate static final intprivate JRadioButtonprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate double[]private ModelImagesource image.private JComboBoxprivate double[]private JCheckBoxprivate booleanboolean isMultifileprivate JLabelprivate JLabelprivate JLabelprivate JLabelprivate JLabelprivate JLabelprivate JLabelprivate JLabelprivate static final intprivate JRadioButtonprivate static final intThis dialog only allows 1 constant and 3 exponentials in the MULTIEXPONENTIAL_FIT at the present.private JRadioButtonprivate JCheckBoxprivate static final intprivate JRadioButtonprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate double[]private static final intprivate JRadioButtonprivate intprivate intprivate JTextFieldprivate JLabelprivate static final intprivate JRadioButtonprivate ModelImageresult imageprivate JTabbedPaneprivate JTextFieldprivate JTextFieldprivate JTextFieldprivate JTextFieldprivate JTextFieldprivate JTextFieldprivate JTextFieldprivate JTextFieldprivate JTextFieldprivate AlgorithmTimeFittingprivate ViewUserInterfaceprivate booleanprivate boolean[]private booleanprivate VOI[]Fields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
displayInNewFrame, isComplete, scriptParametersFields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManagerFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) action performedvoidalgorithmPerformed(AlgorithmBase algorithm) algorithm performedprivate JPanelprivate JPanelprotected voidcall algorithmget result imageprivate voidinit()voiditemStateChanged(ItemEvent event) item state changedprivate voidprotected voidset GUI from paramsprivate booleanprotected voidstore params from guivoidwindowClosing(WindowEvent event) window closingMethods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
doPostAlgorithmActions, getDialogActionString, insertScriptLine, isComplete, scriptRun, setCompleteMethods inherited from class gov.nih.mipav.view.dialogs.JDialogBase
buildApplyButton, buildButtons, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, buildOKButton, buildOKCancelButtons, buildTitledBorder, buildTitledBorder, createLabel, createProgressBar, createProgressBar, createTextField, focusGained, focusLost, getDialogName, isCancelled, isQuietRunning, isRunInSeparateThread, isScriptRunning, loadDefaults, loadDefaults, makeImageName, makeString, openNewFrame, saveDefaults, saveDefaults, setLeftHandSystem, setQuietRunning, setScriptRunning, setSeparateThread, setVisible, setVisible, setVisibleMenuBar, setVisibleStandard, setVOIManager, setWCSystem, testParameter, testParameterMin, updateFFTFileInfo, updateFileInfo, updateFileInfoOtherModality, updateFileInfoStatic, updateFileInfoStatic, updateFileTypeInfo, updateFileTypeInfo, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods 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, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, remove, 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, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
LINEAR_FIT
private static final int LINEAR_FITThis dialog only allows 1 constant and 3 exponentials in the MULTIEXPONENTIAL_FIT at the present. From "Pade-Laplace Analysis in the Fitting of Multi-exponential Nuclear Magnetic Resonance Decay Curves" by N. J. Clayden: "The problem of the correct number of exponentials required to describe a decay has a long history, for 25 years ago Lanczos demonstrated that various three-exponential functions with similar time constants could be accurately reproduced by two-exponential expressions with markedly different amplitudes and time constants. Experimentally, the consequence of this is that the signal-to-noise ratio must be excellent, perhaps unachievably so, if a true three-exponential decay is not to be confused with a spurious two-exponential fit. More recently, this conclusion has been tested for a non-linear least squares analytical method over a wide range of three-exponential functions with varying levels of experimental noise. At practical signal-to-noise ratios, for example 1000:1, the time constants of three exponentials must differ by a factor of > two if a two-exponential fit is not to be statistically significant using non-linear least squares fitting." From "Exponential analysis in physical phenomena" by Andrei A. Istratov and Oleg F. Vyvenko: "The nonlinear least squares (NLS) method was successfully used for analysis of decays that consisted of one to three exponential decays. Grinvald, Morimoto et al., and Tahira et al. found that for a SNR better than 10E3 a double-exponential decay could be resolved if the ratio of time constants was tau1/tau2 > 2. However, in the case of three exponents the method was found to be very sensitive to even a small amount of noise. Bromage concluded that for a decay-time-constant ratio of 2:1, the retrieved values of parameters are about 200 times more uncertain on going from two to three exponentials. Clayden et al. concluded that in the case of a double-exponential decay, NLS fit is robust if tau1/tau2 > 2.4 and SNR is about 1E3. If a decay consists of three exponentials and SNR equals about 1E3, the components can be resolved if tau1/tau2 = tau2/tau3 > 3.5. If the SNR is about 100, three components can be resolved if the decay-time-constant ratio is above 10. It was also noted that the least squares method is not robust with respect to nonrandom errors in the transient."- See Also:
-
EXPONENTIAL_FIT
private static final int EXPONENTIAL_FIT- See Also:
-
GAUSSIAN_FIT
private static final int GAUSSIAN_FIT- See Also:
-
LAPLACE_FIT
private static final int LAPLACE_FIT- See Also:
-
LORENTZ_FIT
private static final int LORENTZ_FIT- See Also:
-
MULTIEXPONENTIAL_FIT
private static final int MULTIEXPONENTIAL_FIT- See Also:
-
RAYLEIGH_FIT
private static final int RAYLEIGH_FIT- See Also:
-
functionFit
private int functionFit -
image
source image. -
resultImage
result image -
exitStatusImage
-
isMultifile
private boolean isMultifileboolean isMultifile -
nDims
private int nDims -
textImage
-
buttonImage
-
functionGroup
-
linearFit
-
exponentialFit
-
gaussianFit
-
laplaceFit
-
lorentzFit
-
multiExponentialFit
-
numVariablesLabel
-
numVariablesField
-
numVariables
private int numVariables -
rayleighFit
-
altTimeCheckBox
-
altTimeTagLabel
-
altTimeTagField
-
useAltTime
private boolean useAltTime -
altTimeDicomTag
-
logCheckBox
-
useLog
private boolean useLog -
imageList
-
labelVOI
-
buttonVOIFile
-
textVOIFile
-
UI
-
directoryVOI
-
fileNameVOI
-
fileVOI
-
voi
-
tfAlgo
-
initialCheckBox
-
findInitialFromData
private boolean findInitialFromData -
tabbedPane
-
labela0
-
labela1
-
labela2
-
labela3
-
labela4
-
labela5
-
labela6
-
texta0
-
texta1
-
texta2
-
texta3
-
texta4
-
texta5
-
texta6
-
b0CheckBox
-
b1CheckBox
-
b2CheckBox
-
b3CheckBox
-
b4CheckBox
-
b5CheckBox
-
b6CheckBox
-
low0Label
-
low0TextField
-
high0Label
-
high0TextField
-
low1Label
-
low1TextField
-
high1Label
-
high1TextField
-
low2Label
-
low2TextField
-
high2Label
-
high2TextField
-
low3Label
-
low3TextField
-
high3Label
-
high3TextField
-
low4Label
-
low4TextField
-
high4Label
-
high4TextField
-
low5Label
-
low5TextField
-
high5Label
-
high5TextField
-
low6Label
-
low6TextField
-
high6Label
-
high6TextField
-
initial
private double[] initial -
useBounds
private boolean[] useBounds -
lowBounds
private double[] lowBounds -
highBounds
private double[] highBounds
-
-
Constructor Details
-
JDialogTimeFitting
public JDialogTimeFitting()
-
-
Method Details
-
actionPerformed
action performed- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase
-
callAlgorithm
protected void callAlgorithm()call algorithm- Specified by:
callAlgorithmin classJDialogScriptableBase
-
loadImage
private void loadImage() -
algorithmPerformed
algorithm performed- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- the algorithm which has just completed
-
init
private void init() -
buildFittingPanel
-
buildBoundsPanel
-
setVariables
private boolean setVariables() -
setGUIFromParams
protected void setGUIFromParams()set GUI from params- Specified by:
setGUIFromParamsin classJDialogScriptableBase
-
storeParamsFromGUI
store params from gui- Specified by:
storeParamsFromGUIin classJDialogScriptableBase- Throws:
ParserException- If there is a problem creating/recording the new parameters.
-
getResultImage
get result image- Returns:
- The result image.
-
itemStateChanged
item state changed- Specified by:
itemStateChangedin interfaceItemListener- Overrides:
itemStateChangedin classJDialogBase- Parameters:
event- DOCUMENT ME!
-
windowClosing
window closing- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classJDialogBase- Parameters:
event- WindowEvent
-